From PostgreSQL 9.x Security Technical Implementation Guide
Part of SRG-APP-000120-DB-000061
Associated with: CCI-000164
If audit data were to become compromised, then competent forensic analysis and discovery of the true source of potentially malicious system activity is impossible to achieve.
Note: The following instructions use the PGDATA environment variable. See supplementary content APPENDIX-F for instructions on configuring PGDATA. Review locations of audit logs, both internal to the database and database audit logs located at the operating system level. Verify there are appropriate controls and permissions to protect the audit information from unauthorized modification. #### stderr Logging If the PostgreSQL server is configured to use stderr for logging, the logs will be owned by the database administrator (shown here as "postgres") with a default permissions level of 0600. The permissions can be configured in postgresql.conf. To check the permissions for log files in postgresql.conf, as the database administrator (shown here as "postgres"), run the following command: $ sudo su - postgres $ grep "log_file_mode" ${PGDATA?}/postgresql.conf If the permissions are not 0600, this is a finding. Next, navigate to where the logs are stored. This can be found by running the following command against postgresql.conf as the database administrator (shown here as "postgres"): $ sudo su - postgres $ grep "log_directory" ${PGDATA?}/postgresql.conf With the log directory identified, as the database administrator (shown here as "postgres"), list the permissions of the logs: $ sudo su - postgres $ ls -la ${PGDATA?}/pg_log If logs are not owned by the database administrator (shown here as "postgres") and are not the same permissions as configured in postgresql.conf, this is a finding. #### syslog Logging If the PostgreSQL server is configured to use syslog for logging, consult organization syslog setting for permissions and ownership of logs
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 change log_timezone in postgresql.conf to use a different time zone for logs, as the database administrator (shown here as "postgres"), run the following: $ sudo su - postgres $ vi ${PGDATA?}/postgresql.conf log_timezone='UTC' 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
Lavender hyperlinks in small type off to the right (of CSS
class id
, if you view the page source) point to
globally unique URIs for each document and item. Copy the
link location and paste anywhere you need to talk
unambiguously about these things.
You can obtain data about documents and items in other
formats. Simply provide an HTTP header Accept:
text/turtle
or
Accept: application/rdf+xml
.
Powered by sagemincer