TMAegisBêta
Plus de règles pour mongodb

MongoDB

TMA-MONGODB-5.4

Ensure that new entries are appended to the end of the log file

FaibleNiveau 2Automatiséemongodb

Description

By default, new log entries will overwrite old entries after a restart of the mongod or Mongols service. Enabling the systemLog.logAppend setting causes new entries to be appended to the end of the log file rather than overwriting the existing content of the log when the mongos or mongod instance restarts. 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]*logAppend:[ \t]*['\x22]?true\b

Méthode de correction

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

Set systemLog.logAppend: true in /etc/mongod.conf and restart mongod.

Propriétés

Systèmes d'exploitation
Tous
Étiquettes
mongodblogging
Référence
CIS MongoDB 8 Benchmark v2.0.0 - 5.4 Ensure that new entries are appended to the end of the log file

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 --level 2