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.)