@@ -33,24 +33,18 @@ server to ensure security.
33
33
:ref:`Enterprise Authentication Mechanisms guide <kotlin-sync-enterprise-auth>`.
34
34
35
35
.. _kotlin-sync-auth-default:
36
+ .. _kotlin-sync-auth-scramsha256:
36
37
37
- Default
38
- -------
39
-
40
- The default authentication mechanism setting uses one of the following
41
- authentication mechanisms depending on what your MongoDB server supports:
42
-
43
- #. ``SCRAM-SHA-256``: An authentication mechanism that
44
- uses your database username and password, encrypted with the ``SHA-256``
45
- algorithm
46
- #. ``SCRAM-SHA-1``: An authentication mechanism that
47
- uses your database username and password, encrypted with the ``SHA-1``
48
- algorithm
38
+ SCRAM-SHA-256
39
+ -------------
49
40
50
- {+mdb-server+} versions 4.0 and later use ``SCRAM-SHA-256`` as the default
51
- authentication mechanism.
41
+ ``SCRAM-SHA-256``, as defined by `RFC 7677 <https://www.rfc-editor.org/rfc/rfc7677>`__,
42
+ is a Salted Challenge Response Authentication Mechanism
43
+ (SCRAM) that uses your username and password, encrypted with the ``SHA-256``
44
+ algorithm, to authenticate your user. This is the default authentication
45
+ mechanism.
52
46
53
- The following code snippets show how to use the default authentication mechanism by
47
+ The following code snippets show how to specify this default authentication mechanism by
54
48
using the following placeholders:
55
49
56
50
* ``db_username``: Your MongoDB database username.
@@ -93,34 +87,8 @@ mechanism:
93
87
:end-before: end-default-mongo-cred
94
88
:dedent:
95
89
96
- For more information about using SCRAM with MongoDB, see the
97
- :manual:`SCRAM </core/security-scram/>` section of the {+mdb-server+} manual.
98
-
99
- .. _kotlin-sync-auth-scramsha256:
100
-
101
- SCRAM-SHA-256
102
- -------------
103
-
104
- .. note::
105
-
106
- ``SCRAM-SHA-256`` is the default authentication method for {+mdb-server+}
107
- versions 4.0 and later.
108
-
109
- ``SCRAM-SHA-256``, as defined by `RFC 7677 <https://www.rfc-editor.org/rfc/rfc7677>`__,
110
- is a Salted Challenge Response Authentication Mechanism
111
- (SCRAM) that uses your username and password, encrypted with the ``SHA-256``
112
- algorithm, to authenticate your user.
113
-
114
- The following code snippets show how to specify the authentication mechanism by
115
- using the following placeholders:
116
-
117
- * ``db_username``: Your MongoDB database username.
118
- * ``db_password``: Your MongoDB database user's password.
119
- * ``hostname``: The network address of your MongoDB deployment, accessible by your client.
120
- * ``port``: The port number of your MongoDB deployment.
121
- * ``authenticationDb``: The MongoDB database that contains your user's
122
- authentication data. If you omit this parameter, the driver uses the
123
- default value ``admin``.
90
+ You can also explicitly specify the `SCRAM-SHA-256`` authentication mechanism,
91
+ as shown in the following code snippets.
124
92
125
93
Select the :guilabel:`Connection String` or the :guilabel:`MongoCredential`
126
94
tab below for instructions and sample code for specifying this authentication
@@ -161,10 +129,6 @@ mechanism:
161
129
SCRAM-SHA-1
162
130
-----------
163
131
164
- .. note::
165
- ``SCRAM-SHA-1`` is the default authentication method for MongoDB versions
166
- {+mdb-server+} versions 3.6 and earlier.
167
-
168
132
``SCRAM-SHA-1``, as defined by `RFC 5802 <https://www.rfc-editor.org/rfc/rfc5802>`__,
169
133
is a Salted Challenge Response Authentication Mechanism (SCRAM) that uses your
170
134
username and password, encrypted with the ``SHA-1`` algorithm, to authenticate
0 commit comments