SV-233580r617333_rule
V-233580
SRG-APP-000089-DB-000064
CD12-00-007400
CAT II
10
Configure PostgreSQL to generate audit records for at least the DoD minimum set of events.
Using "pgaudit", PostgreSQL can be configured to audit these requests. See supplementary content APPENDIX-B for documentation on installing pgaudit.
To ensure that logging is enabled, review supplementary content APPENDIX-C for instructions on enabling logging.
Note: The following instructions use the PGLOG environment variables. See supplementary content APPENDIX-I for instructions on configuring PGVER.
Check PostgreSQL audit logs to determine whether organization-defined auditable events are being audited by the system.
For example, if the organization defines 'CREATE TABLE' as an auditable event, issuing the following command should return a result:
$ sudo su - postgres
$ psql -c "CREATE TABLE example (id int)"
$ grep 'AUDIT:.*,CREATE TABLE.*example' ${PGLOG?}/<latest_log>
$ psql -c 'DROP TABLE example;'
If organization-defined auditable events are not being audited, this is a finding.
V-233580
False
CD12-00-007400
Note: The following instructions use the PGLOG environment variables. See supplementary content APPENDIX-I for instructions on configuring PGVER.
Check PostgreSQL audit logs to determine whether organization-defined auditable events are being audited by the system.
For example, if the organization defines 'CREATE TABLE' as an auditable event, issuing the following command should return a result:
$ sudo su - postgres
$ psql -c "CREATE TABLE example (id int)"
$ grep 'AUDIT:.*,CREATE TABLE.*example' ${PGLOG?}/<latest_log>
$ psql -c 'DROP TABLE example;'
If organization-defined auditable events are not being audited, this is a finding.
M
5254