package v4a

Import Path
	github.com/aws/aws-sdk-go-v2/internal/v4a (on go.dev)

Dependency Relation
	imports 30 packages, and imported by 2 packages


Package-Level Type Names (total 14, in which 12 are exported)
/* sort exporteds by: | */
Credentials is Context, ECDSA, and Optional Session Token that can be used to sign requests using SigV4a Time the credentials will expire. Context string Expires time.Time PrivateKey *ecdsa.PrivateKey SessionToken string Expired returns if the credentials have expired. HasKeys returns if the credentials keys are set. func CredentialsProvider.RetrievePrivateKey(context.Context) (Credentials, error) func (*SymmetricCredentialAdaptor).RetrievePrivateKey(ctx context.Context) (Credentials, error) func HTTPPresigner.PresignHTTP(ctx context.Context, credentials Credentials, r *http.Request, payloadHash string, service string, regionSet []string, signingTime time.Time, optFns ...func(*SignerOptions)) (url string, signedHeader http.Header, err error) func HTTPSigner.SignHTTP(ctx context.Context, credentials Credentials, r *http.Request, payloadHash string, service string, regionSet []string, signingTime time.Time, optfns ...func(*SignerOptions)) error func (*Signer).PresignHTTP(ctx context.Context, credentials Credentials, r *http.Request, payloadHash string, service string, regionSet []string, signingTime time.Time, optFns ...func(*SignerOptions)) (signedURI string, signedHeaders http.Header, err error) func (*Signer).SignHTTP(ctx context.Context, credentials Credentials, r *http.Request, payloadHash string, service string, regionSet []string, signingTime time.Time, optFns ...func(*SignerOptions)) error
CredentialsProvider is the interface for a provider to retrieve credentials to sign requests with. ( CredentialsProvider) RetrievePrivateKey(context.Context) (Credentials, error) *SymmetricCredentialAdaptor
HTTPPresigner is an interface to a SigV4a signer that can sign create a presigned URL for a HTTP requests. ( HTTPPresigner) PresignHTTP(ctx context.Context, credentials Credentials, r *http.Request, payloadHash string, service string, regionSet []string, signingTime time.Time, optFns ...func(*SignerOptions)) (url string, signedHeader http.Header, err error) *Signer
HTTPSigner is SigV4a HTTP signer implementation ( HTTPSigner) SignHTTP(ctx context.Context, credentials Credentials, r *http.Request, payloadHash string, service string, regionSet []string, signingTime time.Time, optfns ...func(*SignerOptions)) error *Signer
PresignHTTPRequestMiddleware provides the Finalize middleware for creating a presigned URL for an HTTP request. Will short circuit the middleware stack and not forward onto the next Finalize handler. HandleFinalize will take the provided input and create a presigned url for the http request using the SigV4 presign authentication scheme. ID provides the middleware ID. *PresignHTTPRequestMiddleware : github.com/aws/smithy-go/middleware.FinalizeMiddleware func NewPresignHTTPRequestMiddleware(options PresignHTTPRequestMiddlewareOptions) *PresignHTTPRequestMiddleware
PresignHTTPRequestMiddlewareOptions is the options for the PresignHTTPRequestMiddleware middleware. CredentialsProvider CredentialsProvider LogSigning bool Presigner HTTPPresigner func NewPresignHTTPRequestMiddleware(options PresignHTTPRequestMiddlewareOptions) *PresignHTTPRequestMiddleware
Signer is a SigV4a HTTP signing implementation PresignHTTP takes the provided http.Request, payload hash, service, regionSet, and time and presigns using SigV4a Returns the presigned URL along with the headers that were signed with the request. PresignHTTP will not set the expires time of the presigned request automatically. To specify the expire duration for a request add the "X-Amz-Expires" query parameter on the request with the value as the duration in seconds the presigned URL should be considered valid for. This parameter is not used by all AWS services, and is most notable used by Amazon S3 APIs. SignHTTP takes the provided http.Request, payload hash, service, regionSet, and time and signs using SigV4a. The passed in request will be modified in place. *Signer : HTTPPresigner *Signer : HTTPSigner func NewSigner(optFns ...func(*SignerOptions)) *Signer
SignerOptions is the SigV4a signing options for constructing a Signer. Disables the Signer's moving HTTP header key/value pairs from the HTTP request header to the request's query string. This is most commonly used with pre-signed requests preventing headers from being added to the request's query string. Disables the automatic escaping of the URI path of the request for the siganture's canonical string's path. For services that do not need additional escaping then use this to disable the signer escaping the path. S3 is an example of a service that does not need additional escaping. http://docs.aws.amazon.com/general/latest/gr/sigv4-create-canonical-request.html LogSigning bool Logger logging.Logger
SignHTTPRequestMiddleware is a middleware for signing an HTTP request using SigV4a. HandleFinalize signs an HTTP request using SigV4a. ID the middleware identifier. *SignHTTPRequestMiddleware : github.com/aws/smithy-go/middleware.FinalizeMiddleware func NewSignHTTPRequestMiddleware(options SignHTTPRequestMiddlewareOptions) *SignHTTPRequestMiddleware func RegisterSigningMiddleware(stack *middleware.Stack, signingMiddleware *SignHTTPRequestMiddleware) (err error)
SignHTTPRequestMiddlewareOptions is the middleware options for constructing a SignHTTPRequestMiddleware. Credentials CredentialsProvider LogSigning bool Signer HTTPSigner func NewSignHTTPRequestMiddleware(options SignHTTPRequestMiddlewareOptions) *SignHTTPRequestMiddleware
SigningError indicates an error condition occurred while performing SigV4a signing Err error (*SigningError) Error() string Unwrap returns the underlying error cause *SigningError : error
SymmetricCredentialAdaptor wraps a SigV4 AccessKey/SecretKey provider and adapts the credentials to a ECDSA PrivateKey for signing with SiV4a SymmetricProvider aws.CredentialsProvider Retrieve retrieves symmetric credentials from the underlying provider. RetrievePrivateKey returns credentials suitable for SigV4a signing *SymmetricCredentialAdaptor : CredentialsProvider *SymmetricCredentialAdaptor : github.com/aws/aws-sdk-go-v2/aws.CredentialsProvider
Package-Level Functions (total 11, in which 4 are exported)
NewPresignHTTPRequestMiddleware returns a new PresignHTTPRequestMiddleware initialized with the presigner.
NewSigner constructs a SigV4a Signer.
NewSignHTTPRequestMiddleware constructs a SignHTTPRequestMiddleware using the given SignHTTPRequestMiddlewareOptions.
RegisterSigningMiddleware registers the SigV4a signing middleware to the stack. If a signing middleware is already present, this provided middleware will be swapped. Otherwise the middleware will be added at the tail of the finalize step.
Package-Level Variables (total 3, none are exported)
Package-Level Constants (total 15, in which 3 are exported)
AmzRegionSetKey represents the region set header used for sigv4a
EmptyStringSHA256 is a hex encoded SHA-256 hash of an empty string
Version of signing v4a