TMAegis
Plus de règles pour mongodb

TMA-MONGODB-2.1

Ensure Authentication is configured

CritiqueNiveau 1Automatiséemongodb

Description

This setting ensures that all clients, users, servers are required to authenticate before being granted access to the MongoDB database. Authentication is the process of verifying the identity of a client. When access control, i.e. authorization, is enabled, MongoDB requires all clients to authenticate themselves in order to determine their access. Checks the YAML config file /etc/mongod.conf (SKIP when it does not exist).

Méthode de vérification

Méthode d'audit: Motif de fichier

Fichier
/etc/mongod.conf
Motif
(?m)^[ \t]*authorization:[ \t]*['\x22]?enabled\b

Méthode de correction

Méthode de correction: Recommandation ou correctif d'infrastructure

Create a user administrator first (use admin; db.createUser({user: '<admin>', pwd: passwordPrompt(), roles: [{role: 'userAdminAnyDatabase', db: 'admin'}]})), then set 'security: authorization: enabled' in /etc/mongod.conf and restart mongod.

Propriétés

Systèmes d'exploitation
Tous
Étiquettes
mongodbauthentication
Référence
CIS MongoDB 8 Benchmark v2.0.0 - 2.1 Ensure Authentication is configured

Vérifier cet hôte

Exécutez cette commande sur une machine que vous êtes autorisé à auditer. L'analyse est en lecture seule.

shell
tmaegis scan --target mongodb