Skip to content

Commit c52b1a3

Browse files
(DOCSP-11326)(DOCSP-11330)(DOCSP-11334): atlas security customerCerts… (#177)
* (DOCSP-11326)(DOCSP-11330)(DOCSP-11334): atlas security customerCerts create | describe | disable * (DOCSP-11326)(DOCSP-11330)(DOCSP-11334): typo * (DOCSP-11334): tech review feedback
1 parent df4e05a commit c52b1a3

File tree

6 files changed

+336
-1
lines changed

6 files changed

+336
-1
lines changed
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
.. list-table::
2+
:widths: 20 10 80
3+
:header-rows: 1
4+
5+
* - Name
6+
- Type
7+
- Description
8+
9+
* - ``cas``
10+
- string
11+
- PEM-encoded string containing one or more customer-managed CA
12+
certificates for database user authentication.

source/reference/atlas.txt

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,9 @@ Atlas ``mongocli`` Commands
3939
Retrieve information about MongoDB processes running on a specified
4040
|service| project.
4141

42+
:ref:`security <mcli-reference-atlas-security>`
43+
Manage |service| security features.
44+
4245
:ref:`whitelist <mcli-reference-atlas-whitelist>`
4346
Manage :atlas:`whitelist </security-whitelist/>` entries.
4447

@@ -51,9 +54,10 @@ Atlas ``mongocli`` Commands
5154
Backups </reference/atlas/backup-commands>
5255
Clusters </reference/atlas/cluster-commands>
5356
Database Users </reference/atlas/dbuser-commands>
57+
Data Lakes </reference/atlas/datalake-commands>
5458
Events </reference/atlas/event-commands>
5559
Logs </reference/atlas/log-commands>
5660
Metrics </reference/atlas/metric-commands>
5761
Processes </reference/atlas/process-commands>
62+
Security </reference/atlas/security-commands>
5863
Whitelists </reference/atlas/whitelist-commands>
59-
Data Lakes </reference/atlas/datalake-commands>
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
.. _mcli-reference-atlas-security:
2+
3+
===========================
4+
Atlas ``security`` Commands
5+
===========================
6+
7+
.. default-domain:: mongodb
8+
9+
.. toctree::
10+
:titlesonly:
11+
12+
Save a Customer-Managed X.509 Configuration </reference/atlas/security-customercerts-create>
13+
Describe a Customer-Managed X.509 Configuration </reference/atlas/security-customercerts-describe>
14+
Disable a Customer-Managed X.509 Configuration </reference/atlas/security-customercerts-disable>
Lines changed: 108 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,108 @@
1+
.. _mcli-atlas-security-customercerts-create-command:
2+
3+
============================================
4+
mongocli atlas security customerCerts create
5+
============================================
6+
7+
.. default-domain:: mongodb
8+
9+
.. contents:: On this page
10+
:local:
11+
:backlinks: none
12+
:depth: 1
13+
:class: singlecol
14+
15+
The ``security customerCerts describe`` command saves a customer-managed
16+
X.509 configuration for a project. You can also save a customer-managed
17+
X.509 configuration for a project through the |service| :atlas:`UI
18+
</security-self-managed-x509/>` or
19+
:atlas:`API </reference/api/x509-configuration-save/>`.
20+
21+
.. important::
22+
23+
Saving a customer-managed X.509 configuration triggers a rolling
24+
restart.
25+
26+
.. _security-customercerts-create-syntax:
27+
28+
Syntax
29+
------
30+
31+
.. code-block:: text
32+
33+
mongocli atlas security customerCerts|certs create
34+
--casFile <path/to/file.pem>
35+
[ --profile|-P <profile-name> ]
36+
[ --projectId <project-ID> ]
37+
38+
.. include:: /includes/fact-command-line-help.rst
39+
40+
.. _security-customercerts-create-options:
41+
42+
Options
43+
-------
44+
45+
.. list-table::
46+
:header-rows: 1
47+
:widths: 29 8 55 7
48+
49+
* - Option
50+
- Type
51+
- Description
52+
- Required?
53+
54+
* - ``--casFile``
55+
- string
56+
- The full path on your local system to the PEM-encoded
57+
Certificate Authority (CA) certificate or certificates that you
58+
want |service| to use to authenticate database users.
59+
- yes
60+
61+
* - ``--profile``, ``-P``
62+
- string
63+
- Name of the profile where the public and private
64+
keys for the project are saved. If omitted, uses the
65+
{+default-profile+}. To learn more about creating a
66+
profile, see :ref:`mcli-configure`.
67+
- no
68+
69+
* - ``--projectId``
70+
- string
71+
- Unique identifier of the project for which you want to save a
72+
customer-managed X.509 configuration. If omitted, uses the
73+
project ID in the profile or :ref:`environment variable
74+
<mcli-env-var>`.
75+
- no
76+
77+
.. _security-customercerts-create-command-output:
78+
79+
Output
80+
------
81+
.. include:: /includes/command-output-intro.rst
82+
83+
.. include:: /includes/security-customercerts-describe-output.rst
84+
85+
.. _security-customercerts-create-examples:
86+
87+
Example
88+
--------
89+
90+
The following ``mongocli atlas security customerCerts create`` command
91+
saves a customer-managed X.509 configuration for a project. It uses the
92+
{+default-profile+} to access the |service| cluster.
93+
94+
.. code-block:: sh
95+
:copyable: false
96+
97+
mongocli atlas security customerCerts create --casFile path/to/ca.pem --projectId 5e2211c17a3e5a48f5497de3
98+
99+
The command prints the following to the terminal. To learn more about
100+
these fields, see :ref:`Output
101+
<security-customercerts-create-command-output>`.
102+
103+
.. code-block:: json
104+
:copyable: false
105+
106+
{
107+
"cas": "-----BEGIN CERTIFICATE-----\nMIIEljCCAn4CCQDIOFwZ41mcVDANBgkqhkiG9w0BAQsFADANMQswCQYDVQQDDAJD...n9fAKZTI24VvEFW5dA21Ha3+JYli2JCqJV3s=\n-----END CERTIFICATE-----\n"
108+
}
Lines changed: 96 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,96 @@
1+
.. _mcli-atlas-security-customercerts-describe-command:
2+
3+
==============================================
4+
mongocli atlas security customerCerts describe
5+
==============================================
6+
7+
.. default-domain:: mongodb
8+
9+
.. contents:: On this page
10+
:local:
11+
:backlinks: none
12+
:depth: 1
13+
:class: singlecol
14+
15+
The ``security customerCerts describe`` command retrieves the
16+
customer-managed Certificate Authority (CA) certificates
17+
for a project. You can also retrieve your customer-managed CAs
18+
for a project through the |service| :atlas:`UI
19+
</security-self-managed-x509/>` or
20+
:atlas:`API </reference/api/x509-configuration-get-current/>`.
21+
22+
.. _security-customercerts-describe-syntax:
23+
24+
Syntax
25+
------
26+
27+
.. code-block:: text
28+
29+
mongocli atlas security customerCerts|certs describe
30+
[ --profile|-P <profile-name> ]
31+
[ --projectId <project-ID> ]
32+
33+
.. include:: /includes/fact-command-line-help.rst
34+
35+
.. _security-customercerts-describe-options:
36+
37+
Options
38+
-------
39+
40+
.. list-table::
41+
:header-rows: 1
42+
:widths: 29 8 55 7
43+
44+
* - Option
45+
- Type
46+
- Description
47+
- Required?
48+
49+
* - ``--profile``, ``-P``
50+
- string
51+
- Name of the profile where the public and private
52+
keys for the project are saved. If omitted, uses the
53+
{+default-profile+}. To learn more about creating a
54+
profile, see :ref:`mcli-configure`.
55+
- no
56+
57+
* - ``--projectId``
58+
- string
59+
- Unique identifier of the project for which you want to retrieve
60+
customer-managed CA certificates. If omitted, uses the project ID
61+
in the profile or :ref:`environment variable <mcli-env-var>`.
62+
- no
63+
64+
.. _security-customercerts-describe-command-output:
65+
66+
Output
67+
------
68+
.. include:: /includes/command-output-intro.rst
69+
70+
.. include:: /includes/security-customercerts-describe-output.rst
71+
72+
.. _security-customercerts-describe-examples:
73+
74+
Example
75+
--------
76+
77+
The following ``mongocli atlas security customerCerts describe`` command
78+
retrieves the customer-managed Certificate Authority (CA) certificates
79+
for a project. It uses the {+default-profile+} to access the |service|
80+
cluster.
81+
82+
.. code-block:: sh
83+
:copyable: false
84+
85+
mongocli atlas security customerCerts describe --projectId 5e2211c17a3e5a48f5497de3
86+
87+
The command prints the following to the terminal. To learn more about
88+
these fields, see :ref:`Output
89+
<security-customercerts-describe-command-output>`.
90+
91+
.. code-block:: json
92+
:copyable: false
93+
94+
{
95+
"cas": "-----BEGIN CERTIFICATE-----\nMIIEljCCAn4CCQDIOFwZ41mcVDANBgkqhkiG9w0BAQsFADANMQswCQYDVQQDDAJD...n9fAKZTI24VvEFW5dA21Ha3+JYli2JCqJV3s=\n-----END CERTIFICATE-----\n"
96+
}
Lines changed: 101 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,101 @@
1+
.. _mcli-atlas-security-customercerts-disable-command:
2+
3+
=============================================
4+
mongocli atlas security customerCerts disable
5+
=============================================
6+
7+
.. default-domain:: mongodb
8+
9+
.. contents:: On this page
10+
:local:
11+
:backlinks: none
12+
:depth: 1
13+
:class: singlecol
14+
15+
The ``security customerCerts disable`` command disables customer-managed X.509
16+
for a project. You can also disable customer-managed X.509
17+
for a project through the |service| :atlas:`UI
18+
</security-self-managed-x509/>` or
19+
:atlas:`API </reference/api/x509-configuration-disable-advanced/>`.
20+
21+
.. important::
22+
23+
Disabling customer-managed X.509 triggers a rolling restart.
24+
25+
.. _security-certs-disable-syntax:
26+
27+
Syntax
28+
------
29+
30+
.. code-block:: text
31+
32+
mongocli atlas security customerCerts|certs disable
33+
[ --profile|-P <profile-name> ]
34+
[ --projectId <project-ID> ]
35+
36+
.. include:: /includes/fact-command-line-help.rst
37+
38+
.. _security-certs-disable-options:
39+
40+
Options
41+
-------
42+
43+
.. list-table::
44+
:header-rows: 1
45+
:widths: 29 8 55 7
46+
47+
* - Option
48+
- Type
49+
- Description
50+
- Required?
51+
52+
* - ``--profile``, ``-P``
53+
- string
54+
- Name of the profile where the public and private
55+
keys for the project are saved. If omitted, uses the
56+
{+default-profile+}. To learn more about creating a
57+
profile, see :ref:`mcli-configure`.
58+
- no
59+
60+
* - ``--projectId``
61+
- string
62+
- Unique identifier of the project for which you want to disable
63+
customer-managed X.509. If omitted, uses the project ID in the
64+
profile or :ref:`environment variable <mcli-env-var>`.
65+
- no
66+
67+
.. _security-customercerts-disable-command-output:
68+
69+
Output
70+
------
71+
The command prints a confirmation message similar to the
72+
following to the terminal if it succeeds. If the command
73+
prints an error, see :ref:`Troubleshooting <troubleshooting>`
74+
for recommended solutions.
75+
76+
.. code-block:: text
77+
:copyable: false
78+
79+
X.509 configuration for project 5e2211c17a3e5a48f5497de3 was deleted.
80+
81+
.. _security-customercerts-disable-examples:
82+
83+
Example
84+
--------
85+
86+
The following ``mongocli atlas security customerCerts disable`` command disables
87+
customer-managed X.509 for a project after prompting for a confirmation.
88+
It uses the {+default-profile+} to access the |service| cluster.
89+
90+
.. code-block:: sh
91+
:copyable: false
92+
93+
mongocli atlas security customerCerts disable --projectId 5e2211c17a3e5a48f5497de3
94+
Are you sure you want to delete the X509 configuration for this project? Yes
95+
96+
The command prints the following to the terminal:
97+
98+
.. code-block:: text
99+
:copyable: false
100+
101+
X.509 configuration for project 5e2211c17a3e5a48f5497de3 was deleted.

0 commit comments

Comments
 (0)