Package org.apache.iceberg.aws
Class RESTSigV4AuthSession
java.lang.Object
org.apache.iceberg.aws.RESTSigV4AuthSession
- All Implemented Interfaces:
AutoCloseable
,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.
-
Field Summary
Fields inherited from interface org.apache.iceberg.rest.auth.AuthSession
EMPTY
-
Constructor Summary
ConstructorsConstructorDescriptionRESTSigV4AuthSession
(software.amazon.awssdk.auth.signer.Aws4Signer aws4Signer, AuthSession delegateAuthSession, AwsProperties awsProperties) -
Method Summary
Modifier and TypeMethodDescriptionauthenticate
(HTTPRequest request) Authenticates the given request and returns a new request with the necessary authentication.void
close()
Closes the session and releases any resources.
-
Constructor Details
-
RESTSigV4AuthSession
public RESTSigV4AuthSession(software.amazon.awssdk.auth.signer.Aws4Signer aws4Signer, AuthSession delegateAuthSession, AwsProperties awsProperties)
-
-
Method Details
-
authenticate
Description copied from interface:AuthSession
Authenticates the given request and returns a new request with the necessary authentication.- Specified by:
authenticate
in interfaceAuthSession
-
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 interfaceAuthSession
- Specified by:
close
in interfaceAutoCloseable
-