Class RESTSigV4AuthSession

java.lang.Object
org.apache.iceberg.aws.RESTSigV4AuthSession
All Implemented Interfaces:
AutoCloseable, AuthSession

public class RESTSigV4AuthSession extends Object implements AuthSession
An AuthSession that signs requests with SigV4.

The request is first authenticated by the delegate AuthSession, then signed with SigV4. In case of conflicting headers, the Authorization header set by delegate AuthSession will be relocated, then included in the canonical headers to sign.

See Signing AWS API requests for details about the SigV4 protocol.

  • Constructor Details

    • RESTSigV4AuthSession

      public RESTSigV4AuthSession(software.amazon.awssdk.auth.signer.Aws4Signer aws4Signer, AuthSession delegateAuthSession, AwsProperties awsProperties)
  • Method Details

    • authenticate

      public HTTPRequest authenticate(HTTPRequest request)
      Description copied from interface: AuthSession
      Authenticates the given request and returns a new request with the necessary authentication.
      Specified by:
      authenticate in interface AuthSession
    • close

      public void close()
      Description copied from interface: AuthSession
      Closes the session and releases any resources. This method is called when the session is no longer needed. Note that since sessions may be cached, this method may not be called immediately after the session is no longer needed, but rather when the session is evicted from the cache, or the cache itself is closed.
      Specified by:
      close in interface AuthSession
      Specified by:
      close in interface AutoCloseable