Skip to content

Example: mTLS between RabbitMQ nodes #469

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

Merged
merged 6 commits into from
Nov 19, 2020
Merged

Conversation

mkuratczyk
Copy link
Collaborator

This example shows how to configure mTLS between RabbitMQ nodes. It uses Cert Manager but could be used without it (secret would have to be created manually).

@mkuratczyk mkuratczyk changed the title Exmample: mTLS between RabbitMQ nodes Example: mTLS between RabbitMQ nodes Nov 16, 2020
@ferozjilla ferozjilla self-requested a review November 17, 2020 14:22
Comment on lines +22 to +24
- mtls-inter-node-server-0.mtls-inter-node-nodes.default
- mtls-inter-node-server-1.mtls-inter-node-nodes.default
- mtls-inter-node-server-2.mtls-inter-node-nodes.default
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

From the RabbitMQ clustering ssl docs:

It is possible to reuse a single certificate/key pair for all nodes and CLI tools. The certificate can also use a wildcard Subject Alternative Name (SAN) or Common Name (CN) such as *.rabbitmq.example.local that would match every hostname in the cluster.

Do you think a wildcard name will work here too? I remember you had concerns around this approach if we were to scale up the cluster.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I tested the wildcard option shortly after submitting the PR. Wildcard would make it easier to add nodes to the cluster for example, but I know some companies don't like wildcard certs.

Comment on lines +20 to +22
{customize_hostname_check, [
{match_fun, public_key:pkix_verify_hostname_match_fun(https)}
]}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why were these lines added?
They are not in the RabbitMQ docs example.
Is it to get over a certain problem you encountered?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Taken from @lukebakken's example (https://github.com/lukebakken/erlang-inet-dist). As far as I tested, without this, Erlang would accept any name in the certificate.

@ferozjilla
Copy link
Contributor

ferozjilla commented Nov 17, 2020

It all works for me. Above are:

  • Minor suggestions for grammar
  • Adding links where possible
  • Asking some small questions for understanding.

@MirahImage
Copy link
Member

Thanks for adding the commands for verifying the TLS connection

@mkuratczyk mkuratczyk merged commit 7824d1e into main Nov 19, 2020
@mkuratczyk mkuratczyk deleted the mtls-inter-node-exmaple branch November 19, 2020 13:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants