Skip to content

Conversation

@mkuratczyk
Copy link
Contributor

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
Contributor 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
Contributor 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.

mkuratczyk and others added 4 commits November 17, 2020 19:02
Co-authored-by: Feroz Jilla <fjilla@vmware.com>
Co-authored-by: Feroz Jilla <fjilla@vmware.com>
Co-authored-by: Feroz Jilla <fjilla@vmware.com>
@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.

5 participants