Select any two versions of this STIG to compare the individual requirements
Select any old version/release of this STIG to view the previous requirements
At the command prompt, execute the following command: # /opt/vmware/vpostgres/current/bin/psql -U postgres -c "SHOW max_connections;"|sed -n 3p|sed -e 's/^[ ]*//' Expected result: 345 If the output does not match the expected result, this is a finding.
At the command prompt, execute the following commands: # /opt/vmware/vpostgres/current/bin/psql -U postgres -c "ALTER SYSTEM SET max_connections TO '345';" # /opt/vmware/vpostgres/current/bin/psql -U postgres -c "SELECT pg_reload_conf();"
At the command prompt, execute the following command: # /opt/vmware/vpostgres/current/bin/psql -U postgres -c "SHOW log_line_prefix;"|sed -n 3p|sed -e 's/^[ ]*//' Expected result: %m %c %x %d %u %r %p %l If the output does not match the expected result, this is a finding.
At the command prompt, execute 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();"
At the command prompt, enter the following command: # find /storage/db/vpostgres/*conf* -xdev -type f -a '(' -not -perm 600 -o -not -user vpostgres -o -not -group users ')' -exec ls -ld {} \; If any files are returned, this is a finding.
At the command prompt, enter the following command: # chmod 600 <file> # chown vpostgres:users <file> Note: Replace <file> with the file with incorrect permissions.
At the command prompt, execute the following command: # /opt/vmware/vpostgres/current/bin/psql -U postgres -c "SHOW log_truncate_on_rotation;"|sed -n 3p|sed -e 's/^[ ]*//' Expected result: on If the output does not match the expected result, this is a finding.
At the command prompt, execute 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();"
At the command prompt, enter the following command: # find /var/log/vmware/vpostgres/* -xdev -type f -a '(' -not -perm 600 -o -not -user vpostgres -o -not -group users ')' -exec ls -ld {} \; If any files are returned, this is a finding.
At the command prompt, enter the following command: # chmod 600 <file> # chown vpostgres:users <file> Note: Replace <file> with the file with incorrect permissions. At the command prompt, execute 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();"
At the command prompt, execute the following command: # /opt/vmware/vpostgres/current/bin/psql -d VCDB -x -U postgres -c "\dt;"|grep Owner|grep -v vc If any tables are returned, this is a finding.
At the command prompt, execute the following command: # /opt/vmware/vpostgres/current/bin/psql -U postgres -c "ALTER TABLE <tablename> OWNER TO vc;" Replace <tablename> with the name of the table discovered during the check.
At the command prompt, execute 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 | {} If the accounts other than "postgres" and "vc" have any "Create" privileges, this is a finding.
At the command prompt, execute 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.
At the command prompt, execute the following command: # /opt/vmware/vpostgres/current/bin/psql -U postgres -c "SHOW port;"|sed -n 3p|sed -e 's/^[ ]*//' Expected result: 5432 If the output does not match the expected result, this is a finding.
At the command prompt, execute 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();"
At the command prompt, execute 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.
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
At the command prompt, execute the following command: # /opt/vmware/vpostgres/current/bin/psql -U postgres -c "SHOW ssl;"|sed -n 3p|sed -e 's/^[ ]*//' Expected result: on If the output does not match the expected result, this is a finding.
At the command prompt, execute 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();"
At the command prompt, execute the following command: # stat -c "%a:%U:%G" /storage/db/vpostgres_ssl/server.key Expected result: 600:vpostgres:users If the output does not match the expected result, this is a finding.
At the command prompt, execute the following commands: # chmod 600 /storage/db/vpostgres_ssl/server.key # chown vpostgres:users /storage/db/vpostgres_ssl/server.key
At the command prompt, execute the following command: # /opt/vmware/vpostgres/current/bin/psql -U postgres -c "SHOW ssl_ciphers;"|sed -n 3p|sed -e 's/^[ ]*//' Expected result: !aNULL:kECDH+AES:ECDH+AES:RSA+AES:@STRENGTH If the output does not match the expected result, this is a finding.
At the command prompt, execute 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();"
At the command prompt, execute the following command: # /opt/vmware/vpostgres/current/bin/psql -U postgres -c "SELECT name,setting FROM pg_settings WHERE name IN ('fsync','full_page_writes','synchronous_commit');"|sed -n '3,5p'|sed -e 's/^[ ]*//' Expected result: fsync | on full_page_writes | on synchronous_commit | on If the output does not match the expected result, this is a finding.
At the command prompt, execute the following commands: # /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)
At the command prompt, execute the following command: # /opt/vmware/vpostgres/current/bin/psql -U postgres -c "\dp .*.;"/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 "postgres"|grep -v " " If any lines are returned, this is a finding.
At the command prompt, execute 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.
At the command prompt, execute the following command: # /opt/vmware/vpostgres/current/bin/psql -U postgres -c "SHOW client_min_messages;"|sed -n 3p|sed -e 's/^[ ]*//' Expected result: notice If the output does not match the expected result, this is a finding.
At the command prompt, execute 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();"
At the command prompt, execute the following command: # /opt/vmware/vpostgres/current/bin/psql -U postgres -c "SHOW logging_collector;"|sed -n 3p|sed -e 's/^[ ]*//' Expected result: on If the output does not match the expected result, this is a finding.
At the command prompt, execute 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();"
At the command prompt, execute the following command: # /opt/vmware/vpostgres/current/bin/psql -U postgres -c "SHOW log_destination;"|sed -n 3p|sed -e 's/^[ ]*//' Expected result: stderr If the output does not match the expected result, this is a finding.
At the command prompt, execute 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();"
At the command prompt, execute the following command: # cat /etc/vmware-syslog/stig-services-vpostgres.conf Expected result: input(type="imfile" File="/var/log/vmware/vpostgres/serverlog.std*" Tag="vpostgres-first" Severity="info" Facility="local0") input(type="imfile" File="/var/log/vmware/vpostgres/postgresql-*.log" Tag="vpostgres" Severity="info" Facility="local0") If the file does not exist, this is a finding. If the output of the command does not match the expected result above, this is a finding. If there is no output from the command, vPostgres will default to "stderr", and this is not a finding.
Navigate to and open /etc/vmware-syslog/stig-services-vpostgres.conf. Create the file if it does not exist. Set the contents of the file as follows: input(type="imfile" File="/var/log/vmware/vpostgres/serverlog.std*" Tag="vpostgres-first" Severity="info" Facility="local0") input(type="imfile" File="/var/log/vmware/vpostgres/postgresql-*.log" Tag="vpostgres" Severity="info" Facility="local0")
At the command prompt, execute the following command: # /opt/vmware/vpostgres/current/bin/psql -U postgres -c "SHOW log_timezone;"|sed -n 3p|sed -e 's/^[ ]*//' Expected result: Etc/UTC If the output does not match the expected result, this is a finding.
At the command prompt, execute 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();"
At the command prompt, execute the following command: # /opt/vmware/vpostgres/current/bin/psql -U postgres -c "SHOW client_encoding;"|sed -n 3p|sed -e 's/^[ ]*//' Expected result: UTF8 If the output does not match the expected result, this is a finding.
At the command prompt, execute the following commands: # /opt/vmware/vpostgres/current/bin/psql -U postgres -c "ALTER SYSTEM SET client_encoding TO 'UTF8';" # /opt/vmware/vpostgres/current/bin/psql -U postgres -c "SELECT pg_reload_conf();"
PostgreSQL 6.7 is no longer supported by the vendor. If the system is running PostgreSQL 6.7, this is a finding.
Upgrade to a supported version.
Obtain the site data-transfer policy from the ISSO. Review the policies and procedures used to ensure that all vRA data is being protected from unauthorized and unintended information transformation in accordance with site policy. If the site data-transfer policy is not followed, this is a finding.
Modify any code used for moving data from production to development/test systems to comply with the organization-defined data transfer policy and to ensure that copies of production data are not left in unsecured locations.