Java client cannot connect over TLS to a 4.1.0 with pre-existing greatly restricted TLS configuration #13864
-
Describe the bugConnection from java client application to RabbitMQ node worked fine After upgrading to version 4.1.0 with Erlang 27.3.3 (Zero dependency Erlang/OTP 27.3.3 ) Info about my config and testing with openssl Server CONFIG RabbitMQ 4.1.0 using plugin: rabbitmq_auth_mechanism_ssl ==> auth_mechanisms.1 = EXTERNA Client CONFIG Java Client: com.rabbitmq:amqp-client:5.24 code ... factory.setSaslConfig(DefaultSaslConfig.EXTERNAL); Result from testing tls connection:: openssl s_client -connect myrabbitmq:5671 -tls1_2WITH version 3.13.7 with Erlang 26.2.5.11
With version 4.1.0 with Erlang 27.3.3
Reproduction steps
Expected behaviorwe expect the handshake to exchange certs and negotiate the exchange/set up of the tls handshake Additional contextJava Client reports exception |
Beta Was this translation helpful? Give feedback.
Replies: 5 comments 8 replies
-
Hello, thanks for using RabbitMQ. In general, Team RabbitMQ does not diagnose TLS issues for the community (link). In this case, you haven't provided enough information for someone to assist you. Ideally, you would at least provide your full RabbitMQ configuration file. Since I have a few minutes, I will try to reproduce this issue using |
Beta Was this translation helpful? Give feedback.
-
Here is my rabbitmq.conf
|
Beta Was this translation helpful? Give feedback.
-
As a suggestion, review how I edited the original discussion and your comments to fix the formatting. It was very difficult to read at first. |
Beta Was this translation helpful? Give feedback.
-
@gs-harris our team does not troubleshoot TLS for non-paying users. See the Troubleshooting TLS guide that explains how to do narrow problems down efficiently. In addition, your set has a lot of restrictions, namely one lonely cipher suite that is allowed. Cipher suite overlap between the client and the server is critically important for TLS to function. This is primarily important for those adopting TLS 1.3 exclusively but is an important factor generally, because a TLS handshake cannot possibly succeed if the two sides of the connection do not have at least one cipher suite in common. When one side is restricted to just one cipher suite, the risk of such incompatibilities is the greatest it can be. If @lukebakken wants to continue helping out, I'm not going to object. |
Beta Was this translation helpful? Give feedback.
-
A
Our TLS guide has an example setup that passes a widely used test suite both with TLS 1.2 with a restricted set of suites (not down to a single suite) and TLS 1.3 (that has no suites in common with 1.2 by design, as explained in the docs). I could not find any documented cipher suites-related changes in Erlang/OTP 27.x. Our team (in fact, @lukebakken) has previously reported a number of issues to the Erlang maintainers specifically in this area, and specifically when interacting with Java clients, e.g. this one (has to do with ECC suites) erlang/otp#6435 but the last time that happened was probably a good year ago. In any case, the recommendation to remove all restrictions and start reintroducing them, still stands. |
Beta Was this translation helpful? Give feedback.
I've put together the following repo that demonstrates that RabbitMQ 4 works just fine using TLS 1.2 and
openssl s_client
:https://github.com/lukebakken/rabbitmq-server-13864
More than likely, your issue stems from the fact that you are limiting ciphers to just one. Don't do that. Comment out
ssl_options.ciphers.1
and I'm sure your environment will work fine.It doesn't matter that this used to work using an older version of Erlang, there must have been something that changed in Erlang 27, or the underlying OpenSSL library, because that's what the Erlang VM uses to do cryptographic computations.