MongoDB
TMA-MONGO-SYSTEM-LOG-DESTINATION
Ensure system activity is logged to a file or syslog
中级别 1自动化mongodb
说明
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).
检查方式
审计方法: 文件正则匹配
- 文件
/etc/mongod.conf- 匹配模式
(?m)^systemLog:[ \t]*\n(?:[ \t]*(?:#[^\n]*)?\n|[ \t]+[^\n]*\n)*?[ \t]+destination:[ \t]*['\x22]?(?:file|syslog)\b
修复方式
修复方法: 操作指南或基础设施补丁
Set systemLog.destination: file and systemLog.path: /var/log/mongodb/mongod.log in /etc/mongod.conf and restart mongod
属性
- 操作系统
- 任意
- 标签
- mongodbdatabaselogging
- 参考
- CIS MongoDB Benchmark - Audit Logging / System Log (verify section number for your release)
检查本机
请在您有权审计的机器上运行此命令。扫描为只读操作。
shell
tmaegis scan --target mongodb