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: 5c1d8ec817a69488c81c1d574b7333510c6ffa79ad65d5923fc2e7e54124972e