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

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.

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_V2R2_STIG.zip

Item Details

Category: CONFIGURATION MANAGEMENT

References: 800-53|CM-6, CAT|II, CCI|CCI-001499, CSCv6|3.1, Rule-ID|SV-214055r508027_rule, STIG-ID|PGS9-00-000710, STIG-Legacy|SV-87507, STIG-Legacy|V-72855, Vuln-ID|V-214055

Plugin: Unix

Control ID: b06860bb14bbd003552a111591030ce750ad56db8aa9c3ec299f90d4763bbd9e