Check: PGS9-00-008500
PostgreSQL 9.x STIG:
PGS9-00-008500
(in versions v2 r4 through v1 r1)
Title
PostgreSQL must separate user functionality (including user interface services) from database management functionality. (Cat II impact)
Discussion
Information system management functionality includes functions necessary to administer databases, network components, workstations, or servers and typically requires privileged user access. The separation of user functionality from information system management functionality is either physical or logical and is accomplished by using different computers, different central processing units, different instances of the operating system, different network addresses, combinations of these methods, or other methods, as appropriate. An example of this type of separation is observed in web administrative interfaces that use separate authentication methods for users of any other information system resources. This may include isolating the administrative interface on a different domain and with additional access controls. If administrative functionality or information regarding PostgreSQL management is presented on an interface available for users, information on DBMS settings may be inadvertently made available to the user.
Check Content
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.
Fix Text
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;
Additional Identifiers
Rule ID: SV-214122r879631_rule
Vulnerability ID: V-214122
Group Title: SRG-APP-000211-DB-000122
Expert Comments
CCIs
Number | Definition |
---|---|
CCI-001082 |
The information system separates user functionality (including user interface services) from information system management functionality. |
Controls
Number | Title |
---|---|
SC-2 |
Application Partitioning |