[SERVER-18139] Adding a $external user in cluster (via mongos) causes $external creation in config.databases Created: 20/Apr/15  Updated: 17/Jun/16  Resolved: 20/Apr/15

Status: Closed
Project: Core Server
Component/s: Security, Sharding
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Minor - P4
Reporter: Anil Kumar Assignee: Kaloian Manassiev
Resolution: Duplicate Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Duplicate
duplicates SERVER-17917 Config DB gets updated even though th... Closed
Backwards Compatibility: Minor Change
Operating System: ALL
Steps To Reproduce:

st = new ShardingTest({name: "external-test", shards: 1);
st.getDB("config").databases.find({_id: "$external"});
st.getDB("$external").createUser({user: "test", roles: [

{db: "admin", role: "root"}

]})
st.getDB("config").databases.find({_id: "$external"});

Participants:

 Description   

Adding a "$external" user via mongos causes addition of an entry into config.databases as if the databases is created on one of the shard.

2015-04-20T14:21:31.416-0400 I SHARDING [conn39] couldn't find database [$external] in config db
2015-04-20T14:21:31.425-0400 I SHARDING [conn39]         put [$external] on: shard01:shard01/aks-osx.local:27018



 Comments   
Comment by Anil Kumar [ 20/Apr/15 ]

This additionally has an odd behaviour if a user tries to setup a new cluster with authentication and have not added any shard yet. If they try to add '$external' user as the first user, it will fail because there are no shards in the cluster yet.

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