MD4X-00-003000 - If passwords are used for authentication, MongoDB must store only hashed, salted representations of passwords.

Information

The DoD standard for authentication is DoD-approved PKI certificates.

Authentication based on User ID and Password may be used only when it is not possible to employ a PKI certificate, and requires AO approval.

In such cases, database passwords stored in clear text, using reversible encryption, or using unsalted hashes would be vulnerable to unauthorized disclosure. Database passwords must always be in the form of one-way, salted hashes when stored internally or externally to MongoDB.

NOTE: Nessus has not performed this check. Please review the benchmark to ensure target compliance.

Solution

1. If authenticationMechanisms is not defined in the %MongoDB configuration file% (default location: /etc/mongod.conf), define one of more authenticationMechanisms, from the subset below:

SCRAM-SHA-1
SCRAM-SHA-256
MONGODB-X509
GSSAPI
PLAIN

which the MongoDB server process must accept.

Example:

setParameter:
authenticationMechanisms: SCRAM-SHA-1,SCRAM-SHA-256

2. If authSchemaVersion is less than 5.

Run the following command:

db.adminCommand({authSchemaUpgrade: 1})

In the unlikely event that an error is encountered, safely rerun the authSchemaUpgrade command.

See Also

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

Item Details

Category: IDENTIFICATION AND AUTHENTICATION

References: 800-53|IA-5(1)(c), CAT|I, CCI|CCI-000196, Rule-ID|SV-252159r981949_rule, STIG-ID|MD4X-00-003000, Vuln-ID|V-252159

Plugin: Unix

Control ID: 26d66b49d5469c15edb039459093400d8c611450daf7c3d9e1440175635b4e13