TMA-MONGO-SYSTEM-LOG-DESTINATION
Ensure system activity is logged to a file or syslog
MediaNivel 1Automatizadamongodb
Descripción
systemLog.destination file or syslog keeps server logs persistently instead of only on stdout. Checks the YAML config file /etc/mongod.conf (SKIP when it does not exist).
Cómo se verifica
Método de auditoría: Patrón de archivo
- Archivo
/etc/mongod.conf- Patrón
(?m)^systemLog:[ \t]*\n(?:[ \t]*(?:#[^\n]*)?\n|[ \t]+[^\n]*\n)*?[ \t]+destination:[ \t]*['\x22]?(?:file|syslog)\b
Cómo se corrige
Método de corrección: Guía o parche de infraestructura
Set systemLog.destination: file and systemLog.path: /var/log/mongodb/mongod.log in /etc/mongod.conf and restart mongod
Propiedades
- Sistemas operativos
- Cualquiera
- Etiquetas
- mongodbdatabaselogging
- Referencia
- CIS MongoDB Benchmark - Audit Logging / System Log (verify section number for your release)
Verificar este host
Ejecute esto en un equipo que tenga permiso para auditar. El escaneo es de solo lectura.
shell
tmaegis scan --target mongodb