rabbitmq / rabbitmq-web-stomp

Provides support for STOMP over WebSockets
Other
89 stars 26 forks source link

Add support for client certificate authentication #117

Closed lukebakken closed 4 years ago

lukebakken commented 4 years ago

Fixes #116

Depends on rabbitmq/rabbitmq-stomp#142

Ensure your config has {ssl_cert_login, true} in the rabbitmq_stomp section.

lukebakken commented 4 years ago

@michaelklishin OK this is all set and I've made sure this works like rabbitmq-web-mqtt.

michaelklishin commented 4 years ago

What client do you use for testing?

lukebakken commented 4 years ago

@michaelklishin I'm using this project:

https://github.com/lukebakken/community.pivotal.io_web-stomp-client-cert

Clone it and initialize submodules. Customize the paths in rabbitmq.config to point to certs made on your workstations tls-gen basic profile. Copy those certs into certs/.

Then, cd to webstomp-client and run npm install. Then run node ./example/broadcast-node.js. It will connect via TLS to RabbitMQ. You'll probably get an auth error as you have not yet created a user that matches the CN= value in your certs. Create that user and grant permissions. Re-run the node app and it will connect successfully. It will prompt for input and then broadcast that input to some consumers. Fin!

michaelklishin commented 4 years ago

Backported to v3.8.x and v3.7.x.