-
Type: Bug
-
Resolution: Done
-
Priority: Minor - P4
-
Affects Version/s: 3.4.0
-
Component/s: Authentication, Configuration
-
None
As of MongoDB 3.4 the username is optional for the X.509 authentication mechanism, and the Java driver supports that as of version 3.4.0 when using the MongoCredential API. But when using a connection string like:
mongodb://host/?authMechanism=MONGODB-X509&ssl=true
the driver silently ignores the authMechanism.
The driver should instead respect the auth mechanism, treating it as equivalent to:
MongoCredential.createMongoX509Credential()
For all other authMechanism, an IllegalArgumentException should be thrown if no username is specified.
- is depended on by
-
DRIVERS-344 Drivers MUST NOT require a username *in the URI* for MONGODB-X509
- Closed