PGS9-00-003100 - Database objects (including but not limited to tables, indexes, storage, trigger procedures, functions, links to software external to PostgreSQL, etc.) must be owned by database/DBMS principals authorized for ownership.

Warning! Audit Deprecated

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

View Next Audit Version

Information

Within the database, object ownership implies full privileges to the owned object, including the privilege to assign access to the owned objects to other subjects. Database functions and procedures can be coded using definer's rights. This allows anyone who utilizes the object to perform the actions if they were the owner. If not properly managed, this can lead to privileged actions being taken by unauthorized individuals.

Conversely, if critical tables or other objects rely on unauthorized owner accounts, these objects may be lost when an account is removed.

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

Solution

Assign ownership of authorized objects to authorized object owner accounts.

#### Schema Owner

To create a schema owned by the user bob, run the following SQL:

$ sudo su - postgres
$ psql -c 'CREATE SCHEMA test AUTHORIZATION bob'

To alter the ownership of an existing object to be owned by the user bob, run the following SQL:

$ sudo su - postgres
$ psql -c 'ALTER SCHEMA test OWNER TO bob'

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-214074r879586_rule, STIG-ID|PGS9-00-003100, STIG-Legacy|SV-87549, STIG-Legacy|V-72897, Vuln-ID|V-214074

Plugin: Unix

Control ID: c2ea45b6dc4a57c36526f93eeab41d7ae71931890428e0f6b53b42184cadca8f