MD4X-00-005400 - MongoDB must enforce access restrictions associated with changes to the configuration of MongoDB or database(s).

Warning! Audit Deprecated

This audit has been deprecated and will be removed in a future update.

View Next Audit Version

Information

Failure to provide logical access restrictions associated with changes to configuration may have significant effects on the overall security of the system.

When dealing with access restrictions pertaining to change control, it should be noted that any changes to the hardware, software, and/or firmware components of the information system can potentially have significant effects on the overall security of the system.

Accordingly, only qualified and authorized individuals should be allowed to obtain access to system components for the purposes of initiating changes, including upgrades and modifications.

NOTE: Nessus has provided the target output to assist in reviewing the benchmark to ensure target compliance.

Solution

Verify that authentication has been enabled in the %MongoDB configuration file%:

https://docs.mongodb.com/v4.4/reference/configuration-options/.

If authorization is enabled, review the following to list existing user permissions.

https://docs.mongodb.com/v4.4/reference/privilege-actions/

Connect to MongoDB.

For each database (show dbs), identify the user's roles for the database.

use database
db.getUser(%username%)

The server will return a document with the user's roles.

To revoke a user's role from a database, use the method below:

db.revokeRolesFromUser( %username%, [ roles ], { writeConcern } )

https://docs.mongodb.com/v4.4/reference/method/db.revokeRolesFromUser/

To grant a role to a user, use the method below:

db.grantRolesToUser( %username%, [ roles ], { writeConcern } )

https://docs.mongodb.com/v4.4/reference/method/db.grantRolesToUser/

See Also

https://dl.dod.cyber.mil/wp-content/uploads/stigs/zip/U_MDB_Enterprise_Advanced_4-x_V1R1_STIG.zip

Item Details

References: CAT|II, CCI|CCI-001813, Rule-ID|SV-252175r816991_rule, STIG-ID|MD4X-00-005400, Vuln-ID|V-252175

Plugin: MongoDB

Control ID: 2bc4d52d1d1e4a4ce37effaf41114d54f0be9b3eb6229a2b9e9a7569254d9c3f