Skip to content
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

TLS connections to RabbitMQ #140

Closed
CSTDev opened this issue Jun 17, 2021 · 10 comments
Closed

TLS connections to RabbitMQ #140

CSTDev opened this issue Jun 17, 2021 · 10 comments
Assignees
Labels
design Design the solution enhancement New feature or request will_implement The enhancement will be implemented

Comments

@CSTDev
Copy link

CSTDev commented Jun 17, 2021

Feature request (I don't think it's currently possible?)
All connections to the Rabbitmq I'm using are required to use TLS for both the connection and client authentication. Would it be possible to add some configuration to allow a certificate, key and CA certificate chain to be provided to the underlying rabbit client?

I've noticed the library being used for the connection has a DialTLS method which I think could be used.

Happy to discuss and implement.

@Templum
Copy link
Owner

Templum commented Jun 18, 2021

Hello @CSTDev, sounds legit. I will have a look into the DialTLS method to check what it expects.

@Templum Templum added enhancement New feature or request investigate Have a look, before procceeding labels Jun 18, 2021
@Templum
Copy link
Owner

Templum commented Jun 19, 2021

@CSTDev I will proceed with implementing this FR, please make sure to follow the progress on the PR once I started. As I will probably need to rely on you for validation.

@Templum Templum added design Design the solution will_implement The enhancement will be implemented and removed investigate Have a look, before procceeding labels Jun 19, 2021
@Templum Templum self-assigned this Jun 19, 2021
@Templum
Copy link
Owner

Templum commented Jun 20, 2021

@CSTDev would you be so kind to try out the coding from #142 and see if it works for you? The README on the branch already contains the necessary documentation with respect to the TLS setup.

The only thing missing over at the PR are the tests, which I will as I have time. And a manual validation.

@Templum
Copy link
Owner

Templum commented Jun 23, 2021

@CSTDev did you find the time to verify it ?

@CSTDev
Copy link
Author

CSTDev commented Jun 24, 2021

Code looks good, haven't had a chance to verify it yet will try to get to it the end of this week.

@CSTDev
Copy link
Author

CSTDev commented Jun 26, 2021

Any chance of adding an optional password for the client key please? Looks like passing the file to DecryptPEMBlock with the password, and then into X509KeyPair should do it.

Otherwise I've got it working, thanks!

@Templum
Copy link
Owner

Templum commented Jun 26, 2021

@CSTDev thanks for getting back and testing. I'm concerned about the deprecation warning and would like to not support something already marked deprecated

Deprecated: Legacy PEM encryption as specified in RFC 1423 is insecure by design. Since it does not authenticate the ciphertext, it is vulnerable to padding oracle attacks that can let an attacker recover the plaintext.

@CSTDev
Copy link
Author

CSTDev commented Jun 27, 2021

That makes sense, I somehow missed that when I read it!

@Templum
Copy link
Owner

Templum commented Jun 28, 2021

@CSTDev alright, then I believe I will merge the PR in the next days. And release a new version. Also thanks for your good catch comment over at the PR, I resolved it today along with some flood of new tests.

@Templum
Copy link
Owner

Templum commented Jul 5, 2021

After some issues with the pipeline, due to a failure in one of the GitHub actions. I finally released this feature in v1.0.3

@Templum Templum closed this as completed Jul 5, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
design Design the solution enhancement New feature or request will_implement The enhancement will be implemented
Projects
None yet
Development

No branches or pull requests

2 participants