@@ -31,10 +31,8 @@ mechanisms.
31
31
Default Authentication Mechanism
32
32
--------------------------------
33
33
34
- In MongoDB 3.0, MongoDB changed the default authentication mechanism
35
- from ``MONGODB-CR`` to ``SCRAM-SHA-1``. In MongoDB 4.0, support for
36
- the deprecated ``MONGODB-CR`` mechanism was removed and ``SCRAM-SHA-256`` support was
37
- added.
34
+ The default authentication mechanism for MongoDB 6.0 and later is
35
+ ``SCRAM-SHA-256``.
38
36
39
37
To create a credential that authenticates by using the default
40
38
authentication mechanism, regardless of server version, create a
@@ -57,12 +55,6 @@ authentication mechanism:
57
55
:copyable:
58
56
:dedent:
59
57
60
- For challenge and response mechanisms, we recommend using the default
61
- authentication mechanism. This approach simplifies upgrading from MongoDB 2.6 to MongoDB
62
- 3.0, even after upgrading the authentication schema. For MongoDB 4.0 users, we also recommend
63
- the default authentication mechanism because it checks the mechanisms and uses the correct
64
- hashing algorithm.
65
-
66
58
SCRAM-Based Mechanisms
67
59
----------------------
68
60
@@ -73,15 +65,11 @@ based on the `IETF RFC 5802
73
65
best practices for implementation of challenge-response mechanisms for authenticating
74
66
users with passwords.
75
67
76
- MongoDB 3.0 introduced support for ``SCRAM-SHA-1``, which uses the
77
- ``SHA-1`` hashing function. MongoDB 4.0 introduced support for ``SCRAM-SHA-256`` which
78
- uses the ``SHA-256`` hashing function.
79
-
80
68
SCRAM-SHA-256
81
69
~~~~~~~~~~~~~
82
70
83
- Using this mechanism requires MongoDB 4.0 and
84
- ``featureCompatibilityVersion`` to be set to 4.0 .
71
+ Using this mechanism requires ``featureCompatibilityVersion`` to be set to 4.0
72
+ or a later version .
85
73
86
74
To explicitly create a credential of type ``SCRAM-SHA-256``, use
87
75
the ``createScramSha256Credential()`` method:
@@ -103,29 +91,6 @@ Or, you can use a connection string that explicitly specifies
103
91
:copyable:
104
92
:dedent:
105
93
106
- SCRAM-SHA-1
107
- ~~~~~~~~~~~
108
-
109
- To explicitly create a credential of type ``SCRAM-SHA-1``, use the
110
- ``createScramSha1Credential()`` method:
111
-
112
- .. literalinclude:: /includes/security/auth.scala
113
- :start-after: start-scram-sha-1
114
- :end-before: end-scram-sha-1
115
- :language: scala
116
- :copyable:
117
- :dedent:
118
-
119
- Or, you can use a connection string that explicitly specifies
120
- ``authMechanism=SCRAM-SHA-1``:
121
-
122
- .. literalinclude:: /includes/security/auth.scala
123
- :start-after: start-scram-sha-1-connection-string
124
- :end-before: end-scram-sha-1-connection-string
125
- :language: scala
126
- :copyable:
127
- :dedent:
128
-
129
94
x.509
130
95
-----
131
96
0 commit comments