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

jewel: rgw: aws4: add rgw_s3_auth_aws4_force_boto2_compat conf option #17009

Merged
merged 1 commit into from
Sep 7, 2017

Conversation

robbat2
Copy link
Contributor

@robbat2 robbat2 commented Aug 13, 2017

Runtime bugfix to handle presigned urls computed with canonical requests using
the port number once.

Boto2 computes canonical requests using the port number twice although it
should be used once only. This behaviour is a bug supported by AWS S3. Boto2 is
used in RGW S3 as reference implementation.

The client-side tools not supporting this boto2 bug will fail although they
should work too.

In order to support both presigned url implementations this patch adds a config
option to compute a second signature. With this option disabled, the code will
compute two signatures when the first signature is not valid. The aws4 auth
succeed if some of the two signatures is valid.

The config option rgw_s3_auth_aws4_force_boto2_compat, is enabled by default so
one signature, working with boto2, is computed only.

Fixes: http://tracker.ceph.com/issues/16463

Signed-off-by: Javier M. Mellid <jmunhoz@igalia.com>
(cherry picked from commit 078c513)
@robbat2 robbat2 changed the title rgw: aws4: add rgw_s3_auth_aws4_force_boto2_compat conf option jewel: rgw: aws4: add rgw_s3_auth_aws4_force_boto2_compat conf option Aug 13, 2017
@robbat2
Copy link
Contributor Author

robbat2 commented Aug 13, 2017

This is a backport needs to go into Jewel, was fixed in Kraken

@smithfarm smithfarm added this to the jewel milestone Aug 13, 2017
@yehudasa
Copy link
Member

@robbat2 as a side comment, we discussed this fix recently and it seemed to me that the logic here is reverse. The default behaviour should be the correct signature calculation and the fallback should be the buggy boto implementation. The configurable should reflect that. But as a backport to jewel this PR as it is is fine, we will need to clean up in the future.

@smithfarm
Copy link
Contributor

This passed an rgw suite at http://tracker.ceph.com/issues/20613#note-53

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

Successfully merging this pull request may close these issues.

4 participants