TMAegis
Više pravila za cockroachdb

TMA-COCKROACHDB-3.3

Ensure Connection Authentication Logging Is Enabled

VisokaNivo 1Automatskacockroachdb

Opis

CockroachDB can log client connection attempts, successful logins, authentication failures, and session disconnections through the SESSIONS logging channel. By default, this channel's logging is disabled to minimize overhead on all clusters. Runs cockroach sql with --certs-dir ${COCKROACH_CERTS_DIR:-/var/lib/cockroach/certs} (a root or admin client certificate must be in it); the target node comes from COCKROACH_HOST (default localhost:26257) or COCKROACH_URL. The benchmark rates this recommendation Manual; the automated check covers its objective pass criterion. Passes when server.auth_log.sql_connections.enabled and server.auth_log.sql_sessions.enabled are both true.

Kako se proverava

Metod provere: SQL upit

sql_query
out=$(cockroach sql --certs-dir="${COCKROACH_CERTS_DIR:-/var/lib/cockroach/certs}" --format=csv --execute "SHOW CLUSTER SETTING server.auth_log.sql_connections.enabled; SHOW CLUSTER SETTING server.auth_log.sql_sessions.enabled;" 2>/dev/null) || exit 1; printf '%s\n' "$out" | grep -cx true || true
Očekivani izlaz
2

Kako se ispravlja

Metod ispravke: Smernica ili zakrpa infrastrukture

SET CLUSTER SETTING server.auth_log.sql_connections.enabled = true; SET CLUSTER SETTING server.auth_log.sql_sessions.enabled = true; and keep the SESSIONS channel routed to cockroach-sql-auth.log.

Svojstva

Operativni sistemi
Bilo koji
Oznake
cockroachdbloggingauthentication
Referenca
CIS CockroachDB v25.x Benchmark v1.0.0 - 3.3 Ensure Connection Authentication Logging Is Enabled

Proverite ovaj računar

Pokrenite ovo na računaru za koji imate dozvolu za proveru. Skeniranje radi u režimu samo za čitanje.

shell
tmaegis scan --target cockroachdb