MongoDB
TMA-MONGODB-5.4
Ensure that new entries are appended to the end of the log file
BaixaNível 2Automatizadamongodb
Descrição
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).
Como é verificado
Método de auditoria: Padrão de arquivo
- Arquivo
/etc/mongod.conf- Padrão
(?m)^[ \t]*logAppend:[ \t]*['\x22]?true\b
Como é corrigido
Método de correção: Orientação ou patch de infraestrutura
Set systemLog.logAppend: true in /etc/mongod.conf and restart mongod.
Propriedades
- Sistemas operacionais
- Qualquer
- Tags
- mongodblogging
- Referência
- CIS MongoDB 8 Benchmark v2.0.0 - 5.4 Ensure that new entries are appended to the end of the log file
Verificar este host
Execute isto em uma máquina que você tenha permissão para auditar. A varredura é somente leitura.
shell
tmaegis scan --target mongodb --level 2