@@ -11,7 +11,7 @@ content: |
1111
1212 .. literalinclude:: /reference/k8s/example-replica-set-tls.yaml
1313 :language: yaml
14- :emphasize-lines: 5-7,9-13,16-22
14+ :emphasize-lines: 5-7,9-13,16-24
1515 ---
1616stepnum : 2
1717level : 4
@@ -55,6 +55,20 @@ content: |
5555 accept TLS encrypted connections.
5656 - ``true``
5757
58+ * - :setting:`spec.security.clusterAuthenticationMode`
59+ - string
60+ - *Optional.* Enables :ref:`X.509 internal cluster authentication <x509-internal-authentication>`.
61+
62+ Remove this field from your ConfigMap to disable X.509 internal
63+ cluster authentication.
64+
65+ .. important::
66+
67+ Once internal cluster authentication is enabled, it can not be
68+ disabled.
69+
70+ - ``x509``
71+
5872 * - :setting:`spec.additionalMongodConfig.net.ssl.mode`
5973 - string
6074 - *Optional.* Changes the :setting:`TLS mode <net.ssl.mode>`
@@ -125,26 +139,136 @@ level: 4
125139ref : approve-certificates-tls
126140content : |
127141
128- Approve the certificate for each host using the following command:
142+ Retrieve the |csrs| for each host by running the following command:
129143
130144 .. code-block:: sh
131145
132- kubectl certificate approve <metadata.name>-<member>.<namespace>
146+ kubectl get csr
147+
148+ The output of the command and number of certificates to approve
149+ depend on whether X.509 internal cluster authentication is enabled by
150+ setting :setting:`spec.security.clusterAuthenticationMode` to
151+ ``x509`` in step 4.
152+
153+ .. tabs::
154+
155+ tabs:
156+ - id: x509disabled
157+ name: X.509 Disabled
158+ content: |
159+ The command's output resembles the following:
160+
161+ .. code-block:: sh
162+
163+ NAME AGE REQUESTOR CONDITION
164+ my-secure-rs-0.mongodb 33s system:serviceaccount:mongodb:mongodb-enterprise-operator Pending
165+ my-secure-rs-1.mongodb 31s system:serviceaccount:mongodb:mongodb-enterprise-operator Pending
166+ my-secure-rs-2.mongodb 24s system:serviceaccount:mongodb:mongodb-enterprise-operator Pending
167+
168+ Using the ``NAME`` field above, approve each certificate from the
169+ previous command's output using the following command:
170+
171+ .. code-block:: sh
172+
173+ kubectl certificate approve <NAME>
174+
175+ .. example::
176+
177+ The following commands approve the certificates for the
178+ replica set example in the previous step:
179+
180+ .. code-block:: sh
181+ :copyable: false
182+
183+ kubectl certificate approve my-secure-rs-0.mongodb
184+ kubectl certificate approve my-secure-rs-1.mongodb
185+ kubectl certificate approve my-secure-rs-2.mongodb
186+
187+ |kubectl| prints a message to the console when a certificate
188+ is approved.
189+
190+ - id: x509enabled
191+ name: X.509 Enabled
192+ content: |
193+
194+ The command's output resembles the following:
195+
196+ .. code-block:: sh
197+
198+ NAME AGE REQUESTOR CONDITION
199+ mms-automation-agent.mongodb 15m system:serviceaccount:mongodb:mongodb-enterprise-operator Approved,Issued
200+ mms-backup-agent.mongodb 15m system:serviceaccount:mongodb:mongodb-enterprise-operator Approved,Issued
201+ mms-monitoring-agent.mongodb 15m system:serviceaccount:mongodb:mongodb-enterprise-operator Approved,Issued
202+ my-secure-rs-0.mongodb 6s system:serviceaccount:mongodb:mongodb-enterprise-operator Pending
203+ my-secure-rs-1.mongodb 4s system:serviceaccount:mongodb:mongodb-enterprise-operator Pending
204+ my-secure-rs-2.mongodb 1s system:serviceaccount:mongodb:mongodb-enterprise-operator Pending
205+
206+ Using the ``NAME`` field above, approve each certificate from the
207+ previous command's output using the following command:
208+
209+ .. code-block:: sh
210+
211+ kubectl certificate approve <NAME>
212+
213+ .. example::
214+
215+ The following commands approve the certificates for the
216+ replica set example in the previous step:
217+
218+ .. code-block:: sh
219+ :copyable: false
220+
221+ kubectl certificate approve my-secure-rs-0.mongodb
222+ kubectl certificate approve my-secure-rs-1.mongodb
223+ kubectl certificate approve my-secure-rs-2.mongodb
224+
225+ |kubectl| prints a message to the console when a certificate
226+ is approved.
227+
228+ When :setting:`spec.security.clusterAuthenticationMode` is set to
229+ ``x509`` an additional |csr| will be generated per host for the
230+ clusterfile.
231+
232+ After the first batch of certificates are approved, run the
233+ command to retrieve the |csrs| again:
234+
235+ .. code-block:: sh
236+
237+ kubectl get csr
238+
239+ The clusterfile |csrs| are now present in the output:
240+
241+ .. code-block:: sh
242+ :copyable: false
243+
244+ NAME AGE REQUESTOR CONDITION
245+ mms-automation-agent.mongodb 17m system:serviceaccount:mongodb:mongodb-enterprise-operator Approved,Issued
246+ mms-backup-agent.mongodb 17m system:serviceaccount:mongodb:mongodb-enterprise-operator Approved,Issued
247+ mms-monitoring-agent.mongodb 17m system:serviceaccount:mongodb:mongodb-enterprise-operator Approved,Issued
248+ my-secure-rs-0-clusterfile.mongodb 13s system:serviceaccount:mongodb:mongodb-enterprise-operator Pending
249+ my-secure-rs-0.mongodb 105s system:serviceaccount:mongodb:mongodb-enterprise-operator Approved,Issued
250+ my-secure-rs-1-clusterfile.mongodb 7s system:serviceaccount:mongodb:mongodb-enterprise-operator Pending
251+ my-secure-rs-1.mongodb 103s system:serviceaccount:mongodb:mongodb-enterprise-operator Approved,Issued
252+ my-secure-rs-2-clusterfile.mongodb 3s system:serviceaccount:mongodb:mongodb-enterprise-operator Pending
253+ my-secure-rs-2.mongodb 100s system:serviceaccount:mongodb:mongodb-enterprise-operator Approved,Issued
254+
255+ Approve the clusterfile |csrs| using the same command:
256+
257+ .. code-block:: sh
133258
134- .. example::
259+ kubectl certificate approve <NAME>
135260
136- The following commands approve the certificates for the
137- replica set example in the previous step:
261+ .. example::
138262
139- .. code-block:: sh
140- :copyable: false
263+ The following commands approve the clusterfile
264+ certificates:
141265
142- kubectl certificate approve my-secure-rs-0.my-namespace
143- kubectl certificate approve my-secure-rs-1.my-namespace
144- kubectl certificate approve my-secure-rs-2.my-namespace
266+ .. code-block:: sh
267+ :copyable: false
145268
146- The |k8s-op-short| prints a message to the console when a certificate
147- is approved.
269+ kubectl certificate approve my-secure-rs-0-clusterfile.mongodb
270+ kubectl certificate approve my-secure-rs-1-clusterfile.mongodb
271+ kubectl certificate approve my-secure-rs-2-clusterfile.mongodb
148272 ---
149273title : " Track the status of your deployment."
150274level : 4
0 commit comments