[JAVA-394] allow user to authenticate against DB in isolated way: authentication doesnt apply to other connections and logs out when done Created: 13/Jul/11  Updated: 25/Jun/13  Resolved: 25/Jun/13

Status: Closed
Project: Java Driver
Component/s: Authentication
Affects Version/s: None
Fix Version/s: None

Type: New Feature Priority: Major - P3
Reporter: Antoine Girbal Assignee: Unassigned
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

this can be useful for security purpose, when some admin commands want to be isolated.
Possible clean solution: add a flag "shareAuth" to requestStart(), which is true by default.

If false:

  • the thread will stick to same connection as with regular requestStart.
  • any auth() being called will not be cached and shared at DB level.
  • when requestDone() is called, either logOut cmd is called, or connection is closed.


 Comments   
Comment by Jeffrey Yemin [ 25/Jun/13 ]

After discussing this with server team, we're moving in the opposite direction: a MongoClient is constructed with an immutable list of credentials. If a user wants a different list, a new MongoClient must be created.

Comment by Jeffrey Yemin [ 28/Aug/12 ]

Should coordinate with other drivers on this

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