[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: |
|
||||||||||||||||
| 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: Make sure DBClientReplicaSet clears it's auth table entries whenever user logs out. |