VMware vSphere 7.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 ✎ 1
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.
Content changes 1
- V-256596 Medium checkfix All vCenter database (VCDB) tables must be owned by the "vc" user account.
- RMF Control
- AC-10
- Severity
- M
- CCI
- CCI-000054
- Version
- VCPG-70-000001
- Vuln IDs
-
- V-256591
- Rule IDs
-
- SV-256591r887559_rule
Checks: C-60266r887557_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-60209r887558_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-3
- Severity
- M
- CCI
- CCI-000130
- Version
- VCPG-70-000002
- Vuln IDs
-
- V-256592
- Rule IDs
-
- SV-256592r887562_rule
Checks: C-60267r887560_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 match the expected result, this is a finding.
Fix: F-60210r887561_fix
At the command prompt, run the following commands: # /opt/vmware/vpostgres/current/bin/psql -U postgres -c "ALTER SYSTEM SET log_line_prefix TO '%m %c %x %d %u %r %p %l ';" # /opt/vmware/vpostgres/current/bin/psql -U postgres -c "SELECT pg_reload_conf();"
- RMF Control
- AU-12
- Severity
- M
- CCI
- CCI-000171
- Version
- VCPG-70-000003
- Vuln IDs
-
- V-256593
- Rule IDs
-
- SV-256593r887565_rule
Checks: C-60268r887563_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-60211r887564_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-5
- Severity
- M
- CCI
- CCI-000140
- Version
- VCPG-70-000004
- Vuln IDs
-
- V-256594
- Rule IDs
-
- SV-256594r887568_rule
Checks: C-60269r887566_chk
At the command prompt, run the following command: # /opt/vmware/vpostgres/current/bin/psql -U postgres -A -t -c "SHOW log_truncate_on_rotation;" Expected result: on If the output does not match the expected result, this is a finding.
Fix: F-60212r887567_fix
At the command prompt, run the following commands: # /opt/vmware/vpostgres/current/bin/psql -U postgres -c "ALTER SYSTEM SET log_truncate_on_rotation TO 'on';" # /opt/vmware/vpostgres/current/bin/psql -U postgres -c "SELECT pg_reload_conf();"
- RMF Control
- AU-9
- Severity
- M
- CCI
- CCI-000162
- Version
- VCPG-70-000005
- Vuln IDs
-
- V-256595
- Rule IDs
-
- SV-256595r887571_rule
Checks: C-60270r887569_chk
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-60213r887570_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. At the command prompt, run the following commands: # /opt/vmware/vpostgres/current/bin/psql -U postgres -c "ALTER SYSTEM SET log_file_mode TO '0600';" # /opt/vmware/vpostgres/current/bin/psql -U postgres -c "SELECT pg_reload_conf();"
- RMF Control
- CM-5
- Severity
- M
- CCI
- CCI-001499
- Version
- VCPG-70-000006
- Vuln IDs
-
- V-256596
- Rule IDs
-
- SV-256596r918971_rule
Checks: C-60271r918969_chk
At the command prompt, run the following command: # /opt/vmware/vpostgres/current/bin/psql -d VCDB -U postgres -t -A -c "\dt;" | grep -v 'table|vc' If any tables are returned, this is a finding. Note: Upgrades may introduce new tables that are owned by the "postgres" user and can be updated to be owned by the "vc" user.
Fix: F-60214r918970_fix
At the command prompt, run the following command: # /opt/vmware/vpostgres/current/bin/psql -d VCDB -U postgres -c "ALTER TABLE <tablename> OWNER TO vc;" Replace <tablename> with the name of the table discovered during the check.
- RMF Control
- CM-5
- Severity
- M
- CCI
- CCI-001499
- Version
- VCPG-70-000007
- Vuln IDs
-
- V-256597
- Rule IDs
-
- SV-256597r887577_rule
Checks: C-60272r887575_chk
At the command prompt, run the following command: # /opt/vmware/vpostgres/current/bin/psql -U postgres -c "\du;"|grep "Create" Expected result: postgres | Superuser, Create role, Create DB, Replication, Bypass RLS | {} vc | Create DB | {} vlcmuser | Create DB | {} If accounts other than "postgres","vc", and "vlcmuser" have any "Create" privileges, this is a finding.
Fix: F-60215r887576_fix
At the command prompt, run the following command: # /opt/vmware/vpostgres/current/bin/psql -U postgres -c "REVOKE ALL PRIVILEGES FROM <user>;" Replace <user> with the account discovered during the check.
- RMF Control
- CM-7
- Severity
- M
- CCI
- CCI-000382
- Version
- VCPG-70-000008
- Vuln IDs
-
- V-256598
- Rule IDs
-
- SV-256598r887580_rule
Checks: C-60273r887578_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-60216r887579_fix
At the command prompt, run the following commands: # /opt/vmware/vpostgres/current/bin/psql -U postgres -c "ALTER SYSTEM SET port TO '5432';" # /opt/vmware/vpostgres/current/bin/psql -U postgres -c "SELECT pg_reload_conf();"
- RMF Control
- IA-2
- Severity
- L
- CCI
- CCI-000764
- Version
- VCPG-70-000009
- Vuln IDs
-
- V-256599
- Rule IDs
-
- SV-256599r887583_rule
Checks: C-60274r887581_chk
At the command prompt, run the following command: # grep -v "^#" /storage/db/vpostgres/pg_hba.conf|grep -z --color=always "trust" If any lines are returned, this is a finding.
Fix: F-60217r887582_fix
Navigate to and open /storage/db/pgdata/pg_hba.conf. Find and remove the line that has a method of "trust" in the far-right column. A correct, typical line will look like the following: # TYPE DATABASE USER ADDRESS METHOD host all all 127.0.0.1/32 md5
- RMF Control
- IA-5
- Severity
- M
- CCI
- CCI-000196
- Version
- VCPG-70-000010
- Vuln IDs
-
- V-256600
- Rule IDs
-
- SV-256600r887586_rule
Checks: C-60275r887584_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: md5 If the output does not match the expected result, this is a finding.
Fix: F-60218r887585_fix
At the command prompt, run the following commands: # /opt/vmware/vpostgres/current/bin/psql -U postgres -c "ALTER SYSTEM SET password_encryption TO 'md5';" # /opt/vmware/vpostgres/current/bin/psql -U postgres -c "SELECT pg_reload_conf();"
- RMF Control
- IA-5
- Severity
- H
- CCI
- CCI-000197
- Version
- VCPG-70-000011
- Vuln IDs
-
- V-256601
- Rule IDs
-
- SV-256601r887589_rule
Checks: C-60276r887587_chk
At the command prompt, run the following command: # /opt/vmware/vpostgres/current/bin/psql -U postgres -A -t -c "SHOW ssl;" Expected result: on If the output does not match the expected result, this is a finding.
Fix: F-60219r887588_fix
At the command prompt, run the following commands: # /opt/vmware/vpostgres/current/bin/psql -U postgres -c "ALTER SYSTEM SET ssl TO 'on';" # /opt/vmware/vpostgres/current/bin/psql -U postgres -c "SELECT pg_reload_conf();"
- RMF Control
- IA-5
- Severity
- H
- CCI
- CCI-000186
- Version
- VCPG-70-000012
- Vuln IDs
-
- V-256602
- Rule IDs
-
- SV-256602r887592_rule
Checks: C-60277r887590_chk
At the command prompt, run the following command: # stat -c "%a:%U:%G" /storage/db/vpostgres_ssl/server.key Expected result: 600:vpostgres:vpgmongrp If the output does not match the expected result, this is a finding.
Fix: F-60220r887591_fix
At the command prompt, run the following commands: # chmod 600 /storage/db/vpostgres_ssl/server.key # chown vpostgres:vpgmongrp /storage/db/vpostgres_ssl/server.key
- RMF Control
- IA-7
- Severity
- H
- CCI
- CCI-000803
- Version
- VCPG-70-000013
- Vuln IDs
-
- V-256603
- Rule IDs
-
- SV-256603r887595_rule
Checks: C-60278r887593_chk
At the command prompt, run the following command: # /opt/vmware/vpostgres/current/bin/psql -U postgres -A -t -c "SHOW ssl_ciphers;" Expected result: !aNULL:kECDH+AES:ECDH+AES:RSA+AES:@STRENGTH If the output does not match the expected result, this is a finding.
Fix: F-60221r887594_fix
At the command prompt, run the following commands: # /opt/vmware/vpostgres/current/bin/psql -U postgres -c "ALTER SYSTEM SET ssl_ciphers TO '!aNULL:kECDH+AES:ECDH+AES:RSA+AES:@STRENGTH';" # /opt/vmware/vpostgres/current/bin/psql -U postgres -c "SELECT pg_reload_conf();"
- RMF Control
- SC-24
- Severity
- M
- CCI
- CCI-001665
- Version
- VCPG-70-000014
- Vuln IDs
-
- V-256604
- Rule IDs
-
- SV-256604r887598_rule
Checks: C-60279r887596_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-60222r887597_fix
At the command prompt, run the following commands for each setting returned as "off" in the check: # /opt/vmware/vpostgres/current/bin/psql -U postgres -c "ALTER SYSTEM SET <name> TO 'on';" # /opt/vmware/vpostgres/current/bin/psql -U postgres -c "SELECT pg_reload_conf();" Note: Substitute <name> with the incorrectly set parameter (fsync, full_page_writes, synchronous_commit).
- RMF Control
- SC-3
- Severity
- M
- CCI
- CCI-001084
- Version
- VCPG-70-000015
- Vuln IDs
-
- V-256605
- Rule IDs
-
- SV-256605r887601_rule
Checks: C-60280r887599_chk
At the command prompt, run the following command: # /opt/vmware/vpostgres/current/bin/psql -U postgres -c "\dp .*.;" |grep -E "information_schema|pg_catalog"|awk -F '|' '{print $4}'|awk -F '/' '{print $1}'|grep -v "=r" | grep -v "^[[:space:]]*$" | grep -v "postgres" If any lines are returned, this is a finding.
Fix: F-60223r887600_fix
At the command prompt, run the following command: # /opt/vmware/vpostgres/current/bin/psql -U postgres -c "REVOKE ALL PRIVILEGES ON <name> FROM <user>;" Replace <name> and <user> with the Access Privilege name and account, respectively, discovered during the check.
- RMF Control
- SI-11
- Severity
- M
- CCI
- CCI-001312
- Version
- VCPG-70-000016
- Vuln IDs
-
- V-256606
- Rule IDs
-
- SV-256606r887604_rule
Checks: C-60281r887602_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: notice If the output does not match the expected result, this is a finding.
Fix: F-60224r887603_fix
At the command prompt, run the following commands: # /opt/vmware/vpostgres/current/bin/psql -U postgres -c "ALTER SYSTEM SET client_min_messages TO 'notice';" # /opt/vmware/vpostgres/current/bin/psql -U postgres -c "SELECT pg_reload_conf();"
- RMF Control
- AU-12
- Severity
- M
- CCI
- CCI-000172
- Version
- VCPG-70-000017
- Vuln IDs
-
- V-256607
- Rule IDs
-
- SV-256607r887607_rule
Checks: C-60282r887605_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-60225r887606_fix
At the command prompt, run the following commands: # /opt/vmware/vpostgres/current/bin/psql -U postgres -c "ALTER SYSTEM SET logging_collector TO 'on';" # /opt/vmware/vpostgres/current/bin/psql -U postgres -c "SELECT pg_reload_conf();"
- RMF Control
- AU-5
- Severity
- M
- CCI
- CCI-001855
- Version
- VCPG-70-000018
- Vuln IDs
-
- V-256608
- Rule IDs
-
- SV-256608r887610_rule
Checks: C-60283r887608_chk
At the command prompt, run the following command: # /opt/vmware/vpostgres/current/bin/psql -U postgres -A -t -c "SHOW log_destination;" Expected result: stderr If the output does not match the expected result, this is a finding.
Fix: F-60226r887609_fix
At the command prompt, run the following commands: # /opt/vmware/vpostgres/current/bin/psql -U postgres -c "ALTER SYSTEM SET log_destination TO 'stderr';" # /opt/vmware/vpostgres/current/bin/psql -U postgres -c "SELECT pg_reload_conf();"
- RMF Control
- AU-4
- Severity
- M
- CCI
- CCI-001851
- Version
- VCPG-70-000019
- Vuln IDs
-
- V-256609
- Rule IDs
-
- SV-256609r887613_rule
Checks: C-60284r887611_chk
At the command prompt, run the following command: # rpm -V VMware-Postgres-cis-visl-scripts|grep -E "vmware-services-vmware-vpostgres.conf|vmware-services-vmware-postgres-archiver.conf" | grep "^..5......" If the command returns any output, this is a finding.
Fix: F-60227r887612_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, before loading configuration input(type="imfile" File="/var/log/vmware/vpostgres/serverlog.std*" 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 logs input(type="imfile" File="/var/log/vmware/vpostgres/pg_archiver.log.std*" Tag="postgres-archiver" Severity="info" Facility="local0")
- RMF Control
- AU-8
- Severity
- M
- CCI
- CCI-001890
- Version
- VCPG-70-000020
- Vuln IDs
-
- V-256610
- Rule IDs
-
- SV-256610r887616_rule
Checks: C-60285r887614_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: Etc/UTC If the output does not match the expected result, this is a finding.
Fix: F-60228r887615_fix
At the command prompt, run the following commands: # /opt/vmware/vpostgres/current/bin/psql -U postgres -c "ALTER SYSTEM SET log_timezone TO 'Etc/UTC';" # /opt/vmware/vpostgres/current/bin/psql -U postgres -c "SELECT pg_reload_conf();"