Cannot get RabbitMQ to accept TLS1 (but TLS1.2 works perfectly fine)

1,394 views
Skip to first unread message

Wolfgang Wiessler

unread,
May 6, 2016, 11:15:00 AM5/6/16
to rabbitmq-users
Hi,

I got RabbitMQ 3.6.1 running on a Windows Server 2012 with ERL 18.3. On that same machine is also a client application running that uses the .NET client (latest version). That client can connect using TLS 1.2. But I have client applications that run on older operating systems (e.g. Windows Server 2008 SP2) which only support TLS1. So I changed the RabbitMQ client to specify TLS1 in the SSL settings of the ConnectionFactory. My rabbitmq server config file is also set up to allow TLS1. But that same client app that used TLS1.2 before cannot connect anymore using TLS1.

I am running SSL on port 5672.

I ran "openssl s_client -connect 127.0.0.1:5672 -tls1_2" and "openssl s_client -connect 127.0.0.1:5672 -tls1". The former produces a lengthy output showing my cert details etc. The latter shows CONNECTED(00000134)
4108:error:1409442F:SSL routines:ssl3_read_bytes:tlsv1 alert insufficient security:.\ssl\s3_pkt.c:1472:SSL alert number 71
4108:error:1409E0E5:SSL routines:ssl3_write_bytes:ssl handshake failure:.\ssl\s3_pkt.c:656:

I already checked if Erlang is supporting TLS1. ssl_versions() shows
[{ssl_app,"7.3"},
 {supported,['tlsv1.2','tlsv1.1',tlsv1]},
 {available,['tlsv1.2','tlsv1.1',tlsv1,sslv3]}]

My rabbitmq config is:

[
 {ssl, [{versions, ['tlsv1.2', 'tlsv1.1', tlsv1]}]},
 {rabbit, [
     {tcp_listeners, []},
           {ssl_listeners, [5672]},
     {ssl_options, [{cacertfile,"path/CA.pem"},
                    {certfile, "path/cert.pem"},
                    {keyfile,"path/key.pem"},
                    {verify,verify_peer},
                    {fail_if_no_peer_cert,true}]},
     {ssl_handshake_timeout, 30000},
     {disk_free_limit, 1000000000}
  ]}
].

Does anyone know what is going on? I thought based on the documentation that I should be able to force RabbitMQ to accept TLS1 connections. In the log, I get "insufficient security" errors.

Thanks for any help!
Wolfgang

dfed...@pivotal.io

unread,
May 6, 2016, 12:36:13 PM5/6/16
to rabbitmq-users
Erlang 18.3 has several issues with ciphersuites in ssl module. You can try 18.3.3 or use workarounds using ciphersuite ordering in rabbitmq.config.

Wolfgang Wiessler

unread,
May 7, 2016, 5:16:38 AM5/7/16
to rabbitmq-users
Thanks for the info. Adding the ciphers explicitly solved it!

   {ssl_options, [{cacertfile,           "/etc/rabbitmq/ca.pem"},
                  {certfile,             "/etc/rabbitmq/rabbitmq.pem"},
                  {keyfile,              "/etc/rabbitmq/rabbitmq-key.pem"},
                  {verify,               verify_peer},

                  {versions, ['tlsv1.2', 'tlsv1.1', tlsv1]},
                  {ciphers, ["ECDHE-ECDSA-AES256-GCM-SHA384","ECDHE-RSA-AES256-GCM-SHA384",
                        "ECDHE-ECDSA-AES256-SHA384","ECDHE-RSA-AES256-SHA384", "ECDHE-ECDSA-DES-CBC3-SHA",
                        "ECDH-ECDSA-AES256-GCM-SHA384","ECDH-RSA-AES256-GCM-SHA384","ECDH-ECDSA-AES256-SHA384",
                        "ECDH-RSA-AES256-SHA384","DHE-DSS-AES256-GCM-SHA384","DHE-DSS-AES256-SHA256",
                        "AES256-GCM-SHA384","AES256-SHA256","ECDHE-ECDSA-AES128-GCM-SHA256",
                        "ECDHE-RSA-AES128-GCM-SHA256","ECDHE-ECDSA-AES128-SHA256","ECDHE-RSA-AES128-SHA256",
                        "ECDH-ECDSA-AES128-GCM-SHA256","ECDH-RSA-AES128-GCM-SHA256","ECDH-ECDSA-AES128-SHA256",
                        "ECDH-RSA-AES128-SHA256","DHE-DSS-AES128-GCM-SHA256","DHE-DSS-AES128-SHA256",
                        "AES128-GCM-SHA256","AES128-SHA256","ECDHE-ECDSA-AES256-SHA",
                        "ECDHE-RSA-AES256-SHA","DHE-DSS-AES256-SHA","ECDH-ECDSA-AES256-SHA",
                        "ECDH-RSA-AES256-SHA","AES256-SHA","ECDHE-ECDSA-AES128-SHA",
                        "ECDHE-RSA-AES128-SHA","DHE-DSS-AES128-SHA","ECDH-ECDSA-AES128-SHA",
                        "ECDH-RSA-AES128-SHA","AES128-SHA"]},
                  {honor_cipher_order, true},
                  {fail_if_no_peer_cert, false}]}

