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

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

Item Details

Category: ACCESS CONTROL

References: 800-53|AC-6(1), CAT|II, CCI|CCI-001499, 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: a5a0b7354c198f49ff3a5d42b93ab9ac7a9f17d66fb830fa6cddbdce56db6a67