Check: CD12-00-009600
Crunchy Data PostgreSQL STIG:
CD12-00-009600
(in versions v2 r2 through v1 r1)
Title
PostgreSQL must enforce access restrictions associated with changes to the configuration of PostgreSQL or database(s). (Cat II impact)
Discussion
Failure to provide logical access restrictions associated with changes to configuration may have significant effects on the overall security of the system. When dealing with access restrictions pertaining to change control, it should be noted that any changes to the hardware, software, and/or firmware components of the information system can potentially have significant effects on the overall security of the system. Accordingly, only qualified and authorized individuals should be allowed to obtain access to system components for the purposes of initiating changes, including upgrades and modifications.
Check Content
To list all the permissions of individual roles, as the database administrator (shown here as "postgres"), run the following SQL: $ sudo su - postgres $ psql -c "\du If any role has SUPERUSER that should not, this is a finding. Next, list all the permissions of databases and schemas by running the following SQL: $ sudo su - postgres $ psql -c "\l" $ psql -c "\dn+" If any database or schema has update ("W") or create ("C") privileges and should not, this is a finding.
Fix Text
Configure PostgreSQL to enforce access restrictions associated with changes to the configuration of PostgreSQL or database(s). Use ALTER ROLE to remove accesses from roles: $ psql -c "ALTER ROLE <role_name> NOSUPERUSER" Use REVOKE to remove privileges from databases and schemas: $ psql -c "REVOKE ALL PRIVILEGES ON <table> FROM <role_name>"
Additional Identifiers
Rule ID: SV-233597r879753_rule
Vulnerability ID: V-233597
Group Title: SRG-APP-000380-DB-000360
Expert Comments
CCIs
Number | Definition |
---|---|
CCI-001813 |
The information system enforces access restrictions. |
Controls
Number | Title |
---|---|
CM-5 (1) |
Automated Access Enforcement / Auditing |