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

S3 Presigned Put URL With SSE Regression #1556

Closed
mcgalcode opened this issue Jul 22, 2017 · 1 comment
Closed

S3 Presigned Put URL With SSE Regression #1556

mcgalcode opened this issue Jul 22, 2017 · 1 comment

Comments

@mcgalcode
Copy link

mcgalcode commented Jul 22, 2017

I am experiencing behavior outlined in this issue using the most recent version Release v2.10.15 - 2017-07-20 of the SDK

Specifically, I am generating presigned PUT urls with the #presigned_url method and passing it the server_side_encryption: "AES256" option and the acl: "private" option.

This is generating URLs with this parameter in the query string

X-Amz-SignedHeaders\=host\&x-amz-acl\=private\&x-amz-server-side-encryption\=AES256\

These URLs return an error with "unsigned header present" in the message when I include the x-amz-server-side-encryption and the header in my request to the URL.

<Message>There were headers present in the request which were not signed</Message>
<HeadersNotSigned>x-amz-server-side-encryption,x-amz-acl</HeadersNotSigned>

If it's helpful, the same options passed to the Java SDK result in a query string with that same parameter formatted this way:

X-Amz-SignedHeaders=host%3Bx-amz-server-side-encryption%3Bx-amz-acl

The URL with the above formatting works as expected.

This suggests to me that including that parameter somehow breaks the presigning algorithm.

@cjyclaire
Copy link
Contributor

Appreciate the feedback! So this is the same issue in the refer, long story short, it's a issue in S3 side, S3 should have check query string only, yet it's still checking both signed headers and headers in the request.

However, fixing that will break existing customers. The querystring itself doesn't have a problem, temporary workaround would be using the aws-sigv4 gem as mentioned in the issue (allows custom header signing and headers in requests). Also I'll count your feedback a +1 for the enhancement in S3 presign feature : )

Tracked in at feature backlog, closing.

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

3 participants