TLS Configuration Issue: Missing ssl_options.password Leads to Non-Functional TLS Listener #13602
-
Describe the bugWhen RabbitMQ is configured with TLS support but the Reproduction stepsConfigure RabbitMQ to enable TLS without specifying listeners.tcp = none
listeners.ssl.1 = 5671
ssl_options.cacertfile = /etc/rabbitmq/certs/ca.crt
ssl_options.certfile = /etc/rabbitmq/certs/server.crt
ssl_options.keyfile = /etc/rabbitmq/certs/server.key
#ssl_options.password = changeit
ssl_options.verify = verify_none
ssl_options.fail_if_no_peer_cert = false
ssl_options.versions.1 = tlsv1.3
ssl_options.ciphers.1 = TLS_AES_256_GCM_SHA384
ssl_options.ciphers.2 = TLS_AES_128_GCM_SHA256
ssl_options.ciphers.3 = TLS_CHACHA20_POLY1305_SHA256
ssl_options.ciphers.4 = TLS_AES_128_CCM_SHA256
ssl_options.ciphers.5 = TLS_AES_128_CCM_8_SHA256
ssl_options.honor_cipher_order = true
ssl_options.honor_ecc_order = true File 1 - Content of rabbitmq.conf configuration file Start the RabbitMQ server. podman run --rm -p5671:5671 -p9000:15672 \
-v ~/rabbitmq-tls/certs:/etc/rabbitmq/certs \
-v ~/rabbitmq-tls/config/rabbitmq.conf:/etc/rabbitmq/rabbitmq.conf \
-e RABBITMQ_DEFAULT_USER=quarkus \
-e RABBITMQ_DEFAULT_PASS=quarkus \
-e RABBITMQ_LOG=debug \
rabbitmq:4.0.7-management Expected behaviorRabbitMQ should fail to start and raise an error indicating that Actual BehaviorRabbitMQ starts without any exception or warning related to the missing or wrong password. Port 5671 is in a listening state but is not correctly configured with a certificate. TLS connections fail due to the missing certificate setup. openssl s_client -showcerts -connect 127.0.0.1:5671 -tls1_3
Connecting to 127.0.0.1
CONNECTED(00000003)
40488A0702000000:error:0A000126:SSL routines::unexpected eof while reading:ssl/record/rec_layer_s3.c:693:
---
no peer certificate available
---
No client certificate CA names sent
---
SSL handshake has read 0 bytes and written 236 bytes
Verification: OK
---
New, (NONE), Cipher is (NONE)
Protocol: TLSv1.3
This TLS version forbids renegotiation.
Compression: NONE
Expansion: NONE
No ALPN negotiated
Early data was not sent
Verify return code: 0 (ok)
--- Suggested Fix RabbitMQ should validate whether If the private key requires a password and it is not provided, RabbitMQ should fail to start with a clear error message. EnvironmentRabbitMQ version: 4.0.7 Additional context
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
@amusarra this is how Erlang's TLS implementation works: certificates are not loaded before the first client connection requests it to be loaded. What RabbitMQ can validate as part of translating the RabbitMQ does not implement TLS and this is not going to change. |
Beta Was this translation helpful? Give feedback.
@amusarra this is how Erlang's TLS implementation works: certificates are not loaded before the first client connection requests it to be loaded.
What RabbitMQ can validate as part of translating the
rabbitmq.conf
, it does validate.RabbitMQ does not implement TLS and this is not going to change.