TMAegis베타
cockroachdb 관련 규칙 더 보기

CockroachDB

TMA-COCKROACHDB-3.1

Ensure CockroachDB Logging Is Enabled and Logs Are Securely Stored

높음레벨 1수동 검토cockroachdb

설명

CockroachDB's built-in logging must remain enabled to capture database events, and log files should be stored in a secure location with appropriate access restrictions. Misconfiguration (for example an empty or invalid --log-dir) can prevent logs from being retained.

점검 방법

감사 방식: 수동 검토

이 권장 사항은 자동으로 점검할 수 없습니다. --include-manual 옵션을 전달하면 스캔 결과에 이 지침과 함께 표시됩니다.

Run systemctl cat cockroach.service | grep ExecStart: it should set --log-dir=<path>, --log-config-file or --log={yaml} (otherwise logs go to <store>/logs). In that directory confirm cockroach.log, cockroach-security.log, cockroach-sql-audit.log and cockroach-sql-auth.log exist with recent timestamps, the directory is owned by cockroach with mode 700 or stricter, and log files are 640 or stricter.

조치 방법

조치 방식: 가이드 또는 인프라 패치

mkdir -p /var/lib/cockroach/logs; chown -R cockroach:cockroach /var/lib/cockroach/logs; chmod 700 /var/lib/cockroach/logs; add --log-dir=/var/lib/cockroach/logs (or --log-config-file=<yaml>) to ExecStart in cockroach.service, then systemctl daemon-reload and perform a rolling restart.

속성

운영 체제
모두
태그
cockroachdblogging
참고 자료
CIS CockroachDB v25.x Benchmark v1.0.0 - 3.1 Ensure CockroachDB Logging Is Enabled and Logs Are Securely Stored