You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -8,19 +8,20 @@ If RabbitMQ Cluster Kubernetes Operator is not installed,
8
8
see the [installation guide](/kubernetes/operator/install-operator.html). For instructions on getting started quickly, see the [quickstart guide](/kubernetes/operator/quickstart-operator.html).
9
9
This guide is structured in the following sections:
10
10
11
-
*[Confirm Service Availability](#service-availability).
12
-
*[Apply Pod Security Policies](#psp).
13
-
*[Create a RabbitMQ Instance](#create).
14
-
*[Existing examples](#examples).
15
-
*[Configure a RabbitMQ Instance](#configure).
16
-
*[Update a RabbitMQ Instance](#update).
17
-
*[Set a Pod Disruption Budget](#set-pdb).
18
-
*[Find Your RabbitmqCluster Service Name and Admin Credentials](#find).
19
-
*[Verify the Instance is Running](#verify-instance).
20
-
*[Use the RabbitMQ Service in Your App](#use).
21
-
*[Monitor RabbitMQ Clusters](#monitoring).
22
-
*[Delete a RabbitMQ Instance](#delete).
23
-
*[Pause Reconciliation for a RabbitMQ Instance](#pause).
11
+
*[Confirm Service Availability](#service-availability)
12
+
*[Apply Pod Security Policies](#psp)
13
+
*[Create a RabbitMQ Instance](#create)
14
+
*[Existing examples](#examples)
15
+
*[Configure a RabbitMQ Instance](#configure)
16
+
*[Update a RabbitMQ Instance](#update)
17
+
*[Set a Pod Disruption Budget](#set-pdb)
18
+
*[Configure TLS](#tls)
19
+
*[Find Your RabbitmqCluster Service Name and Admin Credentials](#find)
20
+
*[Verify the Instance is Running](#verify-instance)
21
+
*[Use the RabbitMQ Service in Your App](#use)
22
+
*[Monitor RabbitMQ Clusters](#monitoring)
23
+
*[Delete a RabbitMQ Instance](#delete)
24
+
*[Pause Reconciliation for a RabbitMQ Instance](#pause)
24
25
25
26
## <aid='service-availability'class='anchor'href='#service-availability'>Confirm Service Availability</a>
26
27
@@ -940,6 +941,92 @@ For more information about concepts mentioned above, see:
Transport Layer Security (TLS) is a protocol for encrypting network traffic. <ahref="/ssl.html">RabbitMQ supports TLS</a>, and the cluster operator simplifies the process of configuring a RabbitMQ cluster with [TLS](#one-way-tls) or
947
+
[mutual TLS (mTLS)](#mutual-tls) encrypted traffic between clients and the cluter, as well
948
+
as supporting [encrypting RabbitMQ inter-node traffic with mTLS](https://github.com/rabbitmq/cluster-operator/tree/main/docs/examples/mtls-inter-node).
949
+
A [basic overview of TLS](/ssl.html#certificates-and-keys) is helpful for understanding this guide.
950
+
951
+
### <aid='one-way-tls'class='anchor'href='#one-way-tls'>TLS encrypting traffic between clients and RabbitMQ</a>
952
+
953
+
In order to encrypt traffic between clients and the RabbitMQ cluster, the RabbitMQ cluster must be configured with a server certificate and key pair signed by a Certificate Authority (CA) trusted by the clients. This allows clients to verify that the server is trusted, and traffic sent between the client and server are encrypted using the server's keys.
954
+
955
+
The certificate's Subject Alternative Name (SAN) must contain at least the following attributes:
If wildcards are not permitted, the certificate must provide a SAN attribute for each RabbitMQ node in the RabbitMQ cluster.
960
+
For example, if you deploy a 3-node RabbitMQ cluster named `myrabbit` in namespace `mynamespace` with the default Kubernetes cluster domain `cluster.local`, the SAN must include at least the following attributes:
or use a tool such as <ahref="https://cert-manager.io/">Cert Manger</a> to generate a TLS secret.
977
+
978
+
Once this secret exists, a RabbitMQ cluster can be deployed following the <ahref="https://github.com/rabbitmq/cluster-operator/tree/main/docs/examples/tls">TLS example</a>.
979
+
980
+
<preclass="lang-yaml">
981
+
apiVersion: rabbitmq.com/v1beta1
982
+
kind: RabbitmqCluster
983
+
metadata:
984
+
name: additional-port
985
+
spec:
986
+
replicas: 1
987
+
tls:
988
+
secretName: tls-secret
989
+
</pre>
990
+
991
+
### <aid='mutual-tls'class='anchor'href='#mutual-tls'>Mutual TLS encryption between clients and RabbitMQ</a>
992
+
993
+
Mutual TLS (mTLS) enhances TLS by requiring that the server verify the identity of the client, in addition to the client verifying the server, which already occurs in TLS encryption. In order for this mutual verification to occur, both the client and server must be configured with certificate and key pairs, with the client pair signed by a CA trusted by the server and the server pair signed by a CA trusted by the client. The mutual verification process is shown in the following diagram:
994
+
995
+
<imgsrc="/img/mTLS.png"/>
996
+
997
+
In addition to the [configuration required to support TLS](#one-way-tls), configuring mutual TLS requires the RabbitMQ cluster to be configured with the CA certificate
998
+
used to sign the client certificate and key pair, `ca.pem`. Create a Kuberntes secret with key `ca.crt` containing this secret
or create this secret using a tool such as <ahref="https://cert-manager.io/">Cert Manager</a>.
1005
+
1006
+
Once this secret and the `tls-secret` exist, a RabbitMQ cluster cluster can be deployed following the [mTLS example](https://github.com/rabbitmq/cluster-operator/tree/main/docs/examples/mtls).
1007
+
1008
+
<preclass="lang-yaml">
1009
+
apiVersion: rabbitmq.com/v1beta1
1010
+
kind: RabbitmqCluster
1011
+
metadata:
1012
+
name: mtls
1013
+
spec:
1014
+
replicas: 1
1015
+
tls:
1016
+
secretName: tls-secret
1017
+
caSecretName: ca-secret
1018
+
</pre>
1019
+
1020
+
In order to enforce client verification, RabbitMQ must be configured to reject clients that do not present certificates. This can be done by enabling [TLS peer verification](ssl.html#peer-verification) using
1021
+
the `ssl_options.fail_if_no_peer_cert` option in the additional config:
1022
+
1023
+
<preclass="lang-yaml">
1024
+
spec:
1025
+
rabbitmq:
1026
+
additionalConfig: |
1027
+
ssl_options.fail_if_no_peer_cert = true
1028
+
</pre>
1029
+
943
1030
944
1031
## <aid='find'class='anchor'href='#find'>Find Your RabbitmqCluster Service Name and Admin Credentials</a>
0 commit comments