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

Connecting to an authenticated server creates the database namespace regardless of success or failure.

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: 1.6.3
    • Component/s: Security
    • Labels:
      None
    • Environment:
      ubuntu 10.04
    • ALL

      There is a bug when running in an authenticated environment and a connection tries to access a database that does not exist on the system.

      What mongo is doing is creating the database trying to authenticate the given connection (see logs below). This now means when I go into mongo shell and type `show dbs;` I will see the database namespace created (but it is empty).

      This makes it very difficult to use `show dbs` to see what databases a given mongo daemon has associated with it because many of them could be empty. In addition, this becomes a larger issue when running a replication scenario which has a single slave and multiple masters (which works flawlessly as long as database names do not conflict).

      The logs of this happening:

      Tue Nov 9 04:55:06 [conn2] Accessing: clobby-staging for the first time
      Tue Nov 9 04:55:06 [conn2] assertion 10057 unauthorized db:clobby-staging lock type:-1 client:10.104.83.235 ns:clobby-staging.rooms query:

      { slug: "groupchat" }

      Tue Nov 9 04:55:06 [conn2] ntoskip:0 ntoreturn:-1
      Tue Nov 9 04:55:06 [conn2] query clobby-staging.rooms ntoreturn:1 exception 0ms

      This issue is an authentication issue that is similar to http://jira.mongodb.org/browse/SERVER-2079 but different enough use case that I felt it needed its own ticket.

            Assignee:
            backlog-server-platform DO NOT USE - Backlog - Platform Team
            Reporter:
            jsmestad Justin Smestad
            Votes:
            8 Vote for this issue
            Watchers:
            16 Start watching this issue

              Created:
              Updated:
              Resolved: