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

Add AWS SSE support on a per request basis #3

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

jayholman
Copy link

This adds support for setting an SSE pattern on each object request. It is expect that SSE is set on the s3Store and it is then applied during the multipart upload and put requests sent to s3. A valid SSE pattern must be provided based on the AWS Documentation. If no value is provided, SSE is not added to the request and it works the same as it did before.

Copy link
Member

@acj acj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Couple of suggestions to get this ready to contribute upstream. The rest lgtm 👍

@@ -156,6 +156,7 @@ type S3Store struct {
// CPU, so it might be desirable to disable them.
// Note that this property is experimental and might be removed in the future!
DisableContentHashes bool
SSEPattern string
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
SSEPattern string
// SSEPattern is the the server-side encryption algorithm to use when new objects
// are created in S3 (for example, AES256, aws:kms). An empty string ("", the
// default value) will disable SSE.
SSEPattern string


assert.Equal("bucket", store.Bucket)
assert.Equal(s3obj, store.Service)
assert.Equal(sSEPattern, store.SSEPattern)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd suggest leaving this one out since you just set it a few lines earlier, and you haven't run any operations on the store since then.

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

Successfully merging this pull request may close these issues.

3 participants