pub enum SignatureError {
    ExpiredToken(String),
    IO(IOError),
    InternalServiceError(Box<dyn Error + Send + Sync>),
    InvalidBodyEncoding(String),
    InvalidClientTokenId(String),
    InvalidContentType(String),
    InvalidRequestMethod(String),
    IncompleteSignature(String),
    InvalidURIPath(String),
    MalformedQueryString(String),
    MissingAuthenticationToken(String),
    SignatureDoesNotMatch(Option<String>),
}
Expand description

Error returned when an attempt at validating an AWS SigV4 signature fails.

Variants

ExpiredToken(String)

The security token included with the request is expired.

IO(IOError)

Validation failed due to an underlying I/O error.

InternalServiceError(Box<dyn Error + Send + Sync>)

Validation failed due to an internal service error.

InvalidBodyEncoding(String)

The request body used an unsupported character set encoding. Currently only UTF-8 is supported.

InvalidClientTokenId(String)

The AWS access key provided does not exist in our records.

InvalidContentType(String)

The content-type of the request is unsupported.

InvalidRequestMethod(String)

Invalid request method.

IncompleteSignature(String)

The request signature does not conform to AWS standards. Sample messages:
Authorization header requires 'Credential' parameter. Authorization=...
Authorization header requires existence of either a 'X-Amz-Date' or a 'Date' header.
Date must be in ISO-8601 'basic format'. Got '...'. See http://en.wikipedia.org/wiki/ISO_8601
Unsupported AWS 'algorithm': 'AWS4-HMAC-SHA512'

InvalidURIPath(String)

The URI path includes invalid components. This can be a malformed hex encoding (e.g. %0J), a non-absolute URI path (foo/bar), or a URI path that attempts to navigate above the root (/x/../../../y).

MalformedQueryString(String)

A query parameter was malformed – the value could not be decoded as UTF-8, or the parameter was empty and this is not allowed (e.g. a signature parameter), or the parameter could not be parsed (e.g., the X-Amz-Date parameter is not a valid date).

Incomplete trailing escape % sequence

MissingAuthenticationToken(String)

The request must contain either a valid (registered) AWS access key ID or X.509 certificate. Sample messages:
Request is missing Authentication Token

SignatureDoesNotMatch(Option<String>)

Signature did not match the calculated signature value. Example messages:
The request signature we calculated does not match the signature you provided. Check your AWS Secret Access Key and signing method. Consult the service documentation for details.
Signature expired: 20210502T144040Z is now earlier than 20210502T173143Z (20210502T174643Z - 15 min.)
Signature not yet current: 20210502T183640Z is still later than 20210502T175140Z (20210502T173640Z + 15 min.)

Trait Implementations

Formats the value using the given formatter. Read more
Formats the value using the given formatter. Read more
The lower-level source of this error, if any. Read more
👎Deprecated since 1.42.0: use the Display impl or to_string()
👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type based access to context intended for error reports. Read more
Converts to this type from the input type.
Converts to this type from the input type.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

🔬This is a nightly-only experimental API. (provide_any)
Data providers should implement this method to provide all values they are able to provide by using demand. Read more
Converts the given value to a String. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.