TMA-MONGODB-3.1
Ensure least privilege for database accounts
Beschreibung
MongoDB grants access to data and commands through "role-based" approach, MongoDB is shipped with built-in roles that provide the different levels of access commonly needed in a database system. In addition, you can create custom-roles.
So wird geprüft
Prüfmethode: Manuelle Prüfung
Diese Empfehlung kann nicht automatisch geprüft werden. Ein Scan führt sie mit diesen Anweisungen auf, wenn Sie --include-manual übergeben.
In mongosh run db.getSiblingDB("admin").system.users.find({"roles.role": {$in: ["dbOwner", "userAdmin", "userAdminAnyDatabase"]}, "roles.db": "admin"}, {user: 1, roles: 1}). Any account returned holds a built-in dbOwner/userAdmin/userAdminAnyDatabase role scoped to the admin database and must be justified or dropped.
So wird behoben
Behebungsmethode: Anleitung oder Infrastruktur-Patch
If any accounts were listed with built in-roles: dbOwner userAdmin userAdminAnyDatabase in "admin" database role then drop them.
Eigenschaften
- Betriebssysteme
- Beliebig
- Tags
- mongodbprivileges
- Referenz
- CIS MongoDB 8 Benchmark v2.0.0 - 3.1 Ensure least privilege for database accounts