-
Type: Task
-
Resolution: Done
-
Priority: Major - P3
-
None
-
Component/s: None
-
None
Server 2.8 will be implementing SCRAM-SHA-1 as a new authentication mechanism. Eventually, it will become the default mechanism in the server and MONGODB-CR will be removed.
As such, all drivers will need to support SCRAM-SHA-1 for the 2.8 release. RFC 5802 describes the mechanism and how it should be implemented.
To support authentication upgrades from older versions of MongoDB to 2.8 drivers will use the following algorithm:
- If the application specifies a particular authMechanism (e.g. MONGODB-CR) the driver will continue to honor it.
- If the application provides a user and password, or calls the driver's authenticate method, but provides no explicit authMechanism the following applies:
- The server's maxWireVersion is being bumped to 3 for MongoDB 2.8 - See
SERVER-15330 - If the server's maxWireVersion >= 3 the driver will use SCRAM-SHA-1 (i.e. the driver's default mechanism is SCRAM-SHA-1)
- If the server's maxWireVersion < 3 the driver will use MONGODB-CR (i.e. the driver's default mechanism remains MONGODB-CR)
- The server's maxWireVersion is being bumped to 3 for MongoDB 2.8 - See
MongoDB 2.8 will always support SCRAM-SHA-1 if at least MONGODB-CR was specified in --authenticationMechanisms, so drivers do not have to "try and fall back". If SCRAM credentials don't yet exist for a user the server will create them on-the-fly when the driver uses SCRAM-SHA-1 for mechanism.
Note - RFC 5802 SCRAM is relatively new (2010). The version of cyrus-sasl that ships with RHEL/CentOS 5/6 and Amazon Linux (2.1.23) does not support SCRAM at all. Drivers can not use cyrus-sasl to implement SCRAM-SHA-1 and will have to write native implementations. If your language runtime or standard library provides an implementation of HMAC and SHA1 this is not difficult following the RFC. See the python driver implementation for one example.
- depends on
-
SERVER-14830 SCRAM-SHA-1 conversations fail to complete
- Closed
-
JAVA-828 Support SASL SCRAM-SHA1 authentication
- Closed
-
JAVA-1461 Support authentication mechanism negotiation
- Closed
-
NODE-230 Implement the SCRAM-SHA-1 SASL Mechanism
- Closed
-
PYTHON-706 Implement SCRAM-SHA-1 Authentication Mechanism
- Closed
-
SERVER-7596 Support SCRAM-SHA-1 SASL Mechanism
- Closed
-
CSHARP-990 Implement SCRAM-SHA-1 Authentication Mechanism
- Closed
-
CXX-298 Implement the SCRAM-SHA-1 SASL Mechanism
- Closed
-
CDRIVER-404 Implement the SCRAM-SHA-1 SASL Mechanism
- Closed
-
PYTHON-764 SCRAM-SHA-1 upgrade / downgrade support
- Closed
-
RUBY-791 Implement the SCRAM-SHA-1 SASL Mechanism
- Closed
- is related to
-
SERVER-16167 2.8.0-rc0 shell can't auth to a 2.4 server
- Closed
-
SERVER-15177 Use native SCRAM-SHA-1 in Enterprise version
- Closed
-
SERVER-15179 Upgrade/downgrade steps MONGODB-CR -> SCRAM
- Closed
- related to
-
CXX-394 Do not use MONGODB-CR for recent 2.7 builds
- Closed