Expand description
AWS Signature Version 4, the subset Route53 needs: no unsigned payload,
and headers limited to host, x-amz-date and (when present)
x-amz-security-token.
See https://docs.aws.amazon.com/IAM/latest/UserGuide/create-signed-request.html for the algorithm this implements. Each step is a function of its own, and the tests check each against AWSβs published answers.
StructsΒ§
- Request π
- The request
signsigns. - Scope π
- The region and service a signature is scoped to.
- Signed π
ConstantsΒ§
- ROUTE53 π
- Route53 is a global service; every request is signed against this fixed region regardless of where the caller runs.
FunctionsΒ§
- canonical_
query π - canonical_
request π - The canonical request.
headersare the headers the signature covers, each name in lower case, in any order. - encode_
path π - hex_
sha256 π - hmac_
bytes π - host_
header π - sign π
- Signs
requestover the headersHttpTransportsends with it:host,x-amz-dateand, for a temporary credential,x-amz-security-token. - signature π
- The signature: an HMAC of the string to sign, under a key derived from the secret, the date and the scope.
- signed_
headers π - The
SignedHeaderslist: every name inheaders, sorted. - string_
to_ πsign - The string to sign: the algorithm, the moment, the credential scope and the canonical requestβs hash.
- uri_
encode π - AWSβs URI-encoding rules: unreserved characters pass through
unescaped,
/is left alone in a path, everything else becomes uppercase-hex%XX.