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

An error occurred (InvalidSignatureException) when calling the InitiateMultipartUpload operation #2474

Closed
samato88 opened this issue Mar 3, 2017 · 2 comments

Comments

@samato88
Copy link

samato88 commented Mar 3, 2017

When running a script to do a multi part upload I'm getting the following error:

--

"botocore.exceptions.ClientError: An error occurred (InvalidSignatureException) when calling the InitiateMultipartUpload operation: The request signature we calculated does not match the signature you provided.

The Canonical String for this request should have been
'POST
/-/vaults/WU-Archives/multipart-uploads

host:glacier.us-west-2.amazonaws.com
x-amz-archive-description:Willamette Alumni Publications work from iArchives, Phase 007, Willamette University Alumnus October 1950 - May 1951
x-amz-date:20170303T234546Z
x-amz-glacier-version:2012-06-01
x-amz-part-size:134217728

host;x-amz-archive-description;x-amz-date;x-amz-glacier-version;x-amz-part-size
e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855'

The String-to-Sign should have been
'AWS4-HMAC-SHA256
20170303T234546Z
20170303/us-west-2/glacier/aws4_request
fd028de7687a59f9c7d7cc63dfb98d1c6123b8a0cb0c9250db042209c2003a29'

--

I've confirmed the canonical string is correct, but the string-to-sign is different. When I print the result of the auth.py string_to_sign I get:

'AWS4-HMAC-SHA256
20170303T234546Z
20170303/us-west-2/glacier/aws4_request
e5f4bc0998e1e4e0e42b53495b97dbad7342389d48fcd004b3fdb56369cf41c3'

Not sure where the problem is - am probably missing something obvious. (The script was working for several months so not sure why it would have stopped working!)

@JordonPhillips JordonPhillips added the investigating This issue is being investigated and/or work is in progress to resolve the issue. label Mar 13, 2017
@samato88
Copy link
Author

Found my problem - as far as I can tell it fails if there are two spaces in a row in the x-amz-archive-description field (!?!!) - e.g. when I try description of "blah blah" it works, but "blah blah" (with two spaces between the words) it fails. The x-amz-archive-description that is reported in the error message 'Canonical String for this request should have been' message has the extra white space stripped.

@dstufft
Copy link
Contributor

dstufft commented Mar 22, 2017

I'm fairly sure that the root cause of this is going to be the same as boto/botocore#1169, and likely be fixed inside of botocore itself. Because of that I'm going to close this issue and use the botocore issue to track this.

@dstufft dstufft closed this as completed Mar 22, 2017
@swetashre swetashre removed the investigating This issue is being investigated and/or work is in progress to resolve the issue. label Sep 3, 2019
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

4 participants