corvus-ch / rabbitmq-cli-consumer

Consume RabbitMQ messages into any cli program
MIT License
236 stars 36 forks source link

TLS support #62

Closed klizas closed 5 years ago

klizas commented 5 years ago

Hello,

Is there a possibility that this tool will support TLS connection to RabbitMQ in a near future?

Thank you.

corvus-ch commented 5 years ago

This tool relies on the great AMQP library by Sean Treadway. Its documentation suggest that TLS is supported by using amqps:// for the protocol part of the connection url.

When Dial encounters an amqps:// scheme, it will use the zero value of a tls.Config. This will only perform server certificate and host verification.

So I theory, using TLS with rabbitmq-cli-consumer should be possible. I have not tested it though.

But this might not what you are looking for. I your request is to add support for client certificates as a means of authentication, this certainly can be done as the AMQP library has support for it.

@klizas is the server certificate and host verification you will get with using amqps:// enough for your use case or do you need also client certificate support?

klizas commented 5 years ago

Yes, it works perfectly fine with amqps://. Thank you!