Check: EPAS-00-008700
EnterpriseDB Postgres Advanced Server (EPAS) STIG:
EPAS-00-008700
(in version v1 r1)
Title
The EDB Postgres Advanced Server must disable network functions, ports, protocols, and services deemed by the organization to be nonsecure, in accord with the Ports, Protocols, and Services Management (PPSM) guidance. (Cat II impact)
Discussion
Use of nonsecure network functions, ports, protocols, and services exposes the system to avoidable threats. A database cluster listens on a single port (usually 5444 for EDB Postgres Advanced Server). The Postgres Enterprise Manager (PEM) agents do not listen on ports; they only act as clients to the PEM server. The PEM server has two components, a repository (which is a Postgres database) and a web application. The web application listens on a port configured in Apache HTTP Server, generally 8080 or 8443. The ports to check are: the primary Postgres cluster port, the PEM HTTPD port, and the PEM Repository DB port. Generally, the PEM HTTPD port and the PEM Repository DB port should be installed on an isolated management machine with administrator access only.
Check Content
Review the network functions, ports, protocols, and services supported by the EDB Postgres Advanced Server. If any protocol is prohibited by the PPSM guidance and is enabled, this is a finding. Open "<PostgreSQL data directory>/pg_hba.conf" in a viewer. The default path for the postgresql data directory is /var/lib/edb/as<version>/data (PGDATA), but this will vary according to local circumstances. If any rows have a TYPE that is "host" or "hostnossl", this is a finding. Execute the following SQL as "enterprisedb" operating system user: > psql edb -c "SHOW port" If the displayed port is not allowed, this is a finding.
Fix Text
Disable each prohibited network function, port, protocol, or service prohibited by the PPSM guidance. Open "pg_hba.conf" in an editor. The default path for the pg_hba.conf file is /var/lib/edb/as<version>/data (PGDATA), but this will vary according to local circumstances. Change the TYPE of any rows not starting with a "#" to be either "local" or "hostssl". The METHOD for the local rows should be "peer", which will authenticate based on the operating system name. The METHOD for the hostssl rows should be one of these (in preferred order): cert, ldap, sspi, pam, or scram-sha-256. Execute the following SQL as "enterprisedb" operating system user: > psql edb -c "ALTER SYSTEM SET port = <port>" Execute the following operating system command as the "root" user (or user with sudo privileges) to restart the postgres instance: > systemctl restart edb-as-<version> Where <version> is the major version of the EDB Postgres Advanced Server instance [e.g., 15].
Additional Identifiers
Rule ID: SV-259286r938911_rule
Vulnerability ID: V-259286
Group Title: SRG-APP-000383-DB-000364
Expert Comments
CCIs
Number | Definition |
---|---|
CCI-001762 |
The organization disables organization-defined functions, ports, protocols, and services within the information system deemed to be unnecessary and/or nonsecure. |
Controls
Number | Title |
---|---|
CM-7 (1) |
Periodic Review |