Skip to content

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

Merged
kohsuke merged 1 commit into
hub4j:masterfrom
randomvariable:fix/tlsv12
Mar 1, 2018
Merged

OkHttpConnector: Enforce use of TLSv1.2 to match current Github and Github Enterprise TLS support.#420
kohsuke merged 1 commit into
hub4j:masterfrom
randomvariable:fix/tlsv12

Conversation

@randomvariable
Copy link
Copy Markdown
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
Copy Markdown
Collaborator

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

@KostyaSha
Copy link
Copy Markdown
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
Copy Markdown
Collaborator

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

@recena
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown

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