[SERVER-10815] Can't authenticate against database "*" Created: 18/Sep/13  Updated: 11/Jul/16  Resolved: 24/Oct/13

Status: Closed
Project: Core Server
Component/s: Security
Affects Version/s: 2.4.6, 2.5.2
Fix Version/s: 2.5.4

Type: Bug Priority: Major - P3
Reporter: J Rassi Assignee: Andy Schwerin
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Backwards Compatibility: Minor Change
Operating System: ALL
Participants:

 Description   

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)



 Comments   
Comment by Andy Schwerin [ 24/Oct/13 ]

In the v26 user schema, "*" is again a valid database name, FWIW.

Generated at Thu Feb 08 03:24:08 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.