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

Can't authenticate against database "*"

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 2.5.4
    • Affects Version/s: 2.4.6, 2.5.2
    • Component/s: Security
    • Labels:
      None
    • Minor Change
    • ALL

      The server doesn't have a consistent story as to whether * is a valid database name. _initializeUserRolesFromV1RolesArray rejects * due to its conflict with WILDCARD_RESOURCE_NAME, but NamespaceString::validDBName blacklists the * character only inside an #ifdef _WIN32 section.

      In 2.4.6:

      db.getSiblingDB("*").addUser({user:'x',pwd:'x',roles:['read']})
      db.getSiblingDB("*").auth('x','x')
      
      Wed Sep 18 17:28:42.103 [conn1] Privilege acquisition failed for x@* in database *: * is an invalid database name. (BadValue)
      

            Assignee:
            schwerin@mongodb.com Andy Schwerin
            Reporter:
            rassi J Rassi
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: