Skip to content

DOCSP-50019 - Remove EOL Server versions #132

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
May 22, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions source/connect-to-mongo/network-compression.txt
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ of data passed over the network between MongoDB and your application.

The driver supports the following algorithms:

- `Snappy <https://google.github.io/snappy/>`__: available in MongoDB 3.4 and later.
- `Zlib <https://zlib.net/>`__: available in MongoDB 3.6 and later.
- `Zstandard <https://github.com/facebook/zstd/>`__: available in MongoDB 4.2 and later.
- `Snappy <https://google.github.io/snappy/>`__
- `Zlib <https://zlib.net/>`__
- `Zstandard <https://github.com/facebook/zstd/>`__

The driver tests against the following versions of these libraries:

Expand Down Expand Up @@ -95,4 +95,4 @@ guide, see the following API documentation:
- `MongoClient <{+driver-api+}/MongoClient.html>`__
- `createSnappyCompressor() <{+core-api+}/MongoCompressor.html#createSnappyCompressor()>`__
- `createZlibCompressor() <{+api-root+}//mongodb-driver-core/com/mongodb/MongoCompressor.html#createZlibCompressor()>`__
- `createZstdCompressor() <{+core-api+}/MongoCompressor.html#createZstdCompressor()>`__
- `createZstdCompressor() <{+core-api+}/MongoCompressor.html#createZstdCompressor()>`__
90 changes: 3 additions & 87 deletions source/includes/mongodb-compatibility-table-java-rs.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,120 +7,36 @@
- MongoDB 8.1
- MongoDB 8.0
- MongoDB 7.0
- MongoDB 6.1
- MongoDB 6.0
- MongoDB 5.0
- MongoDB 4.4
- MongoDB 4.2
- MongoDB 4.0
- MongoDB 3.6

* - 5.5
* - 5.2 to 5.5
- ✓
- ✓
- ✓
- ✓
- ✓
- ✓
- ✓
- ✓
-
-

* - 5.2 to 5.4
- ✓
- ✓
- ✓
- ✓
- ✓
- ✓
- ✓
- ✓
- ✓
-

* - 4.10 to 5.1
- ⊛
- ⊛
- ✓
- ✓
- ✓
- ✓
- ✓
- ✓
- ✓
- ✓

* - 4.8 to 4.9
* - 4.7 to 4.9
- ⊛
- ⊛
- ⊛
- ✓
- ✓
- ✓
- ✓
- ✓
- ✓
- ✓

* - 4.7
* - 4.0 to 4.6
- ⊛
- ⊛
- ⊛
- ⊛
- ✓
- ✓
- ✓
- ✓
- ✓
- ✓

* - 4.3 to 4.6
- ⊛
- ⊛
- ⊛
- ⊛
- ⊛
- ✓
- ✓
- ✓
- ✓
- ✓

* - 4.1 to 4.2
- ⊛
- ⊛
- ⊛
- ⊛
- ⊛
- ⊛
- ✓
- ✓
- ✓
- ✓

* - 4.0
- ⊛
- ⊛
- ⊛
- ⊛
- ⊛
- ⊛
- ⊛
- ✓
- ✓
- ✓

* - 3.11 to 3.12
- ✗ [#v3-note]_
- ⊛
- ⊛
- ⊛
- ⊛
- ⊛
- ⊛
- ✓
- ✓
- ✓

.. [#v3-note] These driver versions are not compatible with MongoDB 8.1 or later because of an authentication issue. To learn more, see :ref:`java-rs-server-8.1-incompatibility`.
37 changes: 10 additions & 27 deletions source/security/auth.txt
Original file line number Diff line number Diff line change
Expand Up @@ -42,13 +42,8 @@ mechanisms.
Default Authentication Mechanism
--------------------------------

In MongoDB 3.0, MongoDB changed the default authentication mechanism
from ``MONGODB-CR`` to ``SCRAM-SHA-1``. In MongoDB 4.0, support for
the deprecated ``MONGODB-CR`` mechanism was removed and ``SCRAM-
SHA-256`` support was added.

To create a credential that authenticates by using the default
authentication mechanism, regardless of server version, create a
authentication mechanism, ``SCRAM-SHA-256``, create a
credential by using the ``createCredential()`` static factory method:

.. code-block:: java
Expand All @@ -73,33 +68,24 @@ authentication mechanism:

MongoClient mongoClient = MongoClients.create("mongodb://user1:pwd1@host1/?authSource=db1");

For challenge and response mechanisms, using the default
authentication mechanism is the recommended approach, as it makes
upgrading from MongoDB 2.6 to MongoDB 3.0 more simple, even after
upgrading the authentication schema. For MongoDB 4.0 users, using the
default authentication mechanism is also recommended as the mechanisms are
checked and the correct hashing algorithm is used.
For challenge and response mechanisms, we recommend using the default
authentication mechanism. This simplifies upgrades and ensures that the correct hashing
algorithm is used.

SCRAM-Based Mechanisms
----------------------

Salted Challenge-Response Authentication Mechanism (``SCRAM``) has been
the default authentication mechanism for MongoDB since 3.0. ``SCRAM`` is
Salted Challenge-Response Authentication Mechanism (``SCRAM``) is
based on the `IETF RFC 5802
<https://datatracker.ietf.org/doc/html/rfc5802>`__ standard that defines
best practices for implementation of challenge-response mechanisms for authenticating
users with passwords.

MongoDB 3.0 introduced support for ``SCRAM-SHA-1``, which uses the
``SHA-1`` hashing function. MongoDB 4.0 introduced support for ``SCRAM-
SHA-256`` which uses the ``SHA-256`` hashing function.
users with passwords. MongoDB supports both ``SCRAM-SHA-1``, which uses the
``SHA-1`` hashing function, and ``SCRAM-
SHA-256``, which uses the ``SHA-256`` hashing function.

SCRAM-SHA-256
~~~~~~~~~~~~~

Using this mechanism requires MongoDB 4.0 and
``featureCompatibilityVersion`` to be set to 4.0.

To explicitly create a credential of type ``SCRAM-SHA-256``, use
the ``createScramSha256Credential()`` method:

Expand Down Expand Up @@ -149,7 +135,6 @@ To explicitly create a credential of type ``SCRAM-SHA-1``, use the
Or, you can use a connection string that explicitly specifies
``authMechanism=SCRAM-SHA-1``:


.. code-block:: java

MongoClient mongoClient = MongoClients.create("mongodb://user1:pwd1@host1/?authSource=db1&authMechanism=SCRAM-SHA-1");
Expand All @@ -159,12 +144,10 @@ MONGODB-CR

.. important::

Starting in version 4.0, MongoDB removes support for the deprecated
MongoDB no longer supports the deprecated
MongoDB Challenge-Response (``MONGODB-CR``) authentication mechanism.

If your deployment has user credentials stored in a ``MONGODB-CR`` schema,
you must upgrade to use a ``SCRAM``-based mechanism before you
upgrade to version 4.0.
you must upgrade to a ``SCRAM``-based mechanism.

To explicitly create a credential of type ``MONGODB-CR`` use the
``createMongCRCredential()`` static factory method:
Expand Down
Loading