SV-265936r1028813_rule
V-265936
SRG-APP-000340-DB-000304
MD7X-00-006800
CAT II
10
Ensure users are assigned only to authorized roles.
To revoke a role from a user in a database, run the following commands:
> use <database>
> db.revokeRolesFromUser( "<username>", [ <roles> ], { <writeConcern> } )
https://www.mongodb.com/docs/v7.0/reference/method/db.revokeRolesFromUser/
A organizational or site-specific document should exist and be reviewed to determine what built-in MongoDB roles and associated privileges may be considered authorized and what users are administrative users.
For each database, run the following commands in MongoDB as an administrative user to determine what users and roles they are assigned:
> use <database>
> db.getUsers()
For any nonadministrative user in a database, check if any roles are not compliant with the site-specific documentation for users.
If any nonadministrative user in a database has a noncompliant role, this is a finding.
V-265936
False
MD7X-00-006800
A organizational or site-specific document should exist and be reviewed to determine what built-in MongoDB roles and associated privileges may be considered authorized and what users are administrative users.
For each database, run the following commands in MongoDB as an administrative user to determine what users and roles they are assigned:
> use <database>
> db.getUsers()
For any nonadministrative user in a database, check if any roles are not compliant with the site-specific documentation for users.
If any nonadministrative user in a database has a noncompliant role, this is a finding.
M
5637