[JAVA-2656] Deprecate MongoClient constructors that take multiple credentials. Created: 10/Nov/17  Updated: 29/Oct/23  Resolved: 15/Nov/17

Status: Closed
Project: Java Driver
Component/s: API, Configuration
Affects Version/s: None
Fix Version/s: 3.6.0

Type: Improvement Priority: Major - P3
Reporter: Rathi Gnanasekaran Assignee: Jeffrey Yemin
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
is depended on by DRIVERS-419 Deprecate lazy authentication and Mon... Closed
Related
is related to JAVA-2117 Document how to use connection string... Closed
Epic Link: Java MongoDB 3.6 Support

 Description   

As a consequence of privilege delegation in MongoDB, a MongoClient must eagerly authenticate all credentials that it has been provided. It does not know whether a user has been granted a privilege in another database (e.g. a user defined in database "db1" may have been granted a privilege to read from database "db2"). This makes it dangerous in general to create a MongoClient with more than one credential.

In addition, the session support added in MongoDB 3.6 requires that only a single user is authenticated.



 Comments   
Comment by Githook User [ 09/Jan/18 ]

Author:

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

Message: JAVA-2656: In the reference documentation, remove examples of constructors or factory methods that take multiple credentials
Branch: 3.6.x
https://github.com/mongodb/mongo-java-driver/commit/91798da0fe0e4a6f2a85f9cf20cc2fa8bf589fe5

Comment by Githook User [ 09/Jan/18 ]

Author:

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

Message: JAVA-2656: In the reference documentation, remove examples of constructors or factory methods that take multiple credentials
Branch: master
https://github.com/mongodb/mongo-java-driver/commit/fcf16ecb48efe5369527a0dd1ea90d9ee66016d6

Comment by Githook User [ 15/Nov/17 ]

Author:

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

Message: JAVA-2656: Deprecate ConnectionString#getCredentialList and replace with ConnectionString#getCredential
Branch: master
https://github.com/mongodb/mongo-java-driver/commit/127887a43643088fa3d364cc381bd2ed91767820

Comment by Githook User [ 15/Nov/17 ]

Author:

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

Message: JAVA-2656: Deprecate MongoClientSettings methods that take or return a list of credentials, and add otherwise equivalent methods that take or return a single credential
Branch: master
https://github.com/mongodb/mongo-java-driver/commit/c4222c64b3c533ba9822449a3f9637a5a4208757

Comment by Githook User [ 15/Nov/17 ]

Author:

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

Message: JAVA-2656: Deprecate MongoClient constructors that allow more than one credential to be used, and add otherwise equivalent constructors that take a single credential
Branch: master
https://github.com/mongodb/mongo-java-driver/commit/aa8a99c5a88a26e9ed1f3bb749a62c9ee4145e01

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