[SERVER-24550] Error out when db.createUser() is used with wrong syntax Created: 14/Jun/16 Updated: 08/Jan/24 Resolved: 10/Aug/17 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Security, Shell |
| Affects Version/s: | None |
| Fix Version/s: | 3.5.12 |
| Type: | Improvement | Priority: | Minor - P4 |
| Reporter: | Ben Shteinfeld | Assignee: | Ben Shteinfeld |
| Resolution: | Done | Votes: | 0 |
| Labels: | neweng | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Backwards Compatibility: | Fully Compatible |
| Participants: |
| Description |
|
mongod 3.2.7 64-bit on Windows 10 x64. The `createUser()` command creates users that cannot be authenticated (`SCRAM-SHA-1 authentication failed, storedKey mismatch`)
The only way to get the users to authenticate is to subsequently change their password:
|
| Comments |
| Comment by Githook User [ 10/Aug/17 ] | ||
|
Author: {'name': 'Ben Shteinfeld', 'username': 'bshteinfeld', 'email': 'ben.shteinfeld@mongodb.com'}Message: | ||
| Comment by Ramon Fernandez Marina [ 14/Jun/16 ] | ||
|
Thanks for your report rustyx, I'm able to reproduce this behavior. It is interesting that the user record in system.users looks right, even when created with the wrong syntax. I'm going to repurpose this ticket as an improvement request to error out when the db.createUser() wrapper is used with the wrong syntax to avoid this confusion. Regards, | ||
| Comment by Rustam Abdullaev [ 14/Jun/16 ] | ||
|
OK it looks like I entered a wrong command
Should have been:
Now it works. But the question is then - how come createUser() succeeds when "user" is not specified? (for example, if "pwd" is not specified, it fails) |