Package org.apache.iceberg.aws.s3.signer
Class S3V4RestSignerClient
- java.lang.Object
-
- software.amazon.awssdk.auth.signer.internal.AbstractAwsSigner
-
- software.amazon.awssdk.auth.signer.internal.AbstractAws4Signer<software.amazon.awssdk.auth.signer.params.AwsS3V4SignerParams,software.amazon.awssdk.auth.signer.params.Aws4PresignerParams>
-
- org.apache.iceberg.aws.s3.signer.S3V4RestSignerClient
-
- All Implemented Interfaces:
software.amazon.awssdk.core.signer.Presigner
,software.amazon.awssdk.core.signer.Signer
@Immutable public abstract class S3V4RestSignerClient extends software.amazon.awssdk.auth.signer.internal.AbstractAws4Signer<software.amazon.awssdk.auth.signer.params.AwsS3V4SignerParams,software.amazon.awssdk.auth.signer.params.Aws4PresignerParams>
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
S3_SIGNER_ENDPOINT
static java.lang.String
S3_SIGNER_URI
-
Constructor Summary
Constructors Constructor Description S3V4RestSignerClient()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description java.lang.String
baseSignerUri()
protected java.lang.String
calculateContentHashPresign(software.amazon.awssdk.http.SdkHttpFullRequest.Builder mutableRequest, software.amazon.awssdk.auth.signer.params.Aws4PresignerParams signerParams)
protected void
check()
static S3V4RestSignerClient
create(java.util.Map<java.lang.String,java.lang.String> properties)
java.lang.String
credential()
A credential to exchange for a token in the OAuth2 client credentials flow.java.lang.String
endpoint()
java.lang.String
oauth2ServerUri()
Token endpoint URI to fetch token from if the Rest Catalog is not the authorization server.java.util.Map<java.lang.String,java.lang.String>
optionalOAuthParams()
software.amazon.awssdk.http.SdkHttpFullRequest
presign(software.amazon.awssdk.http.SdkHttpFullRequest request, software.amazon.awssdk.core.interceptor.ExecutionAttributes executionAttributes)
protected void
processRequestPayload(software.amazon.awssdk.http.SdkHttpFullRequest.Builder mutableRequest, byte[] signature, byte[] signingKey, software.amazon.awssdk.auth.signer.internal.Aws4SignerRequestParams signerRequestParams, software.amazon.awssdk.auth.signer.params.AwsS3V4SignerParams signerParams)
protected void
processRequestPayload(software.amazon.awssdk.http.SdkHttpFullRequest.Builder mutableRequest, byte[] signature, byte[] signingKey, software.amazon.awssdk.auth.signer.internal.Aws4SignerRequestParams signerRequestParams, software.amazon.awssdk.auth.signer.params.AwsS3V4SignerParams signerParams, software.amazon.awssdk.core.checksums.SdkChecksum sdkChecksum)
abstract java.util.Map<java.lang.String,java.lang.String>
properties()
java.util.function.Supplier<java.util.Map<java.lang.String,java.lang.String>>
requestPropertiesSupplier()
software.amazon.awssdk.http.SdkHttpFullRequest
sign(software.amazon.awssdk.http.SdkHttpFullRequest request, software.amazon.awssdk.core.interceptor.ExecutionAttributes executionAttributes)
java.util.function.Supplier<java.lang.String>
token()
A Bearer token supplier which will be used for interaction with the server.-
Methods inherited from class software.amazon.awssdk.auth.signer.internal.AbstractAws4Signer
addSessionCredentials, calculateContentHash, calculateContentHash, deriveSigningKey, deriveSigningKey, doPresign, doSign, doSign, extractPresignerParams, extractSignerParams
-
Methods inherited from class software.amazon.awssdk.auth.signer.internal.AbstractAwsSigner
getBinaryRequestPayloadStream, sanitizeCredentials, sign, sign, signAndBase64Encode, signWithMac
-
-
-
-
Field Detail
-
S3_SIGNER_URI
public static final java.lang.String S3_SIGNER_URI
- See Also:
- Constant Field Values
-
S3_SIGNER_ENDPOINT
public static final java.lang.String S3_SIGNER_ENDPOINT
- See Also:
- Constant Field Values
-
-
Method Detail
-
properties
public abstract java.util.Map<java.lang.String,java.lang.String> properties()
-
requestPropertiesSupplier
@Default public java.util.function.Supplier<java.util.Map<java.lang.String,java.lang.String>> requestPropertiesSupplier()
-
baseSignerUri
@Lazy public java.lang.String baseSignerUri()
-
endpoint
@Lazy public java.lang.String endpoint()
-
credential
@Nullable @Lazy public java.lang.String credential()
A credential to exchange for a token in the OAuth2 client credentials flow.
-
oauth2ServerUri
@Lazy public java.lang.String oauth2ServerUri()
Token endpoint URI to fetch token from if the Rest Catalog is not the authorization server.
-
optionalOAuthParams
@Lazy public java.util.Map<java.lang.String,java.lang.String> optionalOAuthParams()
-
token
@Default public java.util.function.Supplier<java.lang.String> token()
A Bearer token supplier which will be used for interaction with the server.
-
check
@Check protected void check()
-
processRequestPayload
protected void processRequestPayload(software.amazon.awssdk.http.SdkHttpFullRequest.Builder mutableRequest, byte[] signature, byte[] signingKey, software.amazon.awssdk.auth.signer.internal.Aws4SignerRequestParams signerRequestParams, software.amazon.awssdk.auth.signer.params.AwsS3V4SignerParams signerParams)
- Specified by:
processRequestPayload
in classsoftware.amazon.awssdk.auth.signer.internal.AbstractAws4Signer<software.amazon.awssdk.auth.signer.params.AwsS3V4SignerParams,software.amazon.awssdk.auth.signer.params.Aws4PresignerParams>
-
processRequestPayload
protected void processRequestPayload(software.amazon.awssdk.http.SdkHttpFullRequest.Builder mutableRequest, byte[] signature, byte[] signingKey, software.amazon.awssdk.auth.signer.internal.Aws4SignerRequestParams signerRequestParams, software.amazon.awssdk.auth.signer.params.AwsS3V4SignerParams signerParams, software.amazon.awssdk.core.checksums.SdkChecksum sdkChecksum)
- Specified by:
processRequestPayload
in classsoftware.amazon.awssdk.auth.signer.internal.AbstractAws4Signer<software.amazon.awssdk.auth.signer.params.AwsS3V4SignerParams,software.amazon.awssdk.auth.signer.params.Aws4PresignerParams>
-
calculateContentHashPresign
protected java.lang.String calculateContentHashPresign(software.amazon.awssdk.http.SdkHttpFullRequest.Builder mutableRequest, software.amazon.awssdk.auth.signer.params.Aws4PresignerParams signerParams)
- Specified by:
calculateContentHashPresign
in classsoftware.amazon.awssdk.auth.signer.internal.AbstractAws4Signer<software.amazon.awssdk.auth.signer.params.AwsS3V4SignerParams,software.amazon.awssdk.auth.signer.params.Aws4PresignerParams>
-
presign
public software.amazon.awssdk.http.SdkHttpFullRequest presign(software.amazon.awssdk.http.SdkHttpFullRequest request, software.amazon.awssdk.core.interceptor.ExecutionAttributes executionAttributes)
-
sign
public software.amazon.awssdk.http.SdkHttpFullRequest sign(software.amazon.awssdk.http.SdkHttpFullRequest request, software.amazon.awssdk.core.interceptor.ExecutionAttributes executionAttributes)
-
create
public static S3V4RestSignerClient create(java.util.Map<java.lang.String,java.lang.String> properties)
-
-