Package org.apache.hadoop.fs.s3a.auth
Class CustomSdkSigner
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>
software.amazon.awssdk.auth.signer.internal.AbstractAwsS3V4Signer
org.apache.hadoop.fs.s3a.auth.CustomSdkSigner
- All Implemented Interfaces:
software.amazon.awssdk.core.signer.Presigner,software.amazon.awssdk.core.signer.Signer
public class CustomSdkSigner
extends software.amazon.awssdk.auth.signer.internal.AbstractAwsS3V4Signer
implements software.amazon.awssdk.core.signer.Signer
This class is for testing the SDK's signing: it
can be declared as the signer class in the configuration
and then the full test suite run with it.
Derived from the inner class of
ITestCustomSigner.
fs.s3a.custom.signers=CustomSdkSigner:org.apache.hadoop.fs.s3a.auth.CustomSdkSigner fs.s3a.s3.signing-algorithm=CustomSdkSigner
-
Nested Class Summary
Nested Classes -
Field Summary
Fields inherited from class software.amazon.awssdk.auth.signer.internal.AbstractAwsS3V4Signer
CONTENT_SHA_256_WITH_CHECKSUM, STREAMING_UNSIGNED_PAYLOAD_TRAILERFields inherited from class software.amazon.awssdk.auth.signer.internal.AbstractAws4Signer
EMPTY_STRING_SHA256_HEX -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic Stringstatic intstatic intsoftware.amazon.awssdk.http.SdkHttpFullRequestsign(software.amazon.awssdk.http.SdkHttpFullRequest request, software.amazon.awssdk.core.interceptor.ExecutionAttributes executionAttributes) Method to sign the incoming request with credentials.Methods inherited from class software.amazon.awssdk.auth.signer.internal.AbstractAwsS3V4Signer
calculateContentHash, calculateContentHash, calculateContentHashPresign, getChecksumTrailerLength, presign, presign, processRequestPayload, processRequestPayload, signMethods inherited from class software.amazon.awssdk.auth.signer.internal.AbstractAws4Signer
addSessionCredentials, deriveSigningKey, deriveSigningKey, doPresign, doSign, doSign, extractPresignerParams, extractSignerParamsMethods inherited from class software.amazon.awssdk.auth.signer.internal.AbstractAwsSigner
getBinaryRequestPayloadStream, sanitizeCredentials, sign, sign, signAndBase64Encode, signWithMacMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface software.amazon.awssdk.core.signer.Signer
credentialType
-
Constructor Details
-
CustomSdkSigner
public CustomSdkSigner()
-
-
Method Details
-
sign
public software.amazon.awssdk.http.SdkHttpFullRequest sign(software.amazon.awssdk.http.SdkHttpFullRequest request, software.amazon.awssdk.core.interceptor.ExecutionAttributes executionAttributes) Method to sign the incoming request with credentials.NOTE: In case of Client-side encryption, we do a "Generate Key" POST request to AWSKMS service rather than S3, this was causing the test to break. When this request happens, we have the endpoint in form of "kms.[REGION].amazonaws.com", and bucket-name becomes "kms". We can't use AWSS3V4Signer for AWSKMS service as it contains a header "x-amz-content-sha256:UNSIGNED-PAYLOAD", which returns a 400 bad request because the signature calculated by the service doesn't match what we sent.
- Specified by:
signin interfacesoftware.amazon.awssdk.core.signer.Signer- Overrides:
signin classsoftware.amazon.awssdk.auth.signer.internal.AbstractAwsS3V4Signer- Parameters:
request- the request to sign.executionAttributes- request executionAttributes which contain the credentials.
-
getInstantiationCount
public static int getInstantiationCount() -
getInvocationCount
public static int getInvocationCount() -
description
-