Table of Contents

Interface IAWSSigV4aProvider

Namespace
Amazon.Runtime.SharedInterfaces
Assembly
AWSSDK.Core.dll

Interface for an asymmetric SigV4 (SigV4a) signer

public interface IAWSSigV4aProvider

Properties

Protocol

Protocol for the requests being signed

ClientProtocol Protocol { get; }

Property Value

ClientProtocol

Methods

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

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

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.

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.

SignChunk(Stream, string, AWS4aSigningResult)

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

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.

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

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 previous chunk

headerSigningResult AWS4aSigningResult

Signing result of the request's header

Returns

string

Signature of the trailing header chunk