7.1 Ensure that key file permissions are set correctly

Information

The key file is used for authentication in the sharded cluster. Implementing proper file permissions on the key file will prevent unauthorized access to it.

Rationale:

Protecting the key file strengthens authentication in the sharded cluster and prevents unauthorized access to the MongoDB database.

Solution

Set the keyFile ownership tomongodb user and remove other permissions by executing these commands:

chmod 600 /keyfile

sudo chown mongodb:mongodb /keyfile

Default Value:

Not configured

See Also

https://workbench.cisecurity.org/files/168

Item Details

Category: CONFIGURATION MANAGEMENT

References: 800-53|CM-6b.

Plugin: Unix

Control ID: 8914906c0ec5a30e643b5fced07a2d2a8508329368f0943df881abc9473c4c0d