
software.amazon.awssdk.authcrt.signer.AwsCrtS3V4aSigner Maven / Gradle / Ivy
/*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
package software.amazon.awssdk.authcrt.signer;
import software.amazon.awssdk.annotations.Immutable;
import software.amazon.awssdk.annotations.SdkPublicApi;
import software.amazon.awssdk.annotations.ThreadSafe;
import software.amazon.awssdk.authcrt.signer.internal.DefaultAwsCrtS3V4aSigner;
import software.amazon.awssdk.core.signer.Presigner;
import software.amazon.awssdk.core.signer.Signer;
import software.amazon.awssdk.regions.RegionScope;
/**
* Enables signing and presigning for S3 using Sigv4a (Asymmetric Sigv4) through an external API call to the AWS CRT
* (Common RunTime) library.
* S3 signing specifics
* For S3, the header "x-amz-sha256" must always be set for a request.
*
* S3 signs the payload signing if:
*
* - there's a body and an insecure protocol (HTTP) is used.
* - explicitly asked to via configuration/interceptor.
*
* Otherwise, the body hash value will be UNSIGNED-PAYLOAD.
*
* See
* Amazon S3 Sigv4 documentation for more detailed information.
*/
@SdkPublicApi
@Immutable
@ThreadSafe
public interface AwsCrtS3V4aSigner extends Signer, Presigner {
/**
* Create a default AwsS34aSigner.
*/
static AwsCrtS3V4aSigner create() {
return DefaultAwsCrtS3V4aSigner.create();
}
static Builder builder() {
return DefaultAwsCrtS3V4aSigner.builder();
}
interface Builder {
/**
* The region scope that this signer will default to if not provided explicitly when the signer is invoked.
*
* @param defaultRegionScope The default region scope.
* @return This builder for method chaining.
*/
Builder defaultRegionScope(RegionScope defaultRegionScope);
AwsCrtS3V4aSigner build();
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy