Skip to main content

Module sigv2

Module sigv2 

Source
Expand description

AWS Signature Version 2 verification.

SigV2 is an older signing mechanism that uses HMAC-SHA1. The Authorization header has the format:

AWS <AWSAccessKeyId>:<Signature>

Where Signature = Base64(HMAC-SHA1(SecretKey, StringToSign)) and:

StringToSign = HTTP-Verb + "\n" +
               Content-MD5 + "\n" +
               Content-Type + "\n" +
               Date + "\n" +
               CanonicalizedAmzHeaders +
               CanonicalizedResource

Functionsยง

is_sigv2
Check whether the Authorization header uses SigV2 format (AWS AKID:sig).
verify_sigv2
Verify an AWS SigV2-signed HTTP request.