SV-96571r1_rule
V-81857
SRG-APP-000133-DB-000362
MD3X-00-000270
CAT II
10
Use the following commands to remove unauthorized access to a MongoDB database.
db.revokePrivilegesFromRole()
db. revokeRolesFromUser()
MongoDB commands for role management can be found here:
https://docs.mongodb.com/v3.4/reference/method/js-role-management/
Run the following command to get the roles from a MongoDB database.
For each database in MongoDB:
use <database>
db.getRoles(
{
rolesInfo: 1,
showPrivileges:true,
showBuiltinRoles: true
}
)
Run the following command to the roles assigned to users:
use admin
db.system.users.find()
Analyze the output and if any roles or users have unauthorized access, this is a finding.
V-81857
False
MD3X-00-000270
Run the following command to get the roles from a MongoDB database.
For each database in MongoDB:
use <database>
db.getRoles(
{
rolesInfo: 1,
showPrivileges:true,
showBuiltinRoles: true
}
)
Run the following command to the roles assigned to users:
use admin
db.system.users.find()
Analyze the output and if any roles or users have unauthorized access, this is a finding.
M
3265