Bug #12917
closedRGW does not support absolute URI
0%
Description
When using goamz as the sdk to access rgw, it will fail. It is because that goamz send absoluteURI to RGW, It is similar to this issue. For rgw, there are different failure reasons between civetweb and Apache as the frontend. They are described as below:
For civetweb:
civetweb does not support the resolving of absoluteURI, so it will fail very quickly with a "400 bad request error". I have made a issue here to civetweb.
For Apache:
Apache will transfer the absoluteURI to rgw, but when doing the authorization, rgw will use the absoluteURI as the input for calculating the signature, so it wont match the signature get from client's request(which is calculated depended on general URI). So it will fail while doing authorization.
With apache as the frontend, I have hacked the source code of rgw, which adjust the req_info::request_uri to abs_path. So the following reference to the req_info::request_uri will get the right value, so as the input for calculating the signature of server side. It works well!
As far as I know, many languages's S3 sdk calculate the client side's signature using abs_path(I have tried Python, Java, Perl, Go). So in my opinion, adjusting the req_info::request_uri to fix this issue is a right way, but I am not sure if it will influence any other part.
If you have any point please feel free to let me know.
Thanks
Updated by Wenjun Huang over 8 years ago
I have made a pull request for my fix: https://github.com/ceph/ceph/pull/5774
Updated by Abhishek Lekshmanan about 8 years ago
Upstream PR: https://github.com/ceph/ceph/pull/7675
Updated by Abhishek Lekshmanan about 8 years ago
- Status changed from New to Resolved
Updated by Abhishek Lekshmanan about 8 years ago
- Status changed from Resolved to Fix Under Review
- Assignee set to Matt Benjamin
This might need a backport.. changing to need Review..
Updated by Nathan Cutler about 8 years ago
- Related to Bug #15231: radosgw returning 400 bad URI added
Updated by Nathan Cutler about 8 years ago
- Related to deleted (Bug #15231: radosgw returning 400 bad URI)
Updated by Nathan Cutler about 8 years ago
- Has duplicate Bug #15231: radosgw returning 400 bad URI added
Updated by Yehuda Sadeh about 8 years ago
- Status changed from Fix Under Review to Resolved
merged in here: https://github.com/ceph/ceph/pull/7675