-
Notifications
You must be signed in to change notification settings - Fork 474
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
set SNI hostname for TLS connections #567
Conversation
This should really get merged. I just spent 3 hours trying to figure out what was wrong with my TLS load balancer, and I finally found this when I realized it wasn't an issue on the termination end. Otherwise maybe update a note here: http://www.squaremobius.net/amqp.node/ssl.html But, this merge seems easier |
Mine is a similar story to @sfsr12 , I had been trying to connect to RabbitMQ behind a Traefik reverse proxy using LetsEncrypt certificates for several hours amqps connections fail with the following error:
Amqplib's SSL guide links to node's TLS documentation where SNI is mentioned:
Solution is to specify the servername is the socketOptions object passed to amqplib's connection function, however merging this PR is preferred. Or possibly an update to the amqplib SSL Guide's list of errors explaining that use of a reverse-proxy may necessitate setting the servername option. |
Agreed, this just caused a rollback in a maintenance window for us. Is there interest in a forked version of amqplib that does include this PR? |
OK yes, I see the requirement. What will happen if someone uses an IP address as the hostname? |
For TLS, I don't think that will work, with or without The |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems like this will avoid some pain with figuring TLS out -- I'm all for avoiding pain 👍 Thank you Carl!
Is required if you have multiple AMQP servers behind a TLS load balancer.