SV-233588r617333_rule
V-233588
SRG-APP-000211-DB-000122
CD12-00-008500
CAT II
10
Configure PostgreSQL to separate database administration and general user functionality.
Do not grant superuser, create role, create db, or bypass rls role attributes to users that do not require it.
To remove privileges, see the following example:
ALTER ROLE <username> NOSUPERUSER NOCREATEDB NOCREATEROLE NOBYPASSRLS;
Check PostgreSQL settings and vendor documentation to verify that administrative functionality is separate from user functionality.
As the database administrator (shown here as "postgres"), list all roles and permissions for the database:
$ sudo su - postgres
$ psql -c "\du"
If any non-administrative role has the attribute "Superuser", "Create role", "Create DB" or "Bypass RLS", this is a finding.
If administrator and general user functionality are not separated either physically or logically, this is a finding.
V-233588
False
CD12-00-008500
Check PostgreSQL settings and vendor documentation to verify that administrative functionality is separate from user functionality.
As the database administrator (shown here as "postgres"), list all roles and permissions for the database:
$ sudo su - postgres
$ psql -c "\du"
If any non-administrative role has the attribute "Superuser", "Create role", "Create DB" or "Bypass RLS", this is a finding.
If administrator and general user functionality are not separated either physically or logically, this is a finding.
M
5254