Currently, anytime an access-control enabled mongod or mongos receive a new connection from localhost, it must issue a query against admin.system.user to determine if there are any users defined in the system, and thus whether or not to grant the connection full access according to the localhost auth bypass.
If we determine that there is in fact a user defined, and thus the localhost exception should not be in effect, we cache that information on the connection so that that connection does not have to query admin.system.users for this purpose again.
We should instead cache the existence of an admin user process-wide so it only needs to be checked once, not once on every new connection.
- is duplicated by
-
SERVER-17845 Running the dropDatabase command can cause an election to occur
- Closed
- is related to
-
SERVER-12236 Don't query admin.system.users on new localhost connections if the localhost auth bypass has been explicitly disabled
- Closed
-
SERVER-17034 Deadlock between poorly-formed copydb and reading admin.system.users for localhost exception check
- Closed
-
SERVER-18415 Dropping admin user doesn't reenable localhost exception
- Closed