I've been trying to accomplish end-to-end encryption for a rabbitmq deployment. I've managed to enable TLS for AMQP just fine, but I cannot get it to work for the web-mqtt plugin. Connecting via insecure WS to the default port of 15675 works fine. The plugin seems to reject setting the ssl listener to the same port as the default port. I have set the ssl port to 15676 but it does not seem to work.
To be clear the client can connect to:
ws://hostname:15675/ws
It cannot connect to:
wss://hostname:15675/ws -> SSL Error (makes sense)
wss://hostname:15676/ws -> Timeout
wss://hostname:15676 -> Timeout
wss://hostname:15676/mqtt/ws -> Timeout
wss://hostname:15676/ws/mqtt -> Timeout
My AMQP client connects securely.
Here is the relevant rabbit.conf:
listeners.tcp.default = 5671
listeners.ssl.default = 5671
ssl_options.cacertfile = /path/to/fullchain.pem
ssl_options.certfile = /path/to/cert.pem
ssl_options.keyfile = /path/to/privkey.pem
ssl_options.verify = verify_none
ssl_options.fail_if_no_peer_cert = false
web_mqtt.ssl.port = 15676
web_mqtt.ssl.cacertfile = /path/to/fullchain.pem
web_mqtt.ssl.certfile = /path/to/cert.pem
web_mqtt.ssl.keyfile = /path/to/privkey.pem
Also, is there any obvious how-to/tutorial resource I am missing? I don't see anything showing an example TLS connection string in the
RabbitMQ TLS guide, or the
Web MQTT guide, but I might've missed it.