@@ -25,12 +25,12 @@ confirm identity and establish trust to ensure security.
25
25
The mechanisms that you can use with the latest version of MongoDB Community
26
26
Edition are as follows:
27
27
28
- * :ref:`Default <default-auth-mechanism>`
29
- * :ref:`SCRAM-SHA-256 <scram-sha-256-auth-mechanism>`
30
- * :ref:`SCRAM-SHA-1 <scram-sha-1-auth-mechanism>`
31
- * :ref:`MONGODB-CR <mongodb-cr-auth-mechanism>`
32
- * :ref:`MONGODB-AWS <mongodb-aws-auth-mechanism>`
33
- * :ref:`X.509 <x509-auth-mechanism>`
28
+ - :ref:`Default <default-auth-mechanism>`
29
+ - :ref:`SCRAM-SHA-256 <scram-sha-256-auth-mechanism>`
30
+ - :ref:`SCRAM-SHA-1 <scram-sha-1-auth-mechanism>`
31
+ - :ref:`MONGODB-CR <mongodb-cr-auth-mechanism>`
32
+ - :ref:`MONGODB-AWS <mongodb-aws-auth-mechanism>`
33
+ - :ref:`X.509 <x509-auth-mechanism>`
34
34
35
35
To authenticate using ``Kerberos`` or ``LDAP``, see the
36
36
:doc:`Enterprise Authentication Mechanisms guide </fundamentals/enterprise-auth>`.
@@ -65,13 +65,18 @@ which they advertise support.
65
65
The following code snippets show how to specify the authentication mechanism,
66
66
using the following placeholders:
67
67
68
- * ``username`` - your MongoDB username
69
- * ``password`` - your MongoDB user's password
70
- * ``hostname`` - network address of your MongoDB deployment, accessible by your client
71
- * ``port`` - port number of your MongoDB deployment
72
- * ``authenticationDb`` - MongoDB database that contains your user's
73
- authentication data. If you omit this parameter, the driver uses the
74
- default value ``admin``.
68
+ - ``username``: your MongoDB username
69
+ - ``password``: your MongoDB user's password
70
+ - ``hostname``: network address of your MongoDB deployment that your
71
+ client can access
72
+ - ``port``: port number of your MongoDB deployment
73
+ - ``authenticationDb``: MongoDB database that contains your user's
74
+ authentication data
75
+
76
+ .. note::
77
+
78
+ If you omit the ``authenticationDb`` parameter, the driver uses the
79
+ default ``admin`` database.
75
80
76
81
Select the :guilabel:`Connection String` or the :guilabel:`MongoCredential`
77
82
tab below for instructions and sample code for specifying this authentication
@@ -123,13 +128,18 @@ algorithm, to authenticate your user.
123
128
The following code snippets show how to specify the authentication mechanism,
124
129
using the following placeholders:
125
130
126
- * ``username`` - your MongoDB username.
127
- * ``password`` - your MongoDB user's password.
128
- * ``hostname`` - network address of your MongoDB deployment, accessible by your client.
129
- * ``port`` - port number of your MongoDB deployment.
130
- * ``authenticationDb`` - MongoDB database that contains your user's
131
- authentication data. If you omit this parameter, the driver uses the
132
- default value ``admin``.
131
+ - ``username``: your MongoDB username
132
+ - ``password``: your MongoDB user's password
133
+ - ``hostname``: network address of your MongoDB deployment that your
134
+ client can access
135
+ - ``port``: port number of your MongoDB deployment
136
+ - ``authenticationDb``: MongoDB database that contains your user's
137
+ authentication data
138
+
139
+ .. note::
140
+
141
+ If you omit the ``authenticationDb`` parameter, the driver uses the
142
+ default ``admin`` database.
133
143
134
144
Select the :guilabel:`Connection String` or the :guilabel:`MongoCredential`
135
145
tab below for instructions and sample code for specifying this authentication
@@ -175,13 +185,18 @@ your user.
175
185
The following code snippets show how to specify the authentication mechanism,
176
186
using the following placeholders:
177
187
178
- * ``username`` - your MongoDB username.
179
- * ``password`` - your MongoDB user's password.
180
- * ``hostname`` - network address of your MongoDB deployment, accessible by your client.
181
- * ``port`` - port number of your MongoDB deployment.
182
- * ``authenticationDb`` - MongoDB database that contains your user's
183
- authentication data. If you omit this parameter, the driver uses the
184
- default value ``admin``.
188
+ - ``username``: your MongoDB username
189
+ - ``password``: your MongoDB user's password
190
+ - ``hostname``: network address of your MongoDB deployment that your
191
+ client can access
192
+ - ``port``: port number of your MongoDB deployment
193
+ - ``authenticationDb``: MongoDB database that contains your user's
194
+ authentication data
195
+
196
+ .. note::
197
+
198
+ If you omit the ``authenticationDb`` parameter, the driver uses the
199
+ default ``admin`` database.
185
200
186
201
Select the :guilabel:`Connection String` or the :guilabel:`MongoCredential`
187
202
tab below for instructions and sample code for specifying this authentication
@@ -254,12 +269,12 @@ provide your AWS IAM credentials in the next sections.
254
269
255
270
These sections contain code examples that use the following placeholders:
256
271
257
- * ``awsKeyId`` - value of your AWS access key ID
258
- * ``awsSecretKey`` - value of your AWS secret access key
259
- * ``atlasUri`` - network address of your MongoDB Atlas deployment
260
- * ``hostname`` - hostname of your MongoDB Atlas deployment
261
- * ``port`` - port of your MongoDB Atlas deployment
262
- * ``awsSessionToken`` - value of your AWS session token
272
+ - ``awsKeyId``: value of your AWS access key ID
273
+ - ``awsSecretKey``: value of your AWS secret access key
274
+ - ``atlasUri``: network address of your MongoDB Atlas deployment
275
+ - ``hostname``: hostname of your MongoDB Atlas deployment
276
+ - ``port``: port of your MongoDB Atlas deployment
277
+ - ``awsSessionToken``: value of your AWS session token
263
278
264
279
.. _java-mongodb-aws-sdk:
265
280
@@ -424,7 +439,6 @@ to the absolute path to this file, as shown in the following example:
424
439
425
440
export AWS_WEB_IDENTITY_TOKEN_FILE=<absolute path to file containing your OIDC token>
426
441
427
-
428
442
To authenticate by using **ECS container credentials**, set the ECS
429
443
endpoint relative URI in an environment variable by using ``bash`` or
430
444
a similar shell as shown in the following example:
@@ -433,9 +447,10 @@ a similar shell as shown in the following example:
433
447
434
448
export AWS_CONTAINER_CREDENTIALS_RELATIVE_URI=<your ECS endpoint>
435
449
436
- To authenticate using **EC2 container credentials**, make sure none of the
437
- aforementioned environment variables are set. The driver obtains the
438
- credentials from the default IPv4 EC2 instance metadata endpoint.
450
+ To authenticate by using **EC2 container credentials**, make sure none of the
451
+ environment variables mentioned in this section are set. The driver obtains the
452
+ credentials from the default IPv4 EC2 instance metadata endpoint instead
453
+ of from environment variables.
439
454
440
455
.. _java-mongodb-aws-mongoclient-configuration:
441
456
@@ -511,11 +526,16 @@ the subject name of the client certificate.
511
526
The following code snippets show how to specify the authentication mechanism,
512
527
using the following placeholders:
513
528
514
- * ``hostname`` - network address of your MongoDB deployment, accessible by your client.
515
- * ``port`` - port number of your MongoDB deployment.
516
- * ``authenticationDb`` - MongoDB database that contains your user's
517
- authentication data. If you omit this parameter, the driver uses the
518
- default value ``admin``.
529
+ - ``hostname``: network address of your MongoDB deployment that your
530
+ client can access
531
+ - ``port``: port number of your MongoDB deployment
532
+ - ``authenticationDb``: MongoDB database that contains your user's
533
+ authentication data
534
+
535
+ .. note::
536
+
537
+ If you omit the ``authenticationDb`` parameter, the driver uses the
538
+ default ``admin`` database.
519
539
520
540
Select the :guilabel:`Connection String` or the :guilabel:`MongoCredential`
521
541
tab below for instructions and sample code for specifying this authentication
0 commit comments