@@ -28,12 +28,13 @@ Syntax
2828 mongocli atlas dbuser create
2929 --username|-u <name-of-user>
3030 [ --output|-o <output-format> ]
31- --password|-p <password-of-user>
31+ [ --password|-p <password-of-user> ]
3232 [ --profile|-P <profile-name> ]
3333 [ --projectId <project-ID> ]
3434 --role <name-of-role>
35- [ --authDB <authentication-database> ]
3635 [ --deleteAfter <date-of-deletion> ]
36+ [ --x509Type <NONE|MANAGED|CUSTOMER> ]
37+ [ --awsIAMType <NONE|USER|ROLE> ]
3738
3839.. include:: /includes/fact-command-line-help.rst
3940
@@ -58,12 +59,28 @@ Options
5859
5960 * - ``--username``, ``-u``
6061 - string
61- - Username for authenticating the user to MongoDB.
62+ - Username for authenticating the user to MongoDB.
63+
64+ Must be a fully qualified distinguished name, as defined in `RFC
65+ 2253 <https://tools.ietf.org/html/rfc2253.html>`__, if:
66+
67+ - ``--x509Type`` is ``CUSTOMER``.
68+
69+ Must be an `Amazon Resource Name (ARN)
70+ <https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html>`__ if:
71+
72+ - ``--awsIAMType`` is ``USER`` or ``ROLE``.
73+
6274 - yes
6375
6476 * - ``--password``, ``-p``
6577 - string
66- - Password for authenticating the user to MongoDB.
78+ - Password for authenticating the user to MongoDB. Required if:
79+
80+ - ``--x509Type`` and ``--awsIAMType`` are omitted or ``NONE``,
81+ meaning that the database user authenticates with
82+ ``SCRAM-SHA``.
83+
6784 - no
6885
6986 * - ``--profile``, ``-P``
@@ -91,11 +108,6 @@ Options
91108 </security-add-mongodb-users/index.html#mongodb-database-user-privileges>`.
92109 - yes
93110
94- * - ``--authDB``
95- - string
96- - Name of the authentication database. Defaults to ``admin``.
97- - no
98-
99111 * - ``--deleteAfter``
100112 - date
101113 - |iso8601-time| after which |service| deletes the user. The
@@ -118,6 +130,50 @@ Options
118130 --deleteAfter 2020-08-01T12:30-04:00
119131 - no
120132
133+ * - ``--x509Type``
134+ - string
135+ - X.509 method by which the provided username is authenticated.
136+
137+ Accepted values are:
138+
139+ - ``NONE``: User doesn't authenticate with X.509.
140+ - ``MANAGED``: User authenticates with |service|-managed X.509.
141+ You do not need to provide a ``--password`` for the user.
142+ - ``CUSTOMER``: User authenticates with :atlas:`self-managed
143+ X.509 </security-self-managed-x509/#self-managed-x509>`.
144+ You do not need to provide a ``--password`` for the user. You
145+ must include a fully qualified Distinguished Name (DN) as the
146+ ``--username`` for users who authenticate with self-managed
147+ X.509.
148+
149+ If no value is given, |service| uses the default value of
150+ ``NONE``. You receive an error if the value is ``MANAGED`` or
151+ ``CUSTOMER`` and ``--awsIAMType`` is ``USER`` or ``ROLE``.
152+
153+ - no
154+
155+ * - ``--awsIAMType``
156+ - string
157+ - If this value is set, the new database user authenticates with
158+ |aws| IAM credentials.
159+
160+ Accepted values are:
161+
162+ - ``NONE``: User doesn't authenticate with AWS IAM credentials.
163+ - ``USER``: User authenticates with :atlas:`AWS IAM user
164+ credentials
165+ </security-add-mongodb-users/#database-user-authentication>`.
166+ You do not need to provide a ``--password`` for the user.
167+ - ``ROLE``: User authenticates with :atlas:`AWS IAM role
168+ credentials
169+ </security-add-mongodb-users/#database-user-authentication>`.
170+ You do not need to provide a ``--password`` for the user.
171+
172+ If no value is given, |service| uses the default value of
173+ ``NONE``. You receive an error if the value is ``USER`` or
174+ ``ROLE`` and ``--x509Type`` is ``MANAGED`` or ``CUSTOMER``.
175+ - no
176+
121177.. _dbuser-create-command-output:
122178
123179Output
@@ -165,15 +221,17 @@ to the terminal. To learn more about these fields, see
165221 :copyable: false
166222
167223 {
168- "roles": [{
169- "roleName": "atlasAdmin",
170- "databaseName": "admin"
171- }],
172- "groupId": "5e2211c17a3e5a48f5497de3",
173- "username": "user1",
174- "databaseName": "admin",
175- "ldapAuthType": "NONE"
176- }
224+ "roles": [{
225+ "roleName": "atlasAdmin",
226+ "databaseName": "admin"
227+ }],
228+ "groupId": "5e2211c17a3e5a48f5497de3",
229+ "username": "user1",
230+ "databaseName": "admin",
231+ "ldapAuthType": "NONE",
232+ "x509Type": "NONE",
233+ "awsIAMType": "NONE"
234+ }
177235
178236.. _dbuser-create-eg-2:
179237
@@ -209,19 +267,22 @@ To learn more about these fields, see :ref:`Output
209267 :copyable: false
210268
211269 {
212- "roles": [{
213- "roleName": "readWriteAnyDatabase",
214- "databaseName": "admin"
215- },
216- {
217- "roleName": "clusterMonitor",
218- "databaseName": "admin"
219- }],
220- "groupId": "5e2211c17a3e5a48f5497de3",
221- "username": "egUser",
222- "databaseName": "admin",
223- "ldapAuthType": "NONE"
224- }
270+ "roles": [{
271+ "roleName": "readWriteAnyDatabase",
272+ "databaseName": "admin"
273+ },
274+ {
275+ "roleName": "clusterMonitor",
276+ "databaseName": "admin"
277+ }
278+ ],
279+ "groupId": "5e2211c17a3e5a48f5497de3",
280+ "username": "egUser",
281+ "databaseName": "admin",
282+ "ldapAuthType": "NONE",
283+ "x509Type": "NONE",
284+ "awsIAMType": "NONE"
285+ }
225286
226287.. _dbuser-create-eg-3:
227288
@@ -252,15 +313,15 @@ to the terminal. To learn more about these fields, see
252313 :copyable: false
253314
254315 {
255- "roles": [{
256- "roleName": "clusterMonitor",
257- "databaseName": "admin"
258- }],
259- "groupId": "5e2211c17a3e5a48f5497de3",
260- "username": "tempUser",
261- "databaseName": "admin",
262- "ldapAuthType": "NONE",
263- "x509Type": "NONE",
264- "awsIAMType": "NONE",
265- "deleteAfterDate": "2020-07-31T00:00:00Z"
316+ "roles": [{
317+ "roleName": "clusterMonitor",
318+ "databaseName": "admin"
319+ }],
320+ "groupId": "5e2211c17a3e5a48f5497de3",
321+ "username": "tempUser",
322+ "databaseName": "admin",
323+ "ldapAuthType": "NONE",
324+ "x509Type": "NONE",
325+ "awsIAMType": "NONE",
326+ "deleteAfterDate": "2020-07-31T00:00:00Z"
266327 }
0 commit comments