PGS9-00-006600 - PostgreSQL must generate audit records when security objects are modified.

Information

Changes in the database objects (tables, views, procedures, functions) that record and control permissions, privileges, and roles granted to users and roles must be tracked. Without an audit trail, unauthorized changes to the security subsystem could go undetected. The database could be severely compromised or rendered inoperative.

Solution

Note: The following instructions use the PGDATA and PGVER environment variables. See supplementary content APPENDIX-F for instructions on configuring PGDATA and APPENDIX-H for PGVER.

To ensure that logging is enabled, review supplementary content APPENDIX-C for instructions on enabling logging.

Using pgaudit the DBMS (PostgreSQL) can be configured to audit these requests. See supplementary content 'APPENDIX-B' for documentation on installing 'pgaudit'.

With pgaudit installed the following configurations can be made:

$ sudo su - postgres
$ vi ${PGDATA?}/postgresql.conf

Add the following parameters (or edit existing parameters):

pgaudit.log_catalog = 'on'
pgaudit.log='ddl, role, read, write'

Now, as the system administrator, reload the server with the new configuration:

# SYSTEMD SERVER ONLY
$ sudo systemctl reload postgresql-${PGVER?}

# INITD SERVER ONLY
$ sudo service postgresql-${PGVER?} reload

See Also

https://dl.dod.cyber.mil/wp-content/uploads/stigs/zip/U_PGS_SQL_9-x_V2R4_STIG.zip

Item Details

References: CAT|II, CCI|CCI-000172, Rule-ID|SV-214107r879867_rule, STIG-ID|PGS9-00-006600, STIG-Legacy|SV-87623, STIG-Legacy|V-72971, Vuln-ID|V-214107

Plugin: PostgreSQLDB

Control ID: ff7cbdd313f6b4d5abe7fb4704fcc377c9480b87a271e0078b717f92dc092ff3