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

[ZEPPELIN-848] Add support for encrypted data stored in Amazon S3 #886

Closed
wants to merge 12 commits into from

Conversation

natesammons-nasdaq
Copy link
Contributor

What is this PR for?

Adds support for using the AWS KMS or a custom encryption materials
provider class to encrypt data stored in Amazon S3. Also a minor
improvement to logic inside the S3 notebook repo when dealing with local files.

What type of PR is it?

Improvement

What is the Jira issue?

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

How should this be tested?

Running in EMR or another system in AWS is easiest. Make appropriate changes to the config and use an AWS KMS key

Questions:

  • Does the licenses files need update? -- NO
  • Is there breaking changes for older versions? -- NO
  • Does this needs documentation? -- YES, changes in storage.md and zeppelin-site.xml.template

Adds support for using the AWS KMS or a custom encryption materials
provider class to encrypt data stored in Amazon S3.  Also a minor
improvement to logic inside the S3 notebook repo.
@natesammons-nasdaq
Copy link
Contributor Author

I'm not sure what happened with the CI build, I can't get any details about the failure. Is there anything I can do from my end?

emp = (EncryptionMaterialsProvider) empInstance;
}
else {
throw new IllegalArgumentException("Class " + empClassname + " does not implement "
Copy link
Contributor

Choose a reason for hiding this comment

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

Why not to throw IOException since constructor is already throwing it and upper layer may rely on that

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'll make this change, thanks

Catch AmazonClientException and re-throw as IOException since ACE is a
runtime exception.
NotebookServer was not logging the exception thrown when reloading
notebooks
@natesammons-nasdaq
Copy link
Contributor Author

I made changes to re-throw the AmazonClientExceptions as IOException, then made a change in NotebookServer so that the exception is logged. It looks like elsewhere exceptions are getting logged, so now S3 issues should get logged nicely.

@natesammons-nasdaq
Copy link
Contributor Author

Any updates on this?

@Leemoonsoo
Copy link
Member

@natesammons-nasdaq Thanks for useful improvement.

CI fails with error

[INFO] There are 1 checkstyle errors.
[ERROR] S3NotebookRepo.java[115] (sizes) LineLength: Line is longer than 100 characters (found 107).

Could you take care of it?

@natesammons-nasdaq
Copy link
Contributor Author

Sorry about that!

@khalidhuseynov
Copy link
Contributor

thanks for handling exceptions, LGTM. may need to re-trigger CI, although the build failure isn't related at all.

@Leemoonsoo
Copy link
Member

While all build profile failed for last commit with some network issue, It's good idea to re-trigger CI and see how it goes. @natesammons-nasdaq could you retrigger CI? you can do it by either close->reopen this pullrequest or add more commits.

@natesammons-nasdaq
Copy link
Contributor Author

natesammons-nasdaq commented May 18, 2016

Sure, I'll try that. I haven't been able to see any build status yet, they all appear to fail with a timeout under Travis. ?

[edit] nevermind, I see build status going now. Might be some corporate network shenanigans, as I can see status just fine from home.

Sent from my iPhone

On May 17, 2016, at 8:25 PM, Lee moon soo <notifications@github.commailto:notifications@github.com> wrote:

While all build profile failedhttps://travis-ci.org/apache/incubator-zeppelin/builds/130849266 for last commit with some network issue, It's good idea to re-trigger CI and see how it goes. @natesammons-nasdaqhttps://github.com/natesammons-nasdaq could you retrigger CI? you can do it by either close->reopen this pullrequest or add more commits.

You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHubhttps://github.com//pull/886#issuecomment-219908546


CONFIDENTIALITY NOTICE: This e-mail and any attachments are for the exclusive and confidential use of the intended recipient and may constitute non-public information. If you received this e-mail in error, disclosing, copying, distributing or taking any action in reliance of this e-mail is strictly prohibited and may be unlawful. Instead, please notify us immediately by return e-mail and promptly delete this message and its attachments from your computer system. We do not waive any work product or other applicable legal privilege(s) by the transmission of this message.


@natesammons-nasdaq
Copy link
Contributor Author

Closing request to re-open it

@natesammons-nasdaq
Copy link
Contributor Author

Re-opening to trigger CI

@natesammons-nasdaq
Copy link
Contributor Author

Build is still failing with the following:

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-remote-resources-plugin:1.4:process (default) on project zeppelin: Error downloading resources archive. Could not transfer artifact org.apache.apache.resources:apache-jar-resource-bundle:jar:1.5-SNAPSHOT from/to apache-snapshots (https://repository.apache.org/snapshots/): Failed to transfer file: https://repository.apache.org/snapshots/org/apache/apache/resources/apache-jar-resource-bundle/1.5-SNAPSHOT/apache-jar-resource-bundle-1.5-SNAPSHOT.jar. Return code is: 503 , ReasonPhrase:Service Unavailable.

I had issues getting this artifact when building locally as well, I think I ended up just manually adding it to the local maven repo

@Leemoonsoo
Copy link
Member

I think there were some problem on "repository.apache.org" and i believe now it is stable. @natesammons-nasdaq Could you try once again re-trigger the CI?

@natesammons-nasdaq
Copy link
Contributor Author

Merged changes to trigger another build

@natesammons-nasdaq
Copy link
Contributor Author

I looked at the latest failure, not sure what the cause is. Looks like:

Tests run: 6, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 81.399 sec <<< FAILURE! - in org.apache.zeppelin.rest.ZeppelinSparkClusterTest
basicRDDTransformationAndActionTest(org.apache.zeppelin.rest.ZeppelinSparkClusterTest) Time elapsed: 51.993 sec <<< FAILURE!
java.lang.AssertionError: expected: but was:
at org.junit.Assert.fail(Assert.java:88)
at org.junit.Assert.failNotEquals(Assert.java:743)
at org.junit.Assert.assertEquals(Assert.java:118)
at org.junit.Assert.assertEquals(Assert.java:144)
at org.apache.zeppelin.rest.ZeppelinSparkClusterTest.basicRDDTransformationAndActionTest(ZeppelinSparkClusterTest.java:81)

@natesammons-nasdaq
Copy link
Contributor Author

natesammons-nasdaq commented May 19, 2016

Looks like the last build passed!

@natesammons-nasdaq
Copy link
Contributor Author

Is there anything else I need to do from my end? Thanks

@Leemoonsoo
Copy link
Member

Tested and working well for me.

One more thing, could you add new env variables and properties to https://github.com/apache/incubator-zeppelin/blob/master/docs/install/install.md#zeppelin-configuration ?

Add S3 encryption documentation to the config section in install.md
@natesammons-nasdaq
Copy link
Contributor Author

The build is still failing, looks like a selenium test. Any ideas?

@natesammons-nasdaq
Copy link
Contributor Author

Hmmm, still failing with a FF selenium test

@natesammons-nasdaq
Copy link
Contributor Author

Travis build is still failing. Not sure what to do as I am pretty confident that it is unrelated.

@Leemoonsoo
Copy link
Member

Thanks @natesammons-nasdaq for the improvement! CI failure is unrelated to this change and tracked by https://issues.apache.org/jira/browse/ZEPPELIN-878

LGTM and merge if there're no more discussions

@natesammons-nasdaq
Copy link
Contributor Author

Thanks! Very happy to contribute to this project!

@bzz
Copy link
Member

bzz commented May 26, 2016

Great stuff!

CI has been recently fixed on latest master, @natesammons-nasdaq could you please rebase and see if that helps?

@natesammons-nasdaq
Copy link
Contributor Author

Looks like the tests are passing now! Nice

@asfgit asfgit closed this in db69e92 May 26, 2016
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.

5 participants