[JAVA-2403] Don't require a username in the connection string for MONGODB-X509 Created: 09/Dec/16  Updated: 18/Apr/17  Resolved: 12/Dec/16

Status: Closed
Project: Java Driver
Component/s: Authentication, Configuration
Affects Version/s: 3.4.0
Fix Version/s: 3.4.1

Type: Bug Priority: Minor - P4
Reporter: Jeffrey Yemin Assignee: Jeffrey Yemin
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
is depended on by DRIVERS-344 Drivers MUST NOT require a username *... Closed
Epic Link: MongoDB 3.4 for Java driver

 Description   

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.



 Comments   
Comment by Githook User [ 12/Dec/16 ]

Author:

{u'username': u'jyemin', u'name': u'Jeff Yemin', u'email': u'jeff.yemin@10gen.com'}

Message: JAVA-2403: Don't require a username in the connection string for MONGODB-X509 authentication mechanism

For all other mechanisms throw an IllegalArgumentException if there is no username
Branch: 3.4.x
https://github.com/mongodb/mongo-java-driver/commit/79f4e6f9f43c8734e354cb825dc89e2f9c700bb7

Comment by Githook User [ 12/Dec/16 ]

Author:

{u'username': u'jyemin', u'name': u'Jeff Yemin', u'email': u'jeff.yemin@10gen.com'}

Message: JAVA-2403: Don't require a username in the connection string for MONGODB-X509 authentication mechanism

For all other mechanisms throw an IllegalArgumentException if there is no username
Branch: master
https://github.com/mongodb/mongo-java-driver/commit/435f7252afe1562dbd9388e36240d5472bd581e3

Generated at Thu Feb 08 08:57:07 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.