V Z

unread,
Jun 16, 2016, 2:15:33 PM6/16/16
to rabbitmq-users
We also ran into this issue ... had to downgrade to 18.2.1 to avoid messing with cipher suites. 

Where is the 18.3.3 download? Erlang.org only shows 18.3

Michael Klishin

unread,
Jun 16, 2016, 3:26:48 PM6/16/16
to rabbitm...@googlegroups.com
I believe the OTP team distributes patches on top of 18.3 (which is nonsensical as far
as adoption goes but possibly there are reasons for them to do so).

On Thu, Jun 16, 2016 at 9:15 PM, V Z <uvzu...@gmail.com> wrote:
We also ran into this issue ... had to downgrade to 18.2.1 to avoid messing with cipher suites. 

Where is the 18.3.3 download? Erlang.org only shows 18.3

--
You received this message because you are subscribed to the Google Groups "rabbitmq-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rabbitmq-user...@googlegroups.com.
To post to this group, send email to rabbitm...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
MK

Staff Software Engineer, Pivotal/RabbitMQ

Jared Biel

unread,
Jun 16, 2016, 4:21:37 PM6/16/16
to rabbitm...@googlegroups.com
We ran into similar issues in a different erlang app and upgrading to 18.3.3 didn't change anything for that app. We ended up having to specify cipher suites in the end and that's working for us.

Michael Klishin

unread,
Jun 16, 2016, 4:23:38 PM6/16/16
to rabbitm...@googlegroups.com
Jared,

May I ask what cipher suites you ended up configuring?

Jared Biel

unread,
Jun 16, 2016, 4:30:16 PM6/16/16
to rabbitm...@googlegroups.com
The list (below) is based off of the Mozilla recommended configuration (Intermediate compatibility.) We use this for a number of services and ended up having to write a bit of code to not attempt to use certain ones in that list that aren't compatible with erlang.

Erlang/OTP 18.3.4 was released two days ago and it looks like it may have a fix for this issue.

["DES-CBC3-SHA","AES256-SHA","AES128-SHA","AES256-SHA256","AES128-SHA256","AES256-GCM-SHA384","AES128-GCM-SHA256","EDH-RSA-DES-CBC3-SHA","ECDHE-RSA-DES-CBC3-SHA","ECDHE-ECDSA-DES-CBC3-SHA","DHE-RSA-AES256-SHA","DHE-RSA-AES256-SHA256","DHE-RSA-AES128-SHA","DHE-RSA-AES128-SHA256","ECDHE-RSA-AES256-SHA","ECDHE-ECDSA-AES256-SHA","ECDHE-ECDSA-AES256-SHA384","ECDHE-RSA-AES128-SHA","ECDHE-RSA-AES256-SHA384","ECDHE-ECDSA-AES128-SHA","ECDHE-RSA-AES128-SHA256","ECDHE-ECDSA-AES128-SHA256","DHE-RSA-AES256-GCM-SHA384","DHE-RSA-AES128-GCM-SHA256","ECDHE-RSA-AES256-GCM-SHA384","ECDHE-ECDSA-AES256-GCM-SHA384","ECDHE-RSA-AES128-GCM-SHA256","ECDHE-ECDSA-AES128-GCM-SHA256"]

Michael Klishin

unread,
Jun 16, 2016, 4:36:44 PM6/16/16
to rabbitm...@googlegroups.com
Thank you very much.
Reply all
Reply to author
Forward
0 new messages