Skip to content

[ZEPPELIN-1465] Add an option to allow S3 server-side encryption#1969

Closed
jeff-cyft wants to merge 2 commits into
apache:masterfrom
jeff-cyft:s3_sse
Closed

[ZEPPELIN-1465] Add an option to allow S3 server-side encryption#1969
jeff-cyft wants to merge 2 commits into
apache:masterfrom
jeff-cyft:s3_sse

Conversation

@jeff-cyft
Copy link
Copy Markdown
Contributor

What is this PR for?

Provide a configuration option that will cause the S3 Notebook repo to request server-side encryption of saved notebooks.

What type of PR is it?

Improvement

What is the Jira issue?

https://issues.apache.org/jira/browse/ZEPPELIN-1465

How should this be tested?

Enable the configuration option, save a notebook in zeppelin, and confirm in the AWS S3 Console that the related file was saved with AES-256 encryption on the server-side. (Properties tab, Detail section)

Questions:

  • Does the licenses files need update?
    No

  • Is there breaking changes for older versions?
    No.

  • Does this needs documentation?
    I added mentions of the new option in existing documentation.

Thank you!

@Leemoonsoo
Copy link
Copy Markdown
Member

Thanks @jeff-cyft for the contribution!
LGTM and merge to master if no further discussions

if (useServerSideEncryption) {
// Request server-side encryption.
ObjectMetadata objectMetadata = new ObjectMetadata();
objectMetadata.setSSEAlgorithm(ObjectMetadata.AES_256_SERVER_SIDE_ENCRYPTION);
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

very minor q: should SSEAlogrithm be configurable too?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

it's a good question.

  1. There is currently only the one documented valid option. http://docs.aws.amazon.com/AWSJavaSDK/latest/javadoc/com/amazonaws/services/s3/model/ObjectMetadata.html
  2. There's no enumeration in the API that can be searched by String so in the future this code would need amendment anyway to support potential new options. I thought about letting the zeppelin configurer specify any string they'd like but it seemed error-prone to expect someone configuring zeppelin to be aware of constant string literals in the S3 Java API.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

great! thanks for the details!

@felixcheung
Copy link
Copy Markdown
Member

LGTM

@asfgit asfgit closed this in 5bb38c8 Feb 5, 2017
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