-
Notifications
You must be signed in to change notification settings - Fork 107
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
Moves from Signature V2 to Signature V4 for S3 #199
Conversation
This adds the `Region` datatype, as found in DynamoDb to S3, and adds all regions as of today with a similar naming scheme, as used in DynamoDb. This change lays the basis for Signature V4 signing; it *does* break backwards compatibility!
Changes the signature method to version 4 to support the buckets in China (Beijing) or EU (Frankfurt). Fixes aristidb#167
This reverts commit cbdb8d4.
credentialV4 is useful outside of authorizationV4 as well. It is used to build the signed S3 URI link, whe the credentialV4 string is embedded in the canonical request.
|
Looks like I broke the google storage nearline example. |
This might eventually break google storage support? I'm not certain about that, and I don't have a gcs account nor did I find detailed documentation on the S3 compatibility. |
To keep compatibility with Google, maybe put a SignatureVersion field into the S3Config? Then the google config can just say "V2 signing please". |
And do I understand it correctly that you consider your pull request complete and ready for merging when you have ticked off all the checkboxes, @angerman ? |
I guess that would be optimal. Though I must admit, I don't see this getting finished soon. Especially multi-part seems to be quite tricky to get right. |
Superseded by #241 |
This PR so far adds support for:
S3.GetBucket
(not yet tested)S3.GetBucketLocation
(not yet tested)S3.PutBucket
(not yet tested)S3.DeleteBucket
(not yet tested)S3.GetService
(not yet tested)S3.HeadObject
(not yet tested)S3.GetObject
(REST)S3.GetObject
(URL)S3.PutObject
(without Content Sha256 by default)S3.Multipart
(not yet tested)S3.CopyObject
(not yet tested)S3.DeleteObject
(not yet tested)S3.DeleteObjects
(not yet tested)It additionally does:
authorizationV4
authorizationV4
signatureV4
) and Credential (credentialV4
) generation from theauthorizationV4
as these were needed separately to support the URL generation forGetObject
.It also introduces a breaking API change, as
Endpoints
are replaced byRegions
. I tried to keep these as similar to those provided inDynamoDb
.It should fix #167