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

Information

The DOD standard for authentication is DOD-approved public key infrastructure (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 authorizing official (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 provided the target output to assist in reviewing the benchmark to ensure target compliance.

Solution

1. Define authenticationMechanisms in the MongoDB Configuration file (default location: /etc/mongod.conf), define one of more authenticationMechanisms, from the subset below:

SCRAM-SHA-256
MONGODB-X509
GSSAPI
PLAIN

Example:

setParameter:
authenticationMechanisms: SCRAM-SHA-256

2. authSchemaVersion should be more than 5.

Run the following command:

> db.adminCommand({authSchemaUpgrade: 1})

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

See Also

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

Item Details

Category: IDENTIFICATION AND AUTHENTICATION

References: 800-53|IA-5(1)(c), CAT|I, CCI|CCI-000196, Rule-ID|SV-265917r1028796_rule, STIG-ID|MD7X-00-003800, Vuln-ID|V-265917

Plugin: Unix

Control ID: 35a53e33ad3fc689673d72ad697639d2c85b1ab76aa98433802df36b45ddaff3