[SERVER-12818] Lock/Disable and Unlock/Enable a User Created: 21/Feb/14  Updated: 06/Dec/22

Status: Backlog
Project: Core Server
Component/s: Admin, Security
Affects Version/s: None
Fix Version/s: None

Type: Improvement Priority: Minor - P4
Reporter: Ger Hartnett Assignee: Backlog - Security Team
Resolution: Unresolved Votes: 15
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
Related
is related to SERVER-12785 Support start/end times for active ro... Open
Assigned Teams:
Server Security
Participants:
Case:

 Description   

Please provide the ability to lock/disable and unlock/enable a user account.

The user can login

$ mongo test -u author -p pass
MongoDB shell version: 2.4.8
connecting to: test
> 

Now admin locks/disables the user

> db.lockUser("author")

The user can't login

$ mongo test -u author -p pass
MongoDB shell version: 2.4.8
connecting to: test
Fri Feb 21 10:17:40.514 Error: 18 { code: 18, ok: 0.0, errmsg: "auth fails" } at src/mongo/shell/db.js:228
exception: login failed

Unlock the user

> db.unlockUser("author")

And now author can login again

$ mongo test -u author -p pass
MongoDB shell version: 2.4.8
connecting to: test
> 



 Comments   
Comment by Matthew Haught [ 22/Sep/17 ]

This would be extremely useful for migrating from MongoDB-CR accounts to external authentication.

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