Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Header x-amz-date vs. signing key amz-date #7

Closed
USSRLivesOn opened this issue Nov 25, 2015 · 2 comments
Closed

Header x-amz-date vs. signing key amz-date #7

USSRLivesOn opened this issue Nov 25, 2015 · 2 comments

Comments

@USSRLivesOn
Copy link
Contributor

I started using this library yesterday, but was getting this error from AWS earlier today:

{"message":"Date in Credential scope does not match YYYYMMDD from ISO-8601 version of date from HTTP: \'20151124\' != \'20151125\', from \'20151125T154140Z\'."}

I believe what's happening is that AWS4Auth has amz_date set on AWS4SigningKey at initialization time, but the x-amz-date header is set at every request. If the AWS4Auth object is persisted across a change in dates (e.g., if it is a global object), the dates in the signing key and the header will eventually not match, resulting in the error above.

This may be by design (or maybe I'm misunderstanding the issue entirely), and I've resolved the issue by re-generating the AWS4Auth object for every connection, but I wanted to identify it in case this isn't by design.

@USSRLivesOn
Copy link
Contributor Author

Nevermind, I just realized this is an exact duplicate of #3. I hope that can be merged soon! Closing.

@sam-washington
Copy link
Collaborator

Version 0.8 has now been released on PyPi which addresses this issue - the AWS4Auth class now automatically regenerates its key with the request date when the scope date and request date don't match.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants