Skip to content

Commit e221a89

Browse files
committed
review comments
1 parent 93f7b42 commit e221a89

File tree

1 file changed

+43
-43
lines changed

1 file changed

+43
-43
lines changed

source/security/authentication.txt

Lines changed: 43 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -20,41 +20,42 @@ Authentication Mechanisms
2020
Overview
2121
--------
2222

23-
In this guide, you can learn how to authenticate with MongoDB using each
24-
**authentication mechanism** available in the MongoDB Community Edition.
25-
Authentication mechanisms are processes by which the driver and server
26-
confirm identity and establish trust to ensure security.
23+
In this guide, you can learn how to authenticate to a MongoDB Server by using
24+
each **authentication mechanism** available in the {+driver-long+}.
25+
Authentication is the process by which the driver proves its identity to the
26+
server to ensure security.
2727

28-
To select a specific authentication mechanism, you can specify the
29-
mechanism, your credentials, and other necessary information
30-
in the options of your connection string or in a ``Credential`` struct.
28+
To learn more about the connection string formats and authentication options,
29+
see the :manual:`Connection String Formats
30+
</reference/connection-string/#authentication-options >` section
31+
of the Connection Strings guide in the Server manual.
3132

32-
To learn more about the connection string options for authentication,
33-
see the :manual:`Authentication Options
34-
</reference/connection-string/#authentication-options>` section
35-
of the Connection String URI Format guide in the Server manual.
33+
.. note:: Enterprise Authentication Mechanisms
3634

37-
To authenticate using ``Kerberos`` or ``LDAP``, see the
38-
:ref:`Enterprise Authentication Mechanisms guide <kotlin-sync-enterprise-auth>`.
35+
This page describes the authentication mechanisms available in MongoDB
36+
Community Edition. To authenticate with mechanisms available in
37+
the MongoDB Enterprise Edition, like ``Kerberos`` or ``LDAP``, see the
38+
:ref:`Enterprise Authentication Mechanisms guide <kotlin-sync-enterprise-auth>`.
3939

40-
For more information on establishing a connection to your MongoDB cluster,
41-
see :ref:`Connect to MongoDB <kotlin-sync-connect>`.
42-
43-
.. _kotlin-sybc-auth-default:
40+
.. _kotlin-sync-auth-default:
4441

4542
Default
4643
-------
4744

4845
The default authentication mechanism setting uses one of the following
4946
authentication mechanisms depending on what your MongoDB server supports:
5047

51-
#. ``SCRAM-SHA-256``
52-
#. ``SCRAM-SHA-1``
48+
#. ``SCRAM-SHA-256``: An authentication mechanism that
49+
uses your database username and password, encrypted with the ``SHA-256``
50+
algorithm
51+
#. ``SCRAM-SHA-1``: An authentication mechanism that
52+
uses your database username and password, encrypted with the ``SHA-1``
53+
algorithm
5354

5455
Server versions 4.0 and later use ``SCRAM-SHA-256`` as the default
5556
mechanism.
5657

57-
The following code snippets show how to use the default authentication mechanism,
58+
The following code snippets show how to use the default authentication mechanism by
5859
using the following placeholders:
5960

6061
* ``db_username`` - your MongoDB database username
@@ -74,7 +75,7 @@ mechanism:
7475
.. tab::
7576
:tabid: Connection String
7677

77-
To specify the default authentication mechanism using a connection
78+
To specify the default authentication mechanism by using a connection
7879
string, omit the mechanism. Your code to instantiate a ``MongoClient``
7980
should resemble the following:
8081

@@ -87,7 +88,7 @@ mechanism:
8788
.. tab::
8889
:tabid: MongoCredential
8990

90-
To specify the default authentication mechanism using the
91+
To specify the default authentication mechanism by using the
9192
``MongoCredential`` class, use the ``createCredential()`` method.
9293
Also, enable TLS by calling the
9394
`applyToSslSettings() <{+api+}/apidocs/mongodb-driver-core/com/mongodb/MongoClientSettings.Builder.html#applyToSslSettings(com.mongodb.Block)>`__
@@ -101,9 +102,8 @@ mechanism:
101102
:end-before: end-default-mongo-cred
102103
:dedent:
103104

104-
For more information on salted challenge-response authentication mechanisms (SCRAM)
105-
that MongoDB supports, see the :manual:`SCRAM </core/security-scram/>` section of
106-
the Server manual.
105+
For more information about using SCRAM with MongoDB, see the
106+
:manual:`SCRAM </core/security-scram/>` section of the Server manual.
107107

108108
.. _kotlin-sync-auth-scramsha256:
109109

@@ -116,11 +116,11 @@ SCRAM-SHA-256
116116
in MongoDB 4.0.
117117

118118
``SCRAM-SHA-256``, as defined by `RFC 7677 <https://www.rfc-editor.org/rfc/rfc7677>`__,
119-
is a salted challenge-response authentication mechanism
119+
is a Salted Challenge Response Authentication Mechanism
120120
(SCRAM) that uses your username and password, encrypted with the ``SHA-256``
121121
algorithm, to authenticate your user.
122122

123-
The following code snippets show how to specify the authentication mechanism,
123+
The following code snippets show how to specify the authentication mechanism by
124124
using the following placeholders:
125125

126126
* ``db_username`` - your MongoDB database username.
@@ -140,7 +140,7 @@ mechanism:
140140
.. tab::
141141
:tabid: Connection String
142142

143-
To specify the ``SCRAM-SHA-256`` authentication mechanism using a
143+
To specify the ``SCRAM-SHA-256`` authentication mechanism by using a
144144
connection string, assign the ``authMechanism`` parameter the value
145145
``SCRAM-SHA-256`` in your connection string. Your code to instantiate
146146
a ``MongoClient`` should resemble the following:
@@ -154,7 +154,7 @@ mechanism:
154154
.. tab::
155155
:tabid: MongoCredential
156156

157-
To specify the default authentication mechanism using the
157+
To specify the default authentication mechanism by using the
158158
``MongoCredential`` class, use the
159159
`createScramSha256Credential() <{+api+}/apidocs/mongodb-driver-core/com/mongodb/MongoCredential.html#createScramSha256Credential(java.lang.String,java.lang.String,char[])>`__
160160
method. Also, enable TLS by calling the
@@ -179,12 +179,12 @@ SCRAM-SHA-1
179179
3.0, 3.2, 3.4, and 3.6.
180180

181181
``SCRAM-SHA-1``, as defined by `RFC 5802 <https://www.rfc-editor.org/rfc/rfc5802>`__,
182-
is a salted challenge-response mechanism (SCRAM) that uses your
182+
is a Salted Challenge Response Authentication Mechanism (SCRAM) that uses your
183183
username and password, encrypted with the ``SHA-1`` algorithm, to authenticate
184184
your user.
185185

186-
The following code snippets show how to specify the authentication mechanism,
187-
using the following placeholders:
186+
The following code snippets show how to specify the authentication mechanism
187+
by using the following placeholders:
188188

189189
* ``db_username`` - your MongoDB database username.
190190
* ``db_password`` - your MongoDB database user's password.
@@ -203,7 +203,7 @@ mechanism:
203203
.. tab::
204204
:tabid: Connection String
205205

206-
To specify the ``SCRAM-SHA-1`` authentication mechanism using a
206+
To specify the ``SCRAM-SHA-1`` authentication mechanism by using a
207207
connection string, assign the ``authMechanism`` parameter the value
208208
``SCRAM-SHA-1`` in your connection string. Your code to instantiate
209209
a ``MongoClient`` should resemble the following:
@@ -217,7 +217,7 @@ mechanism:
217217
.. tab::
218218
:tabid: MongoCredential
219219

220-
To specify the default authentication mechanism using the
220+
To specify the default authentication mechanism by using the
221221
``MongoCredential`` class, use the
222222
`createScramSha1Credential() <{+api+}/apidocs/mongodb-driver-core/com/mongodb/MongoCredential.html#createScramSha1Credential(java.lang.String,java.lang.String,char[])>`__
223223
method. Also, enable TLS by calling the
@@ -241,11 +241,11 @@ The ``X.509`` authentication mechanism uses
241241
:wikipedia:`TLS <Transport_Layer_Security>` with X.509 certificates to
242242
authenticate your user, identified by the relative distinguished names
243243
(RDNs) of your client certificate. When you specify the ``X.509``
244-
authentication mechanism, the server authenticates the connection using
244+
authentication mechanism, the server authenticates the connection by using
245245
the subject name of the client certificate.
246246

247-
The following code snippets show how to specify the authentication mechanism,
248-
using the following placeholders:
247+
The following code snippets show how to specify the authentication mechanism
248+
by using the following placeholders:
249249

250250
* ``hostname`` - network address of your MongoDB server, accessible by your client.
251251
* ``port`` - port number of your MongoDB server.
@@ -262,7 +262,7 @@ mechanism:
262262
.. tab::
263263
:tabid: Connection String
264264

265-
To specify the ``X.509`` authentication mechanism using a connection
265+
To specify the ``X.509`` authentication mechanism by using a connection
266266
string, assign the ``authMechanism`` parameter the value ``MONGODB-X509``
267267
and enable TLS by assigning the ``tls``
268268
parameter a ``true`` value. Your code to instantiate a ``MongoClient``
@@ -277,7 +277,7 @@ mechanism:
277277
.. tab::
278278
:tabid: MongoCredential
279279

280-
To specify the ``X.509`` authentication mechanism using the
280+
To specify the ``X.509`` authentication mechanism by using the
281281
``MongoCredential`` class, use the
282282
`createMongoX509Credential() <{+api+}/apidocs/mongodb-driver-core/com/mongodb/MongoCredential.html#createMongoX509Credential(java.lang.String)>`__
283283
method. Also, enable TLS by calling the
@@ -345,7 +345,7 @@ perform the following:
345345

346346
1. Specify the authentication mechanism
347347
#. Add the SDK as a dependency to your project
348-
#. Supply your credentials using one of the methods in the credential
348+
#. Supply your credentials by using one of the methods in the credential
349349
provider chain
350350

351351
To specify the authentication mechanism by using a ``MongoCredential``,
@@ -379,10 +379,10 @@ AWS documentation for the version you need:
379379

380380
.. note::
381381

382-
For the AWS SDK for Java v2, the Java driver currently tests using the
382+
For the AWS SDK for Java v2, the Java driver currently tests by using the
383383
``software.amazon.awssdk:auth:2.18.9`` dependency.
384384

385-
For the AWS SDK for Java v1, the Java driver currently tests using the
385+
For the AWS SDK for Java v1, the Java driver currently tests by using the
386386
``com.amazonaws:aws-java-sdk-core:1.12.337`` dependency.
387387

388388
To supply your credentials, see the following AWS documentation for the
@@ -475,7 +475,7 @@ a similar shell as shown in the following example:
475475

476476
export AWS_CONTAINER_CREDENTIALS_RELATIVE_URI=<your ECS endpoint>
477477

478-
To authenticate using **EC2 container credentials**, make sure none of the
478+
To authenticate by using **EC2 container credentials**, make sure none of the
479479
aforementioned environment variables are set. The driver obtains the
480480
credentials from the default IPv4 EC2 instance metadata endpoint.
481481

0 commit comments

Comments
 (0)