Skip to content

Commit 135b423

Browse files
jeff-allen-mongojwilliams-mongo
authored andcommitted
(DOCSP-7376): Fixing x.509 mongo connection command
1 parent 217f065 commit 135b423

File tree

1 file changed

+14
-2
lines changed

1 file changed

+14
-2
lines changed

source/includes/steps-connect-to-x509-deployment.yaml

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,9 +76,21 @@ content: |
7676
Once you have created your X.509 user, try to connect to the
7777
deployment using the mongo Shell:
7878
79-
.. code-block:: sh
79+
.. tabs::
80+
81+
.. tab:: MongoDB 4.2
82+
:tabid: mdb-4-2
83+
84+
.. code-block:: sh
85+
86+
mongo --host {host} --tls --tlsCAFile /var/run/secrets/kubernetes.io/serviceaccount/ca.crt --tlsCertificateKeyFile x509-full.pem --authenticationMechanism MONGODB-X509 --authenticationDatabase '$external'
87+
88+
.. tab:: MongoDB 4.0 and Older
89+
:tabid: mdb-4-0-and-older
90+
91+
.. code-block:: sh
8092
81-
mongo --host {host} --ssl --sslCAFile /var/run/secrets/kubernetes.io/serviceaccount/ca.crt --sslPEMKeyFile x509-full.pem --authenticationMode MONGODB-X509
93+
mongo --host {host} --ssl --sslCAFile /var/run/secrets/kubernetes.io/serviceaccount/ca.crt --sslPEMKeyFile x509-full.pem --authenticationMechanism MONGODB-X509 --authenticationDatabase '$external'
8294
8395
.. note::
8496

0 commit comments

Comments
 (0)