TMAegis
postgres のその他のルール

TMA-POSTGRES-7.1

Ensure a replication-only user is created and used for streaming replication

中レベル 1手動レビューpostgres

説明

Create a new user specifically for use by streaming replication instead of using the superuser account.

チェック方法

監査方法: 手動レビュー

この推奨事項は自動ではチェックできません。--include-manual を指定すると、スキャン結果にこの手順付きで一覧表示されます。

Run SELECT rolname FROM pg_roles WHERE rolreplication IS TRUE; Streaming replication must use a dedicated, non-superuser role with only the REPLICATION attribute; replication via postgres or another superuser is a fail.

修正方法

修正方法: ガイダンスまたは IaC パッチ

CREATE ROLE replication_user WITH LOGIN REPLICATION PASSWORD '<pw>'; and add a 'hostssl replication replication_user <standby_ip>/32 scram-sha-256' line to pg_hba.conf, then reload.

プロパティ

オペレーティングシステム
すべて
タグ
postgresdatabasereplicationmanual
参照
CIS PostgreSQL 18 Benchmark v1.0.0 - 7.1 Ensure a replication-only user is created and used for streaming replication