SV-261899r1043179_rule
V-261899
SRG-APP-000220-DB-000149
CD16-00-004700
CAT II
10
Note: The following instructions use the PGDATA and PGVER environment variables. Refer to APPENDIX-F for instructions on configuring PGDATA and APPENDIX-H for PGVER.
As the database administrator (shown here as "postgres"), edit postgresql.conf:
$ sudo su - postgres
$ vi $PGDATA/postgresql.conf
Set the following parameters to organizational requirements:
statement_timeout = 10000 #milliseconds
tcp_keepalives_idle = 10 # seconds
tcp_keepalives_interval = 10 # seconds
tcp_keepalives_count = 10
As the system administrator, restart the server with the new configuration:
$ sudo systemctl restart postgresql-${PGVER?}
As the database administrator (shown here as "postgres"), run the following SQL:
$ sudo su - postgres
$ psql -h localhost -c "SHOW tcp_keepalives_idle"
$ psql -h localhost -c "SHOW tcp_keepalives_interval"
$ psql -h localhost -c "SHOW tcp_keepalives_count"
$ psql -h localhost -c "SHOW statement_timeout"
If these settings are not set to something other than zero, this is a finding.
V-261899
False
CD16-00-004700
As the database administrator (shown here as "postgres"), run the following SQL:
$ sudo su - postgres
$ psql -h localhost -c "SHOW tcp_keepalives_idle"
$ psql -h localhost -c "SHOW tcp_keepalives_interval"
$ psql -h localhost -c "SHOW tcp_keepalives_count"
$ psql -h localhost -c "SHOW statement_timeout"
If these settings are not set to something other than zero, this is a finding.
M
5598