MongoDB
TMA-MONGODB-5.4
Ensure that new entries are appended to the end of the log file
低レベル 2自動mongodb
説明
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).
チェック方法
監査方法: ファイルパターン
- ファイル
/etc/mongod.conf- パターン
(?m)^[ \t]*logAppend:[ \t]*['\x22]?true\b
修正方法
修正方法: ガイダンスまたは IaC パッチ
Set systemLog.logAppend: true in /etc/mongod.conf and restart mongod.
プロパティ
- オペレーティングシステム
- すべて
- タグ
- mongodblogging
- 参照
- CIS MongoDB 8 Benchmark v2.0.0 - 5.4 Ensure that new entries are appended to the end of the log file
このホストをチェック
監査が許可されているマシンで実行してください。スキャンは読み取り専用です。
shell
tmaegis scan --target mongodb --level 2