Table of Contents

Class AWS4aSignerCRTWrapper

Namespace
Amazon.Runtime.Internal.Auth
Assembly
AWSSDK.Core.dll

Asymmetric SigV4 signer using a the AWS Common Runtime implementation of SigV4a via AWSSDK.Extensions.CrtIntegration

public class AWS4aSignerCRTWrapper : AbstractAWSSigner
Inheritance
AWS4aSignerCRTWrapper
Inherited Members

Constructors

AWS4aSignerCRTWrapper()

Instantiates an SigV4a signer using CRT's SigV4a implementation

public AWS4aSignerCRTWrapper()

AWS4aSignerCRTWrapper(bool)

Instantiates an SigV4a signer using CRT's SigV4a implementation

public AWS4aSignerCRTWrapper(bool signPayload)

Parameters

signPayload bool

Whether to sign the request's payload

Properties

Protocol

Protocol for the requests being signed

public override ClientProtocol Protocol { get; }

Property Value

ClientProtocol

Methods

Presign4a(IRequest, IClientConfig, RequestMetrics, ImmutableCredentials, string, string)

Calculates the asymmetric Sigv4 (Sigv4a) signature for a presigned url.

public AWS4aSigningResult Presign4a(IRequest request, IClientConfig clientConfig, RequestMetrics metrics, ImmutableCredentials credentials, string service, string overrideSigningRegion)

Parameters

request IRequest

The request to compute the signature for.

clientConfig IClientConfig

Adding supporting data for the service call required by the signer (notably authentication region, endpoint and service name).

metrics RequestMetrics

Metrics for the request

credentials ImmutableCredentials

The AWS credentials for the account making the service call.

service string

The service to sign for

overrideSigningRegion string

The region to sign to, if null then the region the client is configured for will be used.

Returns

AWS4aSigningResult

AWS4a Signing Result

Sign(IRequest, IClientConfig, RequestMetrics, ImmutableCredentials)

Calculates and signs the specified request using the asymmetric Sigv4 (Sigv4a) signing protocol. The resulting signature is added to the request headers as 'Authorization'. Parameters supplied in the request, either in the resource path as a query string or in the Parameters collection must not have been uri encoded. If they have, use the SignRequest method to obtain a signature.

public override void Sign(IRequest request, IClientConfig clientConfig, RequestMetrics metrics, ImmutableCredentials credentials)

Parameters

request IRequest

The request to compute the signature for. Additional headers mandated by the AWS4a protocol ('host' and 'x-amz-date') will be added to the request before signing.

clientConfig IClientConfig

Client configuration data encompassing the service call (notably authentication region, endpoint and service name).

metrics RequestMetrics

Metrics for the request

credentials ImmutableCredentials

The AWS credentials for the account making the service call.

Sign(IRequest, IClientConfig, RequestMetrics, string, string)

public override void Sign(IRequest request, IClientConfig clientConfig, RequestMetrics metrics, string awsAccessKeyId, string awsSecretAccessKey)

Parameters

request IRequest
clientConfig IClientConfig
metrics RequestMetrics
awsAccessKeyId string
awsSecretAccessKey string

SignChunk(Stream, string, AWS4aSigningResult)

Calculates the signature for a single chunk of a chunked SigV4a request

public string SignChunk(Stream chunkBody, string previousSignature, AWS4aSigningResult headerSigningResult)

Parameters

chunkBody Stream

Content of the current chunk

previousSignature string

Signature of the previous chunk

headerSigningResult AWS4aSigningResult

Signing result of the request's header

Returns

string

Unpadded SigV4a signature of the given chunk

SignRequest(IRequest, IClientConfig, RequestMetrics, ImmutableCredentials)

Calculates and signs the specified request using the asymmetric Sigv4 (Sigv4a) signing protocol. The resulting signature is added to the request headers as 'Authorization'. Parameters supplied in the request, either in the resource path as a query string or in the Parameters collection must not have been uri encoded. If they have, use the SignRequest method to obtain a signature.

public AWS4aSigningResult SignRequest(IRequest request, IClientConfig clientConfig, RequestMetrics metrics, ImmutableCredentials credentials)

Parameters

request IRequest

The request to compute the signature for. Additional headers mandated by the AWS4a protocol ('host' and 'x-amz-date') will be added to the request before signing.

clientConfig IClientConfig

Client configuration data encompassing the service call (notably authentication region, endpoint and service name).

metrics RequestMetrics

Metrics for the request

credentials ImmutableCredentials

The AWS credentials for the account making the service call.

Returns

AWS4aSigningResult

AWS4a Signing Result

SignTrailingHeaderChunk(IDictionary<string, string>, string, AWS4aSigningResult)

Signs the final chunk containing trailing headers

public string SignTrailingHeaderChunk(IDictionary<string, string> trailingHeaders, string previousSignature, AWS4aSigningResult headerSigningResult)

Parameters

trailingHeaders IDictionary<string, string>

Trailing header keys and values

previousSignature string

Signature of the previously signed chunk

headerSigningResult AWS4aSigningResult

Signing result for the "seed" signature consisting of headers

Returns

string

Signature of the trailing header chunk