TMAegisBêta
Plus de règles pour postgres

PostgreSQL

TMA-POSTGRES-7.1

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

MoyenneNiveau 1Revue manuellepostgres

Description

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

Méthode de vérification

Méthode d'audit: Revue manuelle

Cette recommandation ne peut pas être vérifiée automatiquement. Une analyse la liste avec ces instructions lorsque vous passez --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.

Méthode de correction

Méthode de correction: Recommandation ou correctif d'infrastructure

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.

Propriétés

Systèmes d'exploitation
Tous
Étiquettes
postgresdatabasereplicationmanual
Référence
CIS PostgreSQL 18 Benchmark v1.0.0 - 7.1 Ensure a replication-only user is created and used for streaming replication