Skip to content

Bump default TLS protocol version to TLS v1.1 or v1.2 #139

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

Closed
mheath opened this issue Mar 31, 2016 · 10 comments
Closed

Bump default TLS protocol version to TLS v1.1 or v1.2 #139

mheath opened this issue Mar 31, 2016 · 10 comments

Comments

@mheath
Copy link

mheath commented Mar 31, 2016

Many Rabbit servers disable TLSv1 because of the warnings about the BEAST attack here: https://www.rabbitmq.com/ssl.html

Since TLSv1 is the default, https://github.com/rabbitmq/rabbitmq-java-client/blob/master/src/main/java/com/rabbitmq/client/ConnectionFactory.java#L85, attempting to connect to a Rabbit server with TLSv1 disabled results in a javax.net.ssl.SSLException: Received fatal alert: protocol_version exception.

Does it still make sense to make TLSv1 the default? Would it make more sense to stick with the platform default rather than set this explicitly?

@michaelklishin
Copy link
Contributor

TLS 1.1 means dropping JDK 6 compatibility. We cannot do that before Spring does.

On 31 mar 2016, at 18:45, Mike Heath [email protected] wrote:

Many Rabbit servers disable TLSv1 because of the warnings about the BEAST attack here: https://www.rabbitmq.com/ssl.html

Since TLSv1 is the default, https://github.com/rabbitmq/rabbitmq-java-client/blob/master/src/main/java/com/rabbitmq/client/ConnectionFactory.java#L85, attempting to connect to a Rabbit server with TLSv1 disabled results in a javax.net.ssl.SSLException: Received fatal alert: protocol_version exception.

Does it still make sense to make TLSv1 the default? Would it make more sense to stick with the platform default rather than set this explicitly?


You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub

@mheath
Copy link
Author

mheath commented Mar 31, 2016

I'm not suggesting TLS 1.1, per se. I'm saying that you shouldn't explicitly set the SSL protocol version by default. It's certainly something that should be configurable. Let the JDK decide what SSL protocol version should be used by default. This maintains compatibility with all the JDKs and makes it easier for users and operators to update how they use TLS as the protocol evolves.

@michaelklishin
Copy link
Contributor

There has to be a default. Relying only on 3rd parties is a recipe for support disaster for our small team. On JDK 6 it's likely SSLv3. This needs further investigation.

On 31 mar 2016, at 19:39, Mike Heath [email protected] wrote:

I'm not suggesting TLS 1.1, per se. I'm saying that you shouldn't explicitly set the SSL protocol version by default. It's certainly something that should be configurable. Let the JDK decide what SSL protocol version should be used by default. This maintains compatibility with all the JDKs and makes it easier for users and operators to update how they use TLS as the protocol evolves.


You are receiving this because you commented.
Reply to this email directly or view it on GitHub

@mheath
Copy link
Author

mheath commented Mar 31, 2016

Why does Rabbit need to specify a default SSL version to avoid "support disaster" but so many other clients don't? I haven't seen any REST clients experiencing support armageddon because they rely on the JDK SSL defaults.

On the contrary, it seems like you're opening yourself up to a support problem given that the Rabbit documentation recommends turning off TLSv1 which breaks the Java client.

@michaelklishin
Copy link
Contributor

@mheath FWIW our team does support 5 (if not 7) days a week and this is the first time it was brought up.

Anyhow, we can make the default to be TLSv1.1 on JDK versions that support it.
It's not easy to find what protocol version is used by default but looks like recent JDK 6 releases support TLSv1.1 and JDK 8 uses it by default.

Feel free to verify this.

@michaelklishin michaelklishin changed the title Update default SSL protocol Bump default TLS protocol version to TLSv1.1 Mar 31, 2016
@mheath
Copy link
Author

mheath commented Mar 31, 2016

Why not just use the JDK default like this mheath@821f4fc#diff-561180cfd014fa3a18859e3f18243f6d

If you want to tweak the TLS version used by the app, you can use the builtin system property to do so without changing your Java code (i.e. -Djdk.tls.client.protocols=TLSv1.1,TLSv1.2).

@michaelklishin
Copy link
Contributor

@mheath we can do that if JDK 6 and 7 default is at least TLSv1. Thank you for the feedback.

@mheath
Copy link
Author

mheath commented Mar 31, 2016

Here's a table with all the defaults/supported TLS versions for JDK 6, 7, and 8. https://blogs.oracle.com/java-platform-group/entry/diagnosing_tls_ssl_and_https

Thanks Michael!

@michaelklishin
Copy link
Contributor

We have a patch that sets the default to TLS v1.2 and falls back to TLS v1.0 if that version isn't supported (e.g. on JDK 6 prior to the most recent patch set). It will be submitted as a PR and QA'ed as time permits.

@michaelklishin michaelklishin changed the title Bump default TLS protocol version to TLSv1.1 Bump default TLS protocol version to TLS v1.1 or v1.2 Apr 15, 2016
@michaelklishin michaelklishin added this to the 3.7.0 milestone Apr 15, 2016
@michaelklishin michaelklishin self-assigned this Apr 15, 2016
michaelklishin pushed a commit that referenced this issue Jul 13, 2016
@michaelklishin
Copy link
Contributor

michaelklishin commented Jul 13, 2016

Finally backported this to stable, will be in 3.6.4.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants