[SERVER-6334] ReplSet connections magically gets reauthenticated after logging out Created: 06/Jul/12  Updated: 28/Oct/15  Resolved: 13/Jul/12

Status: Closed
Project: Core Server
Component/s: Internal Client
Affects Version/s: 2.1.2
Fix Version/s: 2.2.0-rc0

Type: Bug Priority: Major - P3
Reporter: Randolph Tan Assignee: Randolph Tan
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Duplicate
duplicates SERVER-6330 Can still perform unauthenticated que... Closed
Related
is related to SERVER-6117 SlaveOk Query fails with auth error e... Closed
Operating System: ALL
Participants:

 Description   

The issue here is that DBClientReplicaSet keeps an internal auth table when a user logs in, but does not attempt to remove entries when user logs out. And it uses this auth information to authenticate all new connections it creates. Note that a new connection gets created whenever an exception happened over that connection, so the same problem also occurs when the mongod node restarts after logging out.



 Comments   
Comment by Randolph Tan [ 13/Jul/12 ]

For authentication to work properly with replica sets when using the C++ driver (it has never been before), the auth method should be used to login and the logout method should be used to logout the connection.

Comment by auto [ 13/Jul/12 ]

Author:

{u'date': u'2012-07-11T11:07:15-07:00', u'email': u'randolph@10gen.com', u'name': u'Randolph Tan'}

Message: SERVER-6334 ReplSet connections magically gets reauthenticated after logging out

Make sure DBClientReplicaSet clears it's auth table entries whenever user logs out.
Branch: master
https://github.com/mongodb/mongo/commit/5a55760e7dfa3d637c547d5d8f04719503674e7d

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