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

SPARK-3883 SSL support for HttpServer and Akka #2739

Closed

Conversation

jacek-lewandowski
Copy link
Contributor

  • Introduced SSLOptions object
  • SSLOptions is created by SecurityManager
  • SSLOptions configures Akka and Jetty to use SSL
  • SSLOptions uses property file which is node-local to set SSL settings
  • Provided utility methods to determine the proper Akka protocol for Akka requests and to configure SSL socket factory for URL connections
  • Added tests cases for AkkaUtils, FileServer, SSLOptions and SecurityManager

 - Introduced SSLOptions object
 - SSLOptions is created by SecurityManager
 - SSLOptions configures Akka and Jetty to use SSL
 - SSLOptions uses property file which is node-local to set SSL settings
 - Provided utility methods to determine the proper Akka protocol for Akka requests and to configure SSL socket factory for URL connections
 - Added tests cases for AkkaUtils, FileServer, SSLOptions and SecurityManager
@AmplabJenkins
Copy link

Can one of the admins verify this patch?

1 similar comment
@AmplabJenkins
Copy link

Can one of the admins verify this patch?

@JoshRosen
Copy link
Contributor

#1980 is a PR to add SSL to the web UI, which might benefit from SSLOptions. Do you want to comment on that PR's strategy for configuration, etc?

@jacek-lewandowski
Copy link
Contributor Author

I'll go through the discussion and changes in that ticket tomorrow morning, thanks

@@ -0,0 +1,27 @@
#
# Licensed to the Apache Software Foundation (ASF) under one or more
Copy link
Contributor

Choose a reason for hiding this comment

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

Not an expert at Apache licensing, but other config files in conf/ don't have a license header.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ok, I'll remove it

@vanzin
Copy link
Contributor

vanzin commented Oct 16, 2014

Hi @jacek-lewandowski, I like this because it's trying to support more than just the Web UI, but I think the configuration handling is sort of confusing and overengineered. Feels like a simpler approach based on "all configuration goes through SparkConf" would be much simpler to handle and maintain (both in the code and by admins deploying Spark). What do you think?

@jacek-lewandowski
Copy link
Contributor Author

Thanks for review @vanzin
I will read all your comments soon, probably during a weekend... currently a little bit overloaded

@jacek-lewandowski
Copy link
Contributor Author

btw. @vanzin how to make Jenkins run the tests on this branch?

@vanzin
Copy link
Contributor

vanzin commented Oct 23, 2014

Let me see if I can trigger tests for you - otherwise an admin will have to intervene.

Also, let me think about the configuration thing some more. To be frank, I'm not really that concerned about the Master/Worker configuration, I think those are not that interesting; I'm way more interested in applications using SSL, since that's when you're passing potentially sensitive data around.

@vanzin
Copy link
Contributor

vanzin commented Oct 23, 2014

Jenkins, test this please.

@vanzin
Copy link
Contributor

vanzin commented Oct 23, 2014

(Seems like that only works for my own PRs, so this will probably need an admin to trigger tests for you...)

@jacek-lewandowski
Copy link
Contributor Author

I suppose that this is because this pr is not against the master branch

@jacek-lewandowski
Copy link
Contributor Author

@vanzin This PR doesn't secure data transfers anyway, because Spark uses raw communication to exchange the real data. This is intended to secure mainly control messages, JARS, application settings, like command line arguments and Spark configuration, because they may include passwords to access third party data sources from executors.

@JoshRosen
Copy link
Contributor

Jenkins, this is ok to test. Jenkins, retest this please.

@SparkQA
Copy link

SparkQA commented Oct 23, 2014

QA tests have started for PR 2739 at commit fcc3d29.

  • This patch merges cleanly.

@SparkQA
Copy link

SparkQA commented Oct 23, 2014

QA tests have finished for PR 2739 at commit fcc3d29.

  • This patch fails unit tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@AmplabJenkins
Copy link

Test FAILed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/22051/
Test FAILed.

@vanzin
Copy link
Contributor

vanzin commented Oct 23, 2014

There's still sensitive data that may go in control messages; e.g., IIRC broadcasts go through akka, and those may include things like Hadoop job configuration and delegation tokens. Anyway, I know there are more channels that might need securing, but it's ok to treat those separately. Having a common SSL configuration infrastructure is a good first start.

@jacek-lewandowski
Copy link
Contributor Author

@JoshRosen will it be retested automatically after commit ?

@SparkQA
Copy link

SparkQA commented Oct 23, 2014

