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

OkHttpConnector: Enforce use of TLSv1.2 to match current Github and Github Enterprise TLS support. #420

Merged
merged 1 commit into from
Mar 1, 2018

Conversation

randomvariable
Copy link
Contributor

On Feb 8, 2018, Github changed their TLS settings to be 1.2 only.
Most recent Jenkins installs are OK as Java 1.8 defaults to TLS 1.2, however some people see intermittent
or continuous failures with connecting to Github in a variety of configurations:

e.g. https://issues.jenkins-ci.org/browse/JENKINS-49761?jql=project%20%3D%20JENKINS%20AND%20component%20%3D%20github-api-plugin

This PR creates a new TLS v1.2 only SSLContext and attaches its socket factory to the urlFactory passed to OkHttpConnector, which is used by most Github plugins in Jenkins.

@oleg-nenashev
Copy link
Collaborator

CC @KostyaSha @lanwen @stephenc who maintain the dependent plugins

@KostyaSha
Copy link
Contributor

@oleg-nenashev i don't maintain it since cloudbees ....
lanwen is not maintaing github-api-plugin, there is nothing on github-plugin side

@oleg-nenashev
Copy link
Collaborator

Well, I added you to CC so that you know where to redirect the issues 🤷‍♂️

@recena
Copy link
Contributor

recena commented Mar 1, 2018

@kohsuke Do you agree if I merge this PR and cut a release?

@kohsuke kohsuke merged commit 5dfd621 into hub4j:master Mar 1, 2018
private SSLSocketFactory TlsSocketFactory() {
SSLContext sc;
try {
sc = SSLContext.getInstance("TLSv1.2");
Copy link
Contributor

@jtnord jtnord Mar 2, 2018

Choose a reason for hiding this comment

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

@randomvariable how does this affect people that are behind a HTTPS proxy where they connect to github via that proxyusing say TLS 1.1 or SSL and then the proxy does the connection. Does this lock them out as they will not be able to handshake with the proxy?

Copy link
Contributor

Choose a reason for hiding this comment

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

I guess it will affect, also people can change connector on their side AFAIR.

@holybit
Copy link

holybit commented Mar 6, 2018

Are there plans to cut a new version of the plugin?

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.

8 participants