aws4
aws4 copied to clipboard
Creates invalid signature on windows
trafficstars
I'm running into a problem where the same piece of code works on a Mac, but not in Windows, where, instead, I receive responses like this from AWS:
<?xml version="1.0"?>
<ErrorResponse xmlns="http://queue.amazonaws.com/doc/2012-11-05/">
<Error>
<Type>Sender</Type>
<Code>SignatureDoesNotMatch</Code>
<Message>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.
The Canonical String for this request should have been
'POST
/800882120981/myqueue/
content-type:application/x-www-form-urlencoded; charset=utf-8
date:20130226T192330Z
host:sqs.us-east-1.amazonaws.com
content-type;date;host
9f4acb0e3b762fca48743cd0add5c3c6e8dd52e81604d9f3dfd77bcb349b3ccc'
The String-to-Sign should have been
'AWS4-HMAC-SHA256
20130226T192330Z
20130226/us-east-1/sqs/aws4_request
e23735524813008fd4b67d4e22b5378edd25c5411f9adc078afe0a32d5e475d9'
</Message>
<Detail/>
</Error>
<RequestId>fd8d8ca2-af3d-5ae8-bf95-a2ce26917f29</RequestId>
</ErrorResponse>
I'm stymied. Will try to submit an example that shows how to reproduce. In the mean time, would love to know if anybody else has (or does not have) this problem.
Fixed in pull request / issue-5