PGS9-00-000710 - PostgreSQL must limit privileges to change functions and triggers, and links to software external to PostgreSQL.

Warning! Audit Deprecated

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

View Next Audit Version

Information

If the system were to allow any user to make changes to software libraries, those changes might be implemented without undergoing the appropriate testing and approvals that are part of a robust change management process.

Accordingly, only qualified and authorized individuals must be allowed to obtain access to information system components for purposes of initiating changes, including upgrades and modifications.

Unmanaged changes that occur to the database code can lead to unauthorized or compromised installations.

NOTE: Nessus has provided the target output to assist in reviewing the benchmark to ensure target compliance.

Solution

To change ownership of an object, as the database administrator (shown here as 'postgres'), run the following SQL:

$ sudo su - postgres
$ psql -c 'ALTER FUNCTION function_name OWNER TO new_role_name'

To change ownership of postgresql.conf, as the database administrator (shown here as 'postgres'), run the following commands:

$ sudo su - postgres
$ chown postgres:postgres ${PGDATA?}/postgresql.conf
$ chmod 0600 ${PGDATA?}/postgresql.conf

To remove superuser from a role, as the database administrator (shown here as 'postgres'), run the following SQL:

$ sudo su - postgres
$ psql -c 'ALTER ROLE rolename WITH NOSUPERUSER'

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-001499, Rule-ID|SV-214055r879586_rule, STIG-ID|PGS9-00-000710, STIG-Legacy|SV-87507, STIG-Legacy|V-72855, Vuln-ID|V-214055

Plugin: Unix

Control ID: 630a1c60faeb040415d0e1314e1c00fbf67366082e98aeb4ee8117f3176786e1