7.4 Ensure streaming replication parameters are configured correctly

Warning! Audit Deprecated

This audit has been deprecated and will be removed in a future update.

View Next Audit Version

Information

Streaming replication from a PRIMARY host transmits DDL, DML, passwords, and other potentially sensitive activities and data. These connections should be protected with Secure Sockets Layer (SSL).

Rationale:

Unencrypted transmissions could reveal sensitive information to unauthorized parties. Unauthenticated connections could enable man-in-the-middle attacks.

NOTE: Nessus has not performed this check. Please review the benchmark to ensure target compliance.

Solution

Review prior sections in this benchmark regarding SSL certificates, replication user, and WAL archiving.

Confirm the file $PGDATA/standby.signal is present on the STANDBY host and $PGDATA/postgresql.auto.conf contains lines similar to the following:

primary_conninfo = 'user=replication_user password=mypassword host=mySrcHost port=5432 sslmode=require sslcompression=1'

References:

https://www.postgresql.org/docs/12/static/runtime-config-connection.html#RUNTIME-CONFIG-CONNECTION-SECURITY

https://www.postgresql.org/docs/12/static/functions-admin.html#FUNCTIONS-ADMIN-BACKUP-TABLE

https://www.postgresql.org/docs/12/static/app-pgbasebackup.html

https://www.postgresql.org/docs/12/static/runtime-config-wal.html#RUNTIME-CONFIG-WAL-ARCHIVING

https://linux.die.net/man/1/openssl

See Also

https://workbench.cisecurity.org/files/2536