[SERVER-12093] Improve error message on mongos when adding a user with a role that doesn't exist Created: 13/Dec/13  Updated: 11/Jul/16  Resolved: 14/Jan/14

Status: Closed
Project: Core Server
Component/s: Security, Sharding, Usability
Affects Version/s: 2.5.4
Fix Version/s: 2.5.5

Type: Bug Priority: Major - P3
Reporter: Spencer Brody (Inactive) Assignee: Spencer Brody (Inactive)
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Backwards Compatibility: Fully Compatible
Operating System: ALL
Participants:

 Description   

On mongod:

> db.createUser({user: 'bob', pwd: 'pwd', roles: ['fakeRole']});
2013-12-13T16:31:57.329-0500 Error: couldn't add user: No role named fakeRole@test at src/mongo/shell/db.js:1016

On mongos:

> db.createUser({user:'bob', pwd: 'pwd', roles:['fakeRole']})
2013-12-13T16:30:35.561-0500 Error: couldn't add user: invalid parameter: expected an object () at src/mongo/shell/db.js:1016



 Comments   
Comment by Githook User [ 14/Jan/14 ]

Author:

{u'username': u'stbrody', u'name': u'Spencer T Brody', u'email': u'spencer@10gen.com'}

Message: SERVER-12093 Improve error message when adding a user with a role that doesn't exist on mongos
Branch: master
https://github.com/mongodb/mongo/commit/db151b44bce6975fd66e6eece4088035526e57ae

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