Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-12235

Don't require a database read on every new localhost connection when auth is on

    • Type: Icon: Improvement Improvement
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 3.0.3, 3.1.0
    • Affects Version/s: 2.4.8, 2.5.4
    • Component/s: Security
    • Labels:
    • Fully Compatible

      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.

            matt.dannenberg Matt Dannenberg
            spencer@mongodb.com Spencer Brody (Inactive)
            0 Vote for this issue
            5 Start watching this issue