VMware vSphere 8.0 vCenter Appliance PostgreSQL Security Technical Implementation Guide
Pick two releases to diff their requirements.
Open a previous version of this STIG.
Digest of Updates −2
Comparison against the immediately-prior release (V1R1). Rule matching uses the Group Vuln ID. Content-change detection compares the rule’s description, check, and fix text after stripping inline markup — cosmetic-only edits aren’t flagged.
Removed rules 2
- V-259177 High The vCenter PostgreSQL service must enforce authorized access to all PKI private keys stored/utilized by PostgreSQL.
- V-259178 Medium The vCenter PostgreSQL service must maintain the authenticity of communications sessions by guarding against man-in-the-middle attacks that guess at Session ID values.
- RMF Control
- AC-10
- Severity
- M
- CCI
- CCI-000054
- Version
- VCPG-80-000001
- Vuln IDs
-
- V-259166
- Rule IDs
-
- SV-259166r960735_rule
Checks: C-62906r935400_chk
At the command prompt, run the following command: # /opt/vmware/vpostgres/current/bin/psql -U postgres -A -t -c "SHOW max_connections;" If the returned number is not greater than or equal to 100 and less than or equal to 1000, this is a finding.
Fix: F-62815r935401_fix
At the command prompt, run the following command: # vmon-cli --restart vmware-vpostgres Note: Restarting the service runs the "pg_tuning" script that will configure "max_connections" to the appropriate value based on the allocated memory for vCenter.
- RMF Control
- AU-12
- Severity
- M
- CCI
- CCI-000169
- Version
- VCPG-80-000005
- Vuln IDs
-
- V-259167
- Rule IDs
-
- SV-259167r960879_rule
Checks: C-62907r935403_chk
At the command prompt, run the following command: # /opt/vmware/vpostgres/current/bin/psql -U postgres -A -t -c "SHOW shared_preload_libraries;" Example result: health_status_worker,pg_stat_statements,pgaudit If the output from the command does not include pgaudit, this is a finding.
Fix: F-62816r935404_fix
A script is included with vCenter to generate a PostgreSQL STIG configuration. At the command prompt, run the following commands: # chmod +x /opt/vmware/vpostgres/current/bin/vmw_vpg_config/vmw_vpg_config.py # /opt/vmware/vpostgres/current/bin/vmw_vpg_config/vmw_vpg_config.py --action stig_enable --pg-data-dir /storage/db/vpostgres # chmod -x /opt/vmware/vpostgres/current/bin/vmw_vpg_config/vmw_vpg_config.py Restart the PostgreSQL service by running the following command: # vmon-cli --restart vmware-vpostgres
- RMF Control
- AU-12
- Severity
- M
- CCI
- CCI-000171
- Version
- VCPG-80-000006
- Vuln IDs
-
- V-259168
- Rule IDs
-
- SV-259168r960882_rule
Checks: C-62908r935406_chk
At the command prompt, run the following command: # find /storage/db/vpostgres/*conf* -xdev -type f -a '(' -not -perm 600 -o -not -user vpostgres -o -not -group vpgmongrp ')' -exec ls -ld {} \; If any files are returned, this is a finding.
Fix: F-62817r935407_fix
At the command prompt, run the following commands: # chmod 600 <file> # chown vpostgres:vpgmongrp <file> Note: Replace <file> with the file that has incorrect permissions.
- RMF Control
- AU-12
- Severity
- M
- CCI
- CCI-000172
- Version
- VCPG-80-000007
- Vuln IDs
-
- V-259169
- Rule IDs
-
- SV-259169r960885_rule
Checks: C-62909r935409_chk
At the command prompt, run the following commands: # /opt/vmware/vpostgres/current/bin/psql -U postgres -A -t -c "SHOW pgaudit.log_catalog;" # /opt/vmware/vpostgres/current/bin/psql -U postgres -A -t -c "SHOW pgaudit.log;" # /opt/vmware/vpostgres/current/bin/psql -U postgres -A -t -c "SHOW pgaudit.log_parameter;" # /opt/vmware/vpostgres/current/bin/psql -U postgres -A -t -c "SHOW pgaudit.log_statement_once;" # /opt/vmware/vpostgres/current/bin/psql -U postgres -A -t -c "SHOW pgaudit.log_level;" If "pgaudit.log_catalog" is not set to "on", this is a finding. If "pgaudit.log" is not set to "all, -misc", this is a finding. If "pgaudit.log_parameter" is not set to "on", this is a finding. If "pgaudit.log_statement_once" is not set to "off", this is a finding. If "pgaudit.log_level" is not set to "log", this is a finding.
Fix: F-62818r935410_fix
A script is included with vCenter to generate a PostgreSQL STIG configuration. At the command prompt, run the following commands: # chmod +x /opt/vmware/vpostgres/current/bin/vmw_vpg_config/vmw_vpg_config.py # /opt/vmware/vpostgres/current/bin/vmw_vpg_config/vmw_vpg_config.py --action stig_enable --pg-data-dir /storage/db/vpostgres # chmod -x /opt/vmware/vpostgres/current/bin/vmw_vpg_config/vmw_vpg_config.py Restart the PostgreSQL service by running the following command: # vmon-cli --restart vmware-vpostgres
- RMF Control
- AU-14
- Severity
- M
- CCI
- CCI-001464
- Version
- VCPG-80-000009
- Vuln IDs
-
- V-259170
- Rule IDs
-
- SV-259170r960888_rule
Checks: C-62910r935412_chk
At the command prompt, run the following command: # /opt/vmware/vpostgres/current/bin/psql -U postgres -A -t -c "SHOW log_destination;" Example result: stderr If "log_destination" is not set to "stderr" or "syslog", this is a finding.
Fix: F-62819r935413_fix
A script is included with vCenter to generate a PostgreSQL STIG configuration. At the command prompt, run the following commands: # chmod +x /opt/vmware/vpostgres/current/bin/vmw_vpg_config/vmw_vpg_config.py # /opt/vmware/vpostgres/current/bin/vmw_vpg_config/vmw_vpg_config.py --action stig_enable --pg-data-dir /storage/db/vpostgres # chmod -x /opt/vmware/vpostgres/current/bin/vmw_vpg_config/vmw_vpg_config.py Restart the PostgreSQL service by running the following command: # vmon-cli --restart vmware-vpostgres
- RMF Control
- AU-3
- Severity
- M
- CCI
- CCI-000130
- Version
- VCPG-80-000010
- Vuln IDs
-
- V-259171
- Rule IDs
-
- SV-259171r960891_rule
Checks: C-62911r935415_chk
At the command prompt, run the following command: # /opt/vmware/vpostgres/current/bin/psql -U postgres -A -t -c "SHOW log_line_prefix;" Expected result: %m %c %x %d %u %r %p %l If the output does not include each option in the expected result, this is a finding.
Fix: F-62820r935416_fix
A script is included with vCenter to generate a PostgreSQL STIG configuration. At the command prompt, run the following commands: # chmod +x /opt/vmware/vpostgres/current/bin/vmw_vpg_config/vmw_vpg_config.py # /opt/vmware/vpostgres/current/bin/vmw_vpg_config/vmw_vpg_config.py --action stig_enable --pg-data-dir /storage/db/vpostgres # chmod -x /opt/vmware/vpostgres/current/bin/vmw_vpg_config/vmw_vpg_config.py Restart the PostgreSQL service by running the following command: # vmon-cli --restart vmware-vpostgres
- RMF Control
- AU-9
- Severity
- M
- CCI
- CCI-000162
- Version
- VCPG-80-000020
- Vuln IDs
-
- V-259172
- Rule IDs
-
- SV-259172r960930_rule
Checks: C-62912r935418_chk
Verify the default log file permissions and permissions on existing log files. At the command prompt, run the following command: # /opt/vmware/vpostgres/current/bin/psql -U postgres -A -t -c "SHOW log_file_mode;" Expected result: 0600 If "log_file_mode" is not set to "0600", this is a finding. At the command prompt, run the following command: # find /var/log/vmware/vpostgres/* -xdev -type f -a '(' -not -perm 600 -o -not -user vpostgres -o -not -group vpgmongrp ')' -exec ls -ld {} \; If any files are returned, this is a finding.
Fix: F-62821r935419_fix
A script is included with vCenter to generate a PostgreSQL STIG configuration. At the command prompt, run the following commands: # chmod +x /opt/vmware/vpostgres/current/bin/vmw_vpg_config/vmw_vpg_config.py # /opt/vmware/vpostgres/current/bin/vmw_vpg_config/vmw_vpg_config.py --action stig_enable --pg-data-dir /storage/db/vpostgres # chmod -x /opt/vmware/vpostgres/current/bin/vmw_vpg_config/vmw_vpg_config.py Restart the PostgreSQL service by running the following command: # vmon-cli --restart vmware-vpostgres At the command prompt, run the following commands: # chmod 600 <file> # chown vpostgres:vpgmongrp <file> Note: Replace <file> with the file that has incorrect permissions.
- RMF Control
- CM-7
- Severity
- M
- CCI
- CCI-000381
- Version
- VCPG-80-000032
- Vuln IDs
-
- V-259173
- Rule IDs
-
- SV-259173r960963_rule
Checks: C-62913r935421_chk
At the command prompt, run the following command: # /opt/vmware/vpostgres/current/bin/psql -U postgres -A -t -c "select * from pg_extension where extname != 'plpgsql'" If any extensions are output, this is a finding.
Fix: F-62822r935422_fix
At the command prompt, run the following command: $ /opt/vmware/vpostgres/current/bin/psql -U postgres -c "DROP EXTENSION <extension name>" Note: It is recommended that plpgsql not be removed.
- RMF Control
- CM-7
- Severity
- M
- CCI
- CCI-000382
- Version
- VCPG-80-000035
- Vuln IDs
-
- V-259174
- Rule IDs
-
- SV-259174r960966_rule
Checks: C-62914r935424_chk
At the command prompt, run the following command: $ /opt/vmware/vpostgres/current/bin/psql -U postgres -A -t -c "SHOW port;" Expected result: 5432 If the output does not match the expected result, this is a finding.
Fix: F-62823r935425_fix
A script is included with vCenter to generate a PostgreSQL STIG configuration. At the command prompt, run the following commands: # chmod +x /opt/vmware/vpostgres/current/bin/vmw_vpg_config/vmw_vpg_config.py # /opt/vmware/vpostgres/current/bin/vmw_vpg_config/vmw_vpg_config.py --action stig_enable --pg-data-dir /storage/db/vpostgres # chmod -x /opt/vmware/vpostgres/current/bin/vmw_vpg_config/vmw_vpg_config.py Restart the PostgreSQL service by running the following command: # vmon-cli --restart vmware-vpostgres
- RMF Control
- IA-5
- Severity
- M
- CCI
- CCI-000197
- Version
- VCPG-80-000036
- Vuln IDs
-
- V-259175
- Rule IDs
-
- SV-259175r960969_rule
Checks: C-62915r935427_chk
At the command prompt, run the following command: # grep -v "^#" /storage/db/vpostgres/pg_hba.conf |grep '\S' If any lines are returned contain "trust" or "password" as an auth-method, this is a finding.
Fix: F-62824r935428_fix
Navigate to and open: /storage/db/vpostgres/pg_hba.conf Find and update any line that has a method of "trust" or "password" in the far-right column. A correct, typical line will look like the below: # TYPE DATABASE USER ADDRESS METHOD local VCDB vpxd peer map=vcdb Restart the PostgreSQL service by running the following command: # vmon-cli --restart vmware-vpostgres
- RMF Control
- Severity
- H
- CCI
- CCI-004062
- Version
- VCPG-80-000038
- Vuln IDs
-
- V-259176
- Rule IDs
-
- SV-259176r1003664_rule
Checks: C-62916r935430_chk
At the command prompt, run the following command: $ /opt/vmware/vpostgres/current/bin/psql -U postgres -A -t -c "SHOW password_encryption;" Expected result: scram-sha-256 If the output does not match the expected result, this is a finding. Note: Prior to Update 2, "md5" is the expected result.
Fix: F-62825r935431_fix
A script is included with vCenter to generate a PostgreSQL STIG configuration. At the command prompt, run the following commands: # chmod +x /opt/vmware/vpostgres/current/bin/vmw_vpg_config/vmw_vpg_config.py # /opt/vmware/vpostgres/current/bin/vmw_vpg_config/vmw_vpg_config.py --action stig_enable --pg-data-dir /storage/db/vpostgres # chmod -x /opt/vmware/vpostgres/current/bin/vmw_vpg_config/vmw_vpg_config.py Restart the PostgreSQL service by running the following command: # vmon-cli --restart vmware-vpostgres
- RMF Control
- SC-24
- Severity
- M
- CCI
- CCI-001665
- Version
- VCPG-80-000051
- Vuln IDs
-
- V-259179
- Rule IDs
-
- SV-259179r961125_rule
Checks: C-62919r935439_chk
At the command prompt, run the following command: # /opt/vmware/vpostgres/current/bin/psql -U postgres -A -t -c "SELECT name,setting FROM pg_settings WHERE name IN ('fsync','full_page_writes','synchronous_commit');" Expected result: fsync | on full_page_writes | on synchronous_commit | on If the output does not match the expected result, this is a finding.
Fix: F-62828r935440_fix
A script is included with vCenter to generate a PostgreSQL STIG configuration. At the command prompt, run the following commands: # chmod +x /opt/vmware/vpostgres/current/bin/vmw_vpg_config/vmw_vpg_config.py # /opt/vmware/vpostgres/current/bin/vmw_vpg_config/vmw_vpg_config.py --action stig_enable --pg-data-dir /storage/db/vpostgres # chmod -x /opt/vmware/vpostgres/current/bin/vmw_vpg_config/vmw_vpg_config.py Restart the PostgreSQL service by running the following command: # vmon-cli --restart vmware-vpostgres
- RMF Control
- SI-11
- Severity
- M
- CCI
- CCI-001312
- Version
- VCPG-80-000060
- Vuln IDs
-
- V-259180
- Rule IDs
-
- SV-259180r961167_rule
Checks: C-62920r935442_chk
At the command prompt, run the following command: # /opt/vmware/vpostgres/current/bin/psql -U postgres -A -t -c "SHOW client_min_messages;" Expected result: error If the output does not match the expected result, this is a finding.
Fix: F-62829r935443_fix
A script is included with vCenter to generate a PostgreSQL STIG configuration. At the command prompt, run the following commands: # chmod +x /opt/vmware/vpostgres/current/bin/vmw_vpg_config/vmw_vpg_config.py # /opt/vmware/vpostgres/current/bin/vmw_vpg_config/vmw_vpg_config.py --action stig_enable --pg-data-dir /storage/db/vpostgres # chmod -x /opt/vmware/vpostgres/current/bin/vmw_vpg_config/vmw_vpg_config.py Restart the PostgreSQL service by running the following command: # vmon-cli --restart vmware-vpostgres
- RMF Control
- Severity
- M
- CCI
- CCI-003938
- Version
- VCPG-80-000070
- Vuln IDs
-
- V-259181
- Rule IDs
-
- SV-259181r1003665_rule
Checks: C-62921r935445_chk
At the command prompt, run the following command: # /opt/vmware/vpostgres/current/bin/psql -U postgres -A -t -c "SHOW logging_collector;" Expected result: on If the output does not match the expected result, this is a finding.
Fix: F-62830r935446_fix
A script is included with vCenter to generate a PostgreSQL STIG configuration. At the command prompt, run the following commands: # chmod +x /opt/vmware/vpostgres/current/bin/vmw_vpg_config/vmw_vpg_config.py # /opt/vmware/vpostgres/current/bin/vmw_vpg_config/vmw_vpg_config.py --action stig_enable --pg-data-dir /storage/db/vpostgres # chmod -x /opt/vmware/vpostgres/current/bin/vmw_vpg_config/vmw_vpg_config.py Restart the PostgreSQL service by running the following command: # vmon-cli --restart vmware-vpostgres
- RMF Control
- AU-8
- Severity
- M
- CCI
- CCI-001890
- Version
- VCPG-80-000075
- Vuln IDs
-
- V-259182
- Rule IDs
-
- SV-259182r961443_rule
Checks: C-62922r935448_chk
At the command prompt, run the following command: # /opt/vmware/vpostgres/current/bin/psql -U postgres -A -t -c "SHOW log_timezone;" Expected result: UTC If the output does not match the expected result, this is a finding.
Fix: F-62831r935449_fix
A script is included with vCenter to generate a PostgreSQL STIG configuration. At the command prompt, run the following commands: # chmod +x /opt/vmware/vpostgres/current/bin/vmw_vpg_config/vmw_vpg_config.py # /opt/vmware/vpostgres/current/bin/vmw_vpg_config/vmw_vpg_config.py --action stig_enable --pg-data-dir /storage/db/vpostgres # chmod -x /opt/vmware/vpostgres/current/bin/vmw_vpg_config/vmw_vpg_config.py Restart the PostgreSQL service by running the following command: # vmon-cli --restart vmware-vpostgres
- RMF Control
- AU-12
- Severity
- M
- CCI
- CCI-000172
- Version
- VCPG-80-000110
- Vuln IDs
-
- V-259183
- Rule IDs
-
- SV-259183r961824_rule
Checks: C-62923r935451_chk
At the command prompt, run the following command: # /opt/vmware/vpostgres/current/bin/psql -U postgres -A -t -c "SHOW log_connections;" Expected result: on If the output does not match the expected result, this is a finding.
Fix: F-62832r935452_fix
A script is included with vCenter to generate a PostgreSQL STIG configuration. At the command prompt, run the following commands: # chmod +x /opt/vmware/vpostgres/current/bin/vmw_vpg_config/vmw_vpg_config.py # /opt/vmware/vpostgres/current/bin/vmw_vpg_config/vmw_vpg_config.py --action stig_enable --pg-data-dir /storage/db/vpostgres # chmod -x /opt/vmware/vpostgres/current/bin/vmw_vpg_config/vmw_vpg_config.py Restart the PostgreSQL service by running the following command: # vmon-cli --restart vmware-vpostgres
- RMF Control
- AU-12
- Severity
- M
- CCI
- CCI-000172
- Version
- VCPG-80-000114
- Vuln IDs
-
- V-259184
- Rule IDs
-
- SV-259184r961830_rule
Checks: C-62924r935454_chk
At the command prompt, run the following command: # /opt/vmware/vpostgres/current/bin/psql -U postgres -A -t -c "SHOW log_disconnections;" Expected result: on If the output does not match the expected result, this is a finding.
Fix: F-62833r935455_fix
A script is included with vCenter to generate a PostgreSQL STIG configuration. At the command prompt, run the following commands: # chmod +x /opt/vmware/vpostgres/current/bin/vmw_vpg_config/vmw_vpg_config.py # /opt/vmware/vpostgres/current/bin/vmw_vpg_config/vmw_vpg_config.py --action stig_enable --pg-data-dir /storage/db/vpostgres # chmod -x /opt/vmware/vpostgres/current/bin/vmw_vpg_config/vmw_vpg_config.py Restart the PostgreSQL service by running the following command: # vmon-cli --restart vmware-vpostgres
- RMF Control
- AU-4
- Severity
- M
- CCI
- CCI-001851
- Version
- VCPG-80-000122
- Vuln IDs
-
- V-259185
- Rule IDs
-
- SV-259185r961860_rule
Checks: C-62925r935457_chk
By default there is a vmware-services-vmware-vpostgres.conf rsyslog and vmware-services-vmware-postgres-archiver.conf configuration file that includes the service logs when syslog is configured on vCenter but it must be verified. At the command prompt, run the following command: # cat /etc/vmware-syslog/vmware-services-vmware-vpostgres.conf Expected result: # vmware-vpostgres first logs stdout, before loading configuration input(type="imfile" File="/var/log/vmware/vpostgres/serverlog.stdout" Tag="vpostgres-first" Severity="info" Facility="local0") # vmware-vpostgres first logs stderr, before loading configuration input(type="imfile" File="/var/log/vmware/vpostgres/serverlog.stderr" Tag="vpostgres-first" Severity="info" Facility="local0") # vmware-vpostgres logs input(type="imfile" File="/var/log/vmware/vpostgres/postgresql-*.log" Tag="vpostgres" Severity="info" Facility="local0") If the output does not match the expected result, this is a finding. At the command prompt, run the following command: # cat /etc/vmware-syslog/vmware-services-vmware-postgres-archiver.conf Expected result: # vmware-postgres-archiver stdout log input(type="imfile" File="/var/log/vmware/vpostgres/pg_archiver.log.stdout" Tag="postgres-archiver" Severity="info" Facility="local0") # vmware-postgres-archiver stderr log input(type="imfile" File="/var/log/vmware/vpostgres/pg_archiver.log.stderr" Tag="postgres-archiver" Severity="info" Facility="local0") If the output does not match the expected result, this is a finding.
Fix: F-62834r935458_fix
Navigate to and open: /etc/vmware-syslog/vmware-services-vmware-vpostgres.conf Create the file if it does not exist. Set the contents of the file as follows: # vmware-vpostgres first logs stdout, before loading configuration input(type="imfile" File="/var/log/vmware/vpostgres/serverlog.stdout" Tag="vpostgres-first" Severity="info" Facility="local0") # vmware-vpostgres first logs stderr, before loading configuration input(type="imfile" File="/var/log/vmware/vpostgres/serverlog.stderr" Tag="vpostgres-first" Severity="info" Facility="local0") # vmware-vpostgres logs input(type="imfile" File="/var/log/vmware/vpostgres/postgresql-*.log" Tag="vpostgres" Severity="info" Facility="local0") Navigate to and open: /etc/vmware-syslog/vmware-services-vmware-postgres-archiver.conf Create the file if it does not exist. Set the contents of the file as follows: # vmware-postgres-archiver stdout log input(type="imfile" File="/var/log/vmware/vpostgres/pg_archiver.log.stdout" Tag="postgres-archiver" Severity="info" Facility="local0") # vmware-postgres-archiver stderr log input(type="imfile" File="/var/log/vmware/vpostgres/pg_archiver.log.stderr" Tag="postgres-archiver" Severity="info" Facility="local0")