QA tests have finished for PR 2739 at commit 77591cb.

  • This patch fails unit tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@AmplabJenkins
Copy link

Test FAILed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/22079/
Test FAILed.

@jacek-lewandowski
Copy link
Contributor Author

@vanzin fyi:

=========================================================================
Running Apache RAT checks
=========================================================================
Attempting to fetch rat
Launching rat from /home/jenkins/workspace/SparkPullRequestBuilder/lib/apache-rat-0.10.jar
Could not find Apache license headers in the following files:
 !????? /home/jenkins/workspace/SparkPullRequestBuilder/conf/ssl.conf.template

@vanzin
Copy link
Contributor

vanzin commented Oct 23, 2014

You may want to add that file to .rat-excludes (unless you plan to rework this on top of master and get rid of the file altogether :-)).

@SparkQA
Copy link

SparkQA commented Oct 23, 2014

QA tests have started for PR 2739 at commit f24d854.

  • This patch merges cleanly.

@SparkQA
Copy link

SparkQA commented Oct 23, 2014

QA tests have finished for PR 2739 at commit f24d854.

  • This patch fails unit tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@AmplabJenkins
Copy link

Test FAILed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/22080/
Test FAILed.

@JoshRosen
Copy link
Contributor

Hi @jacek-lewandowski,

Do you mind re-opening this pull request against the master branch, since this is targeted for 1.2?

@tgravescs
Copy link
Contributor

Please also update the documentation. docs/security.md and the big comment header at the top of SecurityManager.scala

@pwendell
Copy link
Contributor

@jacek-lewandowski do you have any sense of when you'll be able to do this? It would be great to get this into master soon!

@vanzin
Copy link
Contributor

vanzin commented Nov 19, 2014

@jacek-lewandowski are you still working on this? If you don't plan to continue working on this I'd like to pick it up. Thanks!

@jacek-lewandowski
Copy link
Contributor Author

Back to working on this... I've rebased against branch-1.2 and then I'll rebase against master if you want.

@vanzin
Copy link
Contributor

vanzin commented Dec 2, 2014

@jacek-lewandowski please work on top of master. We can work on backporting it to branch-1.2 if there's a strong desire for it, but new features should always be checked into master first.

@jacek-lewandowski
Copy link
Contributor Author

@vanzin already did that. Now I'm running tests - is there a new procedure for testing? Or just sbt clean assembly test?

I can see one test failure which I can reproduce on master as well.

@vanzin
Copy link
Contributor

vanzin commented Dec 2, 2014

I think dev/run-tests will run more comprehensive checks. Also, always a good idea to try such a thing yourself on real jobs, aside from the unit tests. :-)

You'll probably need to open a new PR, I don't think Github allows you to change the target branch.

@jacek-lewandowski
Copy link
Contributor Author

@vanzin yeah, thats right
I tried running the real jobs before rebasing and they worked :)

@jacek-lewandowski
Copy link
Contributor Author

I still have got one test failing:

[info] InputOutputMetricsSuite:
[info] - input metrics when reading text file with single split (34 milliseconds)
[info] - input metrics when reading text file with multiple splits *** FAILED *** (5 seconds, 250 milliseconds)
...  had length 3438 instead of expected length 2 (InputOutputMetricsSuite.scala:78)

It fails on master and on my branch - do you know about it - it looks to me as a broken test case. Can you confirm?

@vanzin
Copy link
Contributor

vanzin commented Dec 2, 2014

If you don't believe it's your fault, it will be much easier to help if you create the new PR and an admin triggers a jenkins job to test it. Then we can see whether it's a flaky test or a result of your code.

@pwendell
Copy link
Contributor

pwendell commented Dec 2, 2014

Jenkins, test this please.

@SparkQA
Copy link

SparkQA commented Dec 2, 2014

QA tests have started for PR 2739 at commit f24d854.

  • This patch merges cleanly.

@pwendell
Copy link
Contributor

pwendell commented Dec 2, 2014

Oh yeah - this is still against 1.1. @jacek-lewandowski can you open a new PR and close this one?

@SparkQA
Copy link

SparkQA commented Dec 3, 2014

QA tests have finished for PR 2739 at commit f24d854.

  • This patch fails unit tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@AmplabJenkins
Copy link

Test FAILed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/24059/
Test FAILed.

@jacek-lewandowski
Copy link
Contributor Author

Here is the new PR #3571

@jacek-lewandowski
Copy link
Contributor Author

So - can I close this one?

@vanzin
Copy link
Contributor

vanzin commented Dec 3, 2014

Yes please.

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.

7 participants