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

Update building-with-maven.md #2102

Closed
wants to merge 5 commits into from
Closed

Update building-with-maven.md #2102

wants to merge 5 commits into from

Conversation

loachli
Copy link

@loachli loachli commented Aug 23, 2014

Support building spark under http proxy environment

Support building spark under http proxy environment
@AmplabJenkins
Copy link

Can one of the admins verify this patch?

@loachli
Copy link
Author

loachli commented Aug 23, 2014

I have create SPARK-3191(https://issues.apache.org/jira/browse/SPARK-3191) to describe this issues detailly


Sometimes,spark need be built in http proxy environment, We recommend the following settings:

mvn -Pyarn -Phadoop-2.2 -Dhadoop.version=2.2.0 -Dmaven.wagon.http.ssl.insecure=true -Dmaven.wagon.http.ssl.allowall=true -DskipTests clean package
Copy link
Member

Choose a reason for hiding this comment

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

I'm not sure this resolves proxy problems. It may resolve a particular issue wherein your network proxy is breaking SSL connections, but is not how you configure proxies. See http://maven.apache.org/guides/mini/guide-proxies.html

Attacks are very rare, but if someone were trying to inject a bad binary into your build, this would invite users to explicitly ignore that warning sign. So I disagree that this is something all users should use when using a proxy.

The yarn profile and so on are not related, just the two maven.wagon settings. The error message you quote does not contain the type of failure you would see, which is a "could not resolve dependencies" error. Finally, there are punctuation and capitalization problems, like "http".

I don't think this should be added.

@pwendell
Copy link
Contributor

Hey @loachli - thanks for looking into this. I don't think we can advise users to disable security settings for their maven build. Does your proxy support HTTPS?

@loachli
Copy link
Author

loachli commented Aug 23, 2014

hey @pwendell , thanks for your comments- Yes, my proxy support https.

I had used no-proxy open environment before. In order to support more people using spark, I have to move spark environment into my company's inner environment. For security reason, I have to use http-proxy provided by my company to access network.
When I used spark in my company's inner environment, I could not compile spark successfully.
Because the maven's error hint was not obvious, I spent much time solving this problem.

You can find the definition of these two parameters in http://maven.apache.org/wagon/wagon-providers/wagon-http/
"maven.wagon.http.ssl.insecure = true/false (default false), enable/disable use of relaxed ssl check for user generated certificates.
maven.wagon.http.ssl.allowall = true/false (default false), enable/disable match of the server's X.509 certificate with hostname. If disabled, a browser like check will be used."

I believe, this issue will be met by others in the future when they use http-proxy environment.

I still think we could add this hint to the document because the attack is very rare when someone use pom.xml provided by spark. One optional way is that I could add risk warnig when using these parameters. Do you agree?

@loachli
Copy link
Author

loachli commented Aug 23, 2014

Hey @srowen, thanks a lot for your detailed comment.
this is my configuration

lzb
true
http
user
password
proxy.company.com
8080
*.company.com

This configuration is same as the content in the link provided by you
I agree with you that the attack is very rare, especially when I use pom.xml provided by spark

If my suggestion could be accepted, I can reorganized my documents to meet requirements

@loachli loachli closed this Aug 28, 2014
@loachli loachli reopened this Aug 28, 2014
@AmplabJenkins
Copy link

Can one of the admins verify this patch?

@loachli
Copy link
Author

loachli commented Aug 28, 2014

I have reorganized my documents to meet requriments. If you don't set this, make-distribution.sh cann't be run properly too

@pwendell
Copy link
Contributor

Can you create a JIRA for this issue? I'm going to re-word this a bit when I merge it, I think it's fine to say that certain users have reported issues building behind proxies without disabling security - and have a clear warning that this, indeed, disables security. Anyways I can fix-up the wording if you create a JIRA for it.

@loachli
Copy link
Author

loachli commented Sep 1, 2014

I have created SPARK-3191(https://issues.apache.org/jira/browse/SPARK-3191) for it. Do you think it is enough for this PR?

@SparkQA
Copy link

SparkQA commented Sep 5, 2014

Can one of the admins verify this patch?

@pwendell
Copy link
Contributor

Hi there - I thought a bit more about this and I think we probably shouldn't explicitly tell users to disable security settings. I've never heard of a user report this issue before - so it doesn't seem super common, even for users building behind proxies (which I know many people do). However, let's do this. If we have other users report this issue again, we can add something to the docs and we'll use this patch as a starting point. So let's close this issue for now and re-open it later if necessary.

@asfgit asfgit closed this in 227488d Nov 10, 2014
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