Skip to content

Commit 88133b0

Browse files
DOCSP-12241 doc for atlas security ldap commands (#286)
* DOCSP-12241 doc for atlas security ldap commands * Apply suggestions from code review Co-authored-by: John Williams <[email protected]> * DOCSP-12241 updates for copy review feedback * DOCSP-12241 fix for tab display Co-authored-by: John Williams <[email protected]>
1 parent f3e02d6 commit 88133b0

9 files changed

+1026
-3
lines changed
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
.. _mcli-reference-atlas-security-customercerts:
2+
3+
================================
4+
Atlas ``customerCerts`` 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: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
.. _mcli-reference-atlas-ldap:
2+
3+
=======================
4+
Atlas ``ldap`` Commands
5+
=======================
6+
7+
.. default-domain:: mongodb
8+
9+
.. toctree::
10+
:titlesonly:
11+
12+
Save One LDAP Configuration </reference/atlas/security-ldap-save>
13+
Verify an LDAP Configuration </reference/atlas/security-ldap-verify>
14+
Get Status of a Verification Request </reference/atlas/security-ldap-verify-status>
15+
Watch LDAP Configuration Request </reference/atlas/security-ldap-verify-status-watch>
16+
Get Current LDAP Configuration </reference/atlas/security-ldap-get>
17+
Delete Current LDAP Configuration </reference/atlas/security-ldap-delete>

source/reference/atlas/security-commands.txt

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,5 @@ Atlas ``security`` Commands
99
.. toctree::
1010
:titlesonly:
1111

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>
12+
LDAP </reference/atlas/ldap-commands>
13+
Customer-managed X.509 Certificates </reference/atlas/customercerts-commands>
Lines changed: 105 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,105 @@
1+
.. _mcli-atlas-security-ldap-delete-cmd:
2+
3+
===================================
4+
mongocli atlas security ldap delete
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 ldap delete`` command removes the current
16+
``userToDNMapping`` from the |ldap| configuration for an
17+
|service| project. You can also remove the current
18+
``userToDNMapping`` through the :atlas:`API
19+
</reference/api/ldaps-configuration-remove-usertodnmapping/>`.
20+
21+
.. _mcli-atlas-security-ldap-delete-syntax:
22+
23+
Syntax
24+
------
25+
26+
.. code-block:: shell
27+
28+
mongocli atlas security ldap delete|rm
29+
[ --force ]
30+
[ --profile|-P <profile-name> ]
31+
[ --projectId <project-ID> ]
32+
33+
.. include:: /includes/fact-command-line-help.rst
34+
35+
.. _mcli-atlas-security-ldap-delete-options:
36+
37+
Options
38+
-------
39+
40+
.. list-table::
41+
:header-rows: 1
42+
:widths: 20 10 60 10
43+
44+
* - Option
45+
- Type
46+
- Description
47+
- Required?
48+
49+
* - ``--force``
50+
-
51+
- Flag that indicates that the whitelist entry can
52+
be deleted without requiring confirmation.
53+
- no
54+
55+
* - ``--output``, ``-o``
56+
- string
57+
- .. include:: /includes/extracts/fact-basic-options-output.rst
58+
- no
59+
60+
* - ``--profile``, ``-P``
61+
- string
62+
- Name of the profile to use for accessing the |service|
63+
project. If omitted, uses the {+default-profile+}.
64+
- no
65+
66+
* - ``--projectId``
67+
- string
68+
- Unique identifier of the project.
69+
- no
70+
71+
.. _mcli-atlas-security-ldap-delete-output:
72+
73+
Output
74+
------
75+
76+
The command prints a confirmation message similar to the
77+
following to the terminal if it succeeds. If the command
78+
prints an error, see :ref:`Troubleshooting <mcli-troubleshooting>`
79+
for recommended solutions.
80+
81+
.. code-block:: text
82+
:copyable: false
83+
84+
LDAP configuration userToDNMapping deleted from project'<project-ID>'
85+
86+
.. _mcli-atlas-security-ldap-delete-egs:
87+
88+
Example
89+
-------
90+
91+
The following examples use the ``mongocli atlas security
92+
ldap delete`` command to delete the current ``userToDNMapping``
93+
from the LDAP configuration for the project specified using
94+
the {+default-profile+}.
95+
96+
.. code-block:: shell
97+
98+
mongocli atlas security ldap delete
99+
100+
The previous command prints the following to the terminal:
101+
102+
.. code-block:: shell
103+
:copyable: false
104+
105+
LDAP configuration userToDNMapping deleted from project'5e2211c17a3e5a48f5497de3'
Lines changed: 130 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,130 @@
1+
.. _mcli-atlas-security-ldap-get-cmd:
2+
3+
================================
4+
mongocli atlas security ldap get
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 ldap get`` command returns the current |ldap| over
16+
|tls|/|ssl| configuration details for an |service| project. You
17+
can also retrieve the configuration details using the :atlas:`API
18+
</reference/api/ldaps-configuration-get-current/>`.
19+
20+
.. _mcli-atlas-security-ldap-get-syntax:
21+
22+
Syntax
23+
------
24+
25+
.. code-block:: shell
26+
27+
mongocli atlas security ldap get
28+
[ --output|-o <output-format> ]
29+
[ --profile|-P <name-of-profile> ]
30+
[ --projectId <id-of-project> ]
31+
32+
.. include:: /includes/fact-command-line-help.rst
33+
34+
.. _mcli-atlas-security-ldap-get-options:
35+
36+
Options
37+
-------
38+
39+
.. list-table::
40+
:header-rows: 1
41+
:widths: 25 10 55 10
42+
43+
* - Option
44+
- Type
45+
- Description
46+
- Required?
47+
48+
* - ``--output``, ``-o``
49+
- string
50+
- .. include:: /includes/extracts/fact-basic-options-output.rst
51+
- no
52+
53+
* - ``--profile``, ``-P``
54+
- string
55+
- Name of the profile to use for accessing the |service|
56+
project. If omitted, uses the {+default-profile+}.
57+
- no
58+
59+
* - ``--projectId``
60+
- string
61+
- Unique identifier of the |service| project.
62+
- yes
63+
64+
.. _mcli-atlas-security-ldap-get-output:
65+
66+
Output
67+
------
68+
69+
If the command succeeds, it returns the following output in the default
70+
format. If the command returns errors, see
71+
:ref:`Troubleshooting <mcli-troubleshooting>` for recommended solutions.
72+
73+
.. code-block:: sh
74+
:copyable: false
75+
76+
HOSTNAME PORT AUTHENTICATION AUTHORIZATION
77+
<LDAP-server-hostname> <port-number> true|false true|false
78+
79+
The default output contains a subset of the fields returned by this
80+
command. For the complete list of |json| fields returned by the command,
81+
see the :atlas:`API reference
82+
</reference/api/ldaps-configuration-get-current/#response-elements>`.
83+
84+
.. _mcli-atlas-security-ldap-get-egs:
85+
86+
Example
87+
-------
88+
89+
The following example uses the ``mongocli atlas security ldap get``
90+
command to get the current |ldap| configuration details for the
91+
|service| project specified using the {+default-profile+}.
92+
93+
.. tabs::
94+
95+
.. tab:: Default Output
96+
:tabid: default
97+
98+
.. code-block:: shell
99+
100+
mongocli atlas security ldap get
101+
102+
The previous command prints the following to the terminal:
103+
104+
.. code-block:: shell
105+
:copyable: false
106+
107+
HOSTNAME PORT AUTHENTICATION AUTHORIZATION
108+
atlas-ldaps-01.ldap.myteam.com 636 true true
109+
110+
.. tab:: JSON Output
111+
:tabid: json
112+
113+
.. code-block:: shell
114+
115+
mongocli atlas security ldap get
116+
117+
The previous command prints the following fields to the terminal:
118+
119+
.. code-block:: shell
120+
:copyable: false
121+
122+
{
123+
"ldap": {
124+
"authenticationEnabled": true,
125+
"authorizationEnabled": true,
126+
"hostname": "atlas-ldaps-01.ldap.myteam.com",
127+
"port": 636,
128+
"bindUsername": "CN=Administrator,CN=Users,DC=atlas-ldaps-01,DC=myteam,DC=com"
129+
}
130+
}

0 commit comments

Comments
 (0)