{"stig":{"title":"VMware vSphere 7.0 vCenter Appliance PostgreSQL Security Technical Implementation Guide","version":"1","release":"2"},"checks":[{"vulnId":"V-256591","ruleId":"SV-256591r887559_rule","severity":"medium","ruleTitle":"VMware Postgres must limit the number of connections.","description":"Database management includes the ability to control the number of users and user sessions utilizing a database management system (DBMS). Unlimited concurrent connections to the DBMS could allow a successful denial-of-service (DoS) attack by exhausting connection resources, and a system can also fail or be degraded by an overload of legitimate users. Limiting the number of concurrent sessions per user is helpful in reducing these risks.\n\nVMware Postgres as deployed on the vCenter Service Appliance (VCSA) comes preconfigured with a \"max_connections\" limit that is appropriate for all tested, supported scenarios. The out-of-the-box configuration is dynamic, based on a lower limit plus allowances for the resources assigned to VCSA and the deployment size. However, this number will always be between 100 and 1000 (inclusive).","checkContent":"At the command prompt, run the following command:\n\n# /opt/vmware/vpostgres/current/bin/psql -U postgres -A -t -c \"SHOW max_connections;\"\n\nIf the returned number is not greater than or equal to 100 and less than or equal to 1000, this is a finding.","fixText":"At the command prompt, run the following command:\n\n# vmon-cli --restart vmware-vpostgres\n\nNote: Restarting the service runs the \"pg_tuning\" script that will configure \"max_connections\" to the appropriate value based on the allocated memory for vCenter.","ccis":["CCI-000054"]},{"vulnId":"V-256592","ruleId":"SV-256592r887562_rule","severity":"medium","ruleTitle":"VMware Postgres log files must contain required fields.","description":"Without the capability to generate audit records, it would be difficult to establish, correlate, and investigate the events relating to an incident or identify those responsible for one. \n\nAs an embedded database that is only accessible via \"localhost\", VMware Postgres on the vCenter Server Appliance (VCSA) does not implement robust auditing. However, it can and must be configured to log reasonable levels of information relating to user actions to enable proper troubleshooting.\n\nSatisfies: SRG-APP-000089-DB-000064, SRG-APP-000095-DB-000039, SRG-APP-000096-DB-000040, SRG-APP-000097-DB-000041, SRG-APP-000098-DB-000042, SRG-APP-000099-DB-000043, SRG-APP-000100-DB-000201, SRG-APP-000101-DB-000044, SRG-APP-000375-DB-000323","checkContent":"At the command prompt, run the following command:\n\n# /opt/vmware/vpostgres/current/bin/psql -U postgres -A -t -c \"SHOW log_line_prefix;\"\n\nExpected result:\n\n%m %c %x %d %u %r %p %l\n\nIf the output does not match the expected result, this is a finding.","fixText":"At the command prompt, run the following commands:\n\n# /opt/vmware/vpostgres/current/bin/psql -U postgres -c \"ALTER SYSTEM SET log_line_prefix TO '%m %c %x %d %u %r %p %l ';\"\n\n# /opt/vmware/vpostgres/current/bin/psql -U postgres -c \"SELECT pg_reload_conf();\"","ccis":["CCI-000130","CCI-000131","CCI-000132","CCI-000133","CCI-000134","CCI-000135","CCI-000169","CCI-001487","CCI-001889"]},{"vulnId":"V-256593","ruleId":"SV-256593r887565_rule","severity":"medium","ruleTitle":"VMware Postgres configuration files must not be accessible by unauthorized users.","description":"VMware Postgres has a few configuration files that directly control the security posture of the database management system (DBMS). Protecting these files from unauthorized access and modification is fundamental to ensuring the security of VMware Postgres.\n\nSatisfies: SRG-APP-000090-DB-000065, SRG-APP-000121-DB-000202, SRG-APP-000122-DB-000203, SRG-APP-000123-DB-000204, SRG-APP-000380-DB-000360","checkContent":"At the command prompt, run the following command:\n\n# find /storage/db/vpostgres/*conf* -xdev -type f -a '(' -not -perm 600 -o -not -user vpostgres -o -not -group vpgmongrp ')' -exec ls -ld {} \\;\n\nIf any files are returned, this is a finding.","fixText":"At the command prompt, run the following commands:\n\n# chmod 600 <file>\n# chown vpostgres:vpgmongrp <file>\n\nNote: Replace <file> with the file that has incorrect permissions.","ccis":["CCI-000171","CCI-001493","CCI-001494","CCI-001495","CCI-001813"]},{"vulnId":"V-256594","ruleId":"SV-256594r887568_rule","severity":"medium","ruleTitle":"VMware Postgres must be configured to overwrite older logs when necessary.","description":"Without proper configuration, log files for VMware Postgres can grow without bound, filling the partition and potentially affecting the availability of the vCenter Server Appliance (VCSA). One part of this configuration is to ensure the logging subsystem overwrites, rather than appends to, any previous logs that would share the same name. This is avoided in other configuration steps, but this best practice should be followed for good measure.","checkContent":"At the command prompt, run the following command:\n\n# /opt/vmware/vpostgres/current/bin/psql -U postgres -A -t -c \"SHOW log_truncate_on_rotation;\"\n\nExpected result:\n\non\n\nIf the output does not match the expected result, this is a finding.","fixText":"At the command prompt, run the following commands:\n\n# /opt/vmware/vpostgres/current/bin/psql -U postgres -c \"ALTER SYSTEM SET log_truncate_on_rotation TO 'on';\"\n\n# /opt/vmware/vpostgres/current/bin/psql -U postgres -c \"SELECT pg_reload_conf();\"","ccis":["CCI-000140"]},{"vulnId":"V-256595","ruleId":"SV-256595r887571_rule","severity":"medium","ruleTitle":"The VMware Postgres database must protect log files from unauthorized access and modification.","description":"If audit data were to become compromised, competent forensic analysis and discovery of the true source of potentially malicious system activity would be difficult, if not impossible, to achieve. In addition, access to audit records provides information an attacker could use to their advantage.\n\nTo ensure the veracity of audit data, the information system and/or the application must protect audit information from all unauthorized access. This includes read, write, copy, etc.\n\nSatisfies: SRG-APP-000118-DB-000059, SRG-APP-000119-DB-000060, SRG-APP-000120-DB-000061","checkContent":"At the command prompt, run the following command:\n\n# find /var/log/vmware/vpostgres/* -xdev -type f -a '(' -not -perm 600 -o -not -user vpostgres -o -not -group vpgmongrp ')' -exec ls -ld {} \\;\n\nIf any files are returned, this is a finding.","fixText":"At the command prompt, run the following commands:\n\n# chmod 600 <file>\n# chown vpostgres:vpgmongrp <file>\n\nNote: Replace <file> with the file that has incorrect permissions.\n\nAt the command prompt, run the following commands:\n\n# /opt/vmware/vpostgres/current/bin/psql -U postgres -c \"ALTER SYSTEM SET log_file_mode TO '0600';\"\n\n# /opt/vmware/vpostgres/current/bin/psql -U postgres -c \"SELECT pg_reload_conf();\"","ccis":["CCI-000162","CCI-000163","CCI-000164"]},{"vulnId":"V-256596","ruleId":"SV-256596r918971_rule","severity":"medium","ruleTitle":"All vCenter database (VCDB) tables must be owned by the \"vc\" user account.","description":"Within the database, object ownership implies full privileges to the owned object, including the privilege to assign access to the owned objects to other subjects. Database functions and procedures can be coded using definer's rights. This allows anyone who uses the object to perform the actions if they are the owner. If not properly managed, this can lead to privileged actions being taken by unauthorized individuals.\n\nVCDB is configured out of the box to be owned by the \"vc\" Postgres user. This configuration must be verified and maintained.","checkContent":"At the command prompt, run the following command:\n\n# /opt/vmware/vpostgres/current/bin/psql -d VCDB -U postgres -t -A -c \"\\dt;\" | grep -v 'table|vc'\n\nIf any tables are returned, this is a finding.\n\nNote: Upgrades may introduce new tables that are owned by the \"postgres\" user and can be updated to be owned by the \"vc\" user.","fixText":"At the command prompt, run the following command:\n\n# /opt/vmware/vpostgres/current/bin/psql -d VCDB -U postgres -c \"ALTER TABLE <tablename> OWNER TO vc;\"\n\nReplace <tablename> with the name of the table discovered during the check.","ccis":["CCI-001499"]},{"vulnId":"V-256597","ruleId":"SV-256597r887577_rule","severity":"medium","ruleTitle":"VMware Postgres must limit modify privileges to authorized accounts.","description":"If VMware Postgres were to allow any user to make changes to database structure or logic, those changes might be implemented without undergoing the appropriate testing and approvals that are part of a robust change management process.\n\nOnly qualified and authorized individuals must be allowed to obtain access to information system components to initiate changes, including upgrades and modifications.\n\nUnmanaged changes that occur to the database software libraries or configuration can lead to unauthorized or compromised installations.","checkContent":"At the command prompt, run the following command:\n\n# /opt/vmware/vpostgres/current/bin/psql -U postgres -c \"\\du;\"|grep \"Create\"\n\nExpected result:\n\n postgres   | Superuser, Create role, Create DB, Replication, Bypass RLS | {}\n vc         | Create DB                                                  | {}\n vlcmuser   | Create DB                                                  | {}\n\nIf accounts other than \"postgres\",\"vc\", and \"vlcmuser\" have any \"Create\" privileges, this is a finding.","fixText":"At the command prompt, run the following command:\n\n# /opt/vmware/vpostgres/current/bin/psql -U postgres -c \"REVOKE ALL PRIVILEGES FROM <user>;\"\n\nReplace <user> with the account discovered during the check.","ccis":["CCI-001499"]},{"vulnId":"V-256598","ruleId":"SV-256598r887580_rule","severity":"medium","ruleTitle":"VMware Postgres must be configured to use the correct port.","description":"To prevent unauthorized connection of devices, unauthorized transfer of information, or unauthorized tunneling (i.e., embedding of data types within data types), organizations must disable or restrict unused or unnecessary physical and logical ports, protocols, and services on information systems.\n\nApplications are capable of providing a wide variety of functions and services. Some of the functions and services provided by default may not be necessary to support essential organizational operations. Additionally, it is sometimes convenient to provide multiple services from a single component (e.g., email and web services); however, doing so increases risk over limiting the services provided by any one component. \n\nTo support the requirements and principles of least functionality, the application must support the organizational requirements providing only essential capabilities and limiting the use of ports, protocols, and/or services to only those required, authorized, and approved to conduct official business or to address authorized quality of life issues.\n\nDatabase Management Systems using ports, protocols, and services deemed unsafe are open to attack through those ports, protocols, and services. This can allow unauthorized access to the database and through the database to other components of the information system.\n\nSatisfies: SRG-APP-000142-DB-000094, SRG-APP-000383-DB-000364","checkContent":"At the command prompt, run the following command:\n\n# /opt/vmware/vpostgres/current/bin/psql -U postgres -A -t -c \"SHOW port;\"\n\nExpected result:\n\n5432\n\nIf the output does not match the expected result, this is a finding.","fixText":"At the command prompt, run the following commands:\n\n# /opt/vmware/vpostgres/current/bin/psql -U postgres -c \"ALTER SYSTEM SET port TO '5432';\"\n\n# /opt/vmware/vpostgres/current/bin/psql -U postgres -c \"SELECT pg_reload_conf();\"","ccis":["CCI-000382","CCI-001762"]},{"vulnId":"V-256599","ruleId":"SV-256599r887583_rule","severity":"low","ruleTitle":"VMware Postgres must require authentication on all connections.","description":"To ensure accountability and prevent unauthenticated access, organizational users must be identified and authenticated to prevent potential misuse and compromise of the system. \n\nVMware Postgres client authentication configuration is configured in \"pg_hba.conf\". In this file are a number of lines that specify who can connect to the service, from where, and using what authentication methods. In Postgres there is a concept of a trusted connection where a specific network mask can connect without any authentication to any account. This connection is termed \"trust\" in \"pg_hba.conf\", and it must not be present. Out of the box, VMware Postgres requires standard password authentication for all connections.","checkContent":"At the command prompt, run the following command:\n\n# grep -v \"^#\" /storage/db/vpostgres/pg_hba.conf|grep -z --color=always \"trust\"\n\nIf any lines are returned, this is a finding.","fixText":"Navigate to and open /storage/db/pgdata/pg_hba.conf.  \n\nFind and remove the line that has a method of \"trust\" in the far-right column.\n\nA correct, typical line will look like the following:\n\n# TYPE  DATABASE        USER            ADDRESS                 METHOD\nhost       all                        all                 127.0.0.1/32           md5","ccis":["CCI-000764"]},{"vulnId":"V-256600","ruleId":"SV-256600r887586_rule","severity":"medium","ruleTitle":"The vPostgres database must use \"md5\" for authentication.","description":"The DOD standard for authentication is DOD-approved public key infrastructure (PKI) certificates.\n\nAuthentication based on user ID and password may be used only when it is not possible to employ a PKI certificate, and requires authorizing official approval.\n\nIn such cases, database passwords stored in clear text, using reversible encryption or unsalted hashes, would be vulnerable to unauthorized disclosure. Database passwords must always be in the form of one-way, salted hashes when stored internally or externally to the database management system (DBMS).","checkContent":"At the command prompt, run the following command:\n\n# /opt/vmware/vpostgres/current/bin/psql -U postgres -A -t -c \"SHOW password_encryption;\"\n\nExpected result:\n\nmd5\n\nIf the output does not match the expected result, this is a finding.","fixText":"At the command prompt, run the following commands:\n\n# /opt/vmware/vpostgres/current/bin/psql -U postgres -c \"ALTER SYSTEM SET password_encryption TO 'md5';\"\n\n# /opt/vmware/vpostgres/current/bin/psql -U postgres -c \"SELECT pg_reload_conf();\"","ccis":["CCI-000196"]},{"vulnId":"V-256601","ruleId":"SV-256601r887589_rule","severity":"high","ruleTitle":"VMware Postgres must be configured to use Transport Layer Security (TLS).","description":"The DOD standard for authentication is DOD-approved public key infrastructure (PKI) certificates. Authentication based on user ID and password may be used only when it is not possible to employ a PKI certificate.\n\nIn such cases, passwords, must be protected at all times, and encryption is the standard method for protecting passwords during transmission.\n\nVMware Postgres is configured out of the box to require TLS connections with remote clients. As an embedded database and available only on \"localhost\" for standalone vCenter Server Appliances (VCSAs), TLS connections are used only in high-availability deployments for connections between a primary and a standby. This configuration must be verified and maintained.\n\nSatisfies: SRG-APP-000172-DB-000075, SRG-APP-000442-DB-000379","checkContent":"At the command prompt, run the following command:\n\n# /opt/vmware/vpostgres/current/bin/psql -U postgres -A -t -c \"SHOW ssl;\"\n\nExpected result:\n\non\n\nIf the output does not match the expected result, this is a finding.","fixText":"At the command prompt, run the following commands:\n\n# /opt/vmware/vpostgres/current/bin/psql -U postgres -c \"ALTER SYSTEM SET ssl TO 'on';\"\n\n# /opt/vmware/vpostgres/current/bin/psql -U postgres -c \"SELECT pg_reload_conf();\"","ccis":["CCI-000197","CCI-002422"]},{"vulnId":"V-256602","ruleId":"SV-256602r887592_rule","severity":"high","ruleTitle":"VMware Postgres must enforce authorized access to all public key infrastructure (PKI) private keys.","description":"The DOD standard for authentication is DOD-approved PKI certificates. PKI certificate-based authentication is performed by requiring the certificate holder to cryptographically prove possession of the corresponding private key.\n\nIf a private key is stolen, an attacker can use it to impersonate the certificate holder. In cases where the database management system (DBMS)-stored private keys are used to authenticate the DBMS to the system's clients, loss of the corresponding private keys would allow an attacker to successfully perform undetected man-in-the-middle attacks against the DBMS system and its clients.\n\nAll access to the private key(s) of the DBMS must be restricted to authorized and authenticated users.","checkContent":"At the command prompt, run the following command:\n\n# stat -c \"%a:%U:%G\" /storage/db/vpostgres_ssl/server.key\n\nExpected result:\n\n600:vpostgres:vpgmongrp\n\nIf the output does not match the expected result, this is a finding.","fixText":"At the command prompt, run the following commands:\n\n# chmod 600 /storage/db/vpostgres_ssl/server.key\n# chown vpostgres:vpgmongrp /storage/db/vpostgres_ssl/server.key","ccis":["CCI-000186"]},{"vulnId":"V-256603","ruleId":"SV-256603r887595_rule","severity":"high","ruleTitle":"VMware Postgres must use FIPS 140-2 approved Transport Layer Security (TLS) ciphers.","description":"Use of weak or unvalidated cryptographic algorithms undermines the purposes of using encryption and digital signatures to protect data. Weak algorithms can be broken, and unvalidated cryptographic modules may not implement algorithms correctly. Unapproved cryptographic modules or algorithms should not be relied on for authentication, confidentiality, or integrity. Weak cryptography could allow an attacker to gain access to and modify data stored in the database as well as the administration settings of the database management system (DBMS).\n\nVMware Postgres does not currently implement FIPS-validated cryptographic modules. This is planned but, in the interim, Postgres can be configured with strong ciphers from the FIPS-140 approved suite. Additionally, as an embedded database available only on \"localhost\" for a standalone vCenter Server Appliance, TLS connections are used only in high-availability deployments for connections between a primary and a standby.\n\nSatisfies: SRG-APP-000179-DB-000114, SRG-APP-000514-DB-000381, SRG-APP-000514-DB-000382, SRG-APP-000514-DB-000383","checkContent":"At the command prompt, run the following command:\n\n# /opt/vmware/vpostgres/current/bin/psql -U postgres -A -t -c \"SHOW ssl_ciphers;\"\n\nExpected result:\n\n!aNULL:kECDH+AES:ECDH+AES:RSA+AES:@STRENGTH\n\nIf the output does not match the expected result, this is a finding.","fixText":"At the command prompt, run the following commands:\n\n# /opt/vmware/vpostgres/current/bin/psql -U postgres -c \"ALTER SYSTEM SET ssl_ciphers TO '!aNULL:kECDH+AES:ECDH+AES:RSA+AES:@STRENGTH';\"\n\n# /opt/vmware/vpostgres/current/bin/psql -U postgres -c \"SELECT pg_reload_conf();\"","ccis":["CCI-000803","CCI-002450"]},{"vulnId":"V-256604","ruleId":"SV-256604r887598_rule","severity":"medium","ruleTitle":"VMware Postgres must write log entries to disk prior to returning operation success or failure.","description":"Failure to a known secure state helps prevent a loss of confidentiality, integrity, or availability in the event of a failure of the information system or a component of the system. Preserving system state information helps to facilitate system restart and return to the operational mode of the organization with less disruption of mission/business processes. \n\nAggregating log writes saves on performance but leaves a window for log data loss. The logging system inside VMware Postgres is capable of writing logs to disk fully and completely before the associated operation is returned to the client. This ensures database activity is always captured, even in the event of a system crash during or immediately after a given operation.","checkContent":"At the command prompt, run the following command:\n\n# /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');\"\n\nExpected result:\n\nfsync              | on\nfull_page_writes   | on\nsynchronous_commit | on\n\nIf the output does not match the expected result, this is a finding.","fixText":"At the command prompt, run the following commands for each setting returned as \"off\" in the check:\n\n# /opt/vmware/vpostgres/current/bin/psql -U postgres -c \"ALTER SYSTEM SET <name> TO 'on';\"\n\n# /opt/vmware/vpostgres/current/bin/psql -U postgres -c \"SELECT pg_reload_conf();\"\n\nNote: Substitute <name> with the incorrectly set parameter (fsync, full_page_writes, synchronous_commit).","ccis":["CCI-001665"]},{"vulnId":"V-256605","ruleId":"SV-256605r887601_rule","severity":"medium","ruleTitle":"VMware Postgres must not allow schema access to unauthorized accounts.","description":"Database management systems typically separate security functionality from nonsecurity functionality via separate databases or schemas. Database objects or code implementing security functionality should not be commingled with objects or code implementing application logic. When security and nonsecurity functionality are commingled, users who have access to nonsecurity functionality may be able to access security functionality.\n\nVMware Postgres contains a number of system configuration schemas for which access must be strictly limited. By default, the \"pg_catalog\" and \"information_schema\" objects are configured to only be accessible in a read-only manner publicly and otherwise only accessible by the Postgres user. This configuration must be verified and maintained.","checkContent":"At the command prompt, run the following command:\n\n# /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\"\n\nIf any lines are returned, this is a finding.","fixText":"At the command prompt, run the following command:\n\n# /opt/vmware/vpostgres/current/bin/psql -U postgres -c \"REVOKE ALL PRIVILEGES ON <name> FROM <user>;\"\n\nReplace <name> and <user> with the Access Privilege name and account, respectively, discovered during the check.","ccis":["CCI-001084"]},{"vulnId":"V-256606","ruleId":"SV-256606r887604_rule","severity":"medium","ruleTitle":"VMware Postgres must provide nonprivileged users with minimal error information.","description":"Any database management system (DBMS) or associated application providing too much information in error messages on the screen or printout risks compromising the data and security of the system. The structure and content of error messages must contain the minimal amount of information.\n\nDatabases can inadvertently provide a wealth of information to an attacker through improperly handled error messages. In addition to sensitive business or personal information, database errors can provide host names, IP addresses, user names, and other system information not required for troubleshooting but very useful to someone targeting the system.\n\nSatisfies: SRG-APP-000266-DB-000162, SRG-APP-000267-DB-000163","checkContent":"At the command prompt, run the following command:\n\n# /opt/vmware/vpostgres/current/bin/psql -U postgres -A -t -c \"SHOW client_min_messages;\"\n\nExpected result:\n\nnotice\n\nIf the output does not match the expected result, this is a finding.","fixText":"At the command prompt, run the following commands:\n\n# /opt/vmware/vpostgres/current/bin/psql -U postgres -c \"ALTER SYSTEM SET client_min_messages TO 'notice';\"\n\n# /opt/vmware/vpostgres/current/bin/psql -U postgres -c \"SELECT pg_reload_conf();\"","ccis":["CCI-001312","CCI-001314"]},{"vulnId":"V-256607","ruleId":"SV-256607r887607_rule","severity":"medium","ruleTitle":"VMware Postgres must have log collection enabled.","description":"Without the ability to centrally manage the content captured in the audit records, identification, troubleshooting, and correlation of suspicious behavior would be difficult and could lead to a delayed or incomplete analysis of an ongoing attack.\n\nThe content captured in audit records must be managed from a central location (necessitating automation). Centralized management of audit records and logs provides for efficiency in maintenance and management of records, as well as the backup and archiving of those records. \n\nVMware Postgres is capable of outputting directly to syslog but for performance reasons, the vCenter Server Appliance (VCSA) is configured to ship logs centrally via \"rsyslog\" file monitoring. To facilitate that configuration, log files must be generated to disk.\n\nSatisfies: SRG-APP-000356-DB-000314, SRG-APP-000356-DB-000315, SRG-APP-000092-DB-000208, SRG-APP-000381-DB-000361, SRG-APP-000495-DB-000326, SRG-APP-000495-DB-000327, SRG-APP-000495-DB-000328, SRG-APP-000495-DB-000329, SRG-APP-000496-DB-000334, SRG-APP-000496-DB-000335, SRG-APP-000499-DB-000330, SRG-APP-000499-DB-000331, SRG-APP-000501-DB-000336, SRG-APP-000501-DB-000337, SRG-APP-000504-DB-000354, SRG-APP-000504-DB-000355, SRG-APP-000507-DB-000356, SRG-APP-000507-DB-000357, SRG-APP-000508-DB-000358","checkContent":"At the command prompt, run the following command:\n\n# /opt/vmware/vpostgres/current/bin/psql -U postgres -A -t -c \"SHOW logging_collector;\"\n\nExpected result:\n\non\n\nIf the output does not match the expected result, this is a finding.","fixText":"At the command prompt, run the following commands:\n\n# /opt/vmware/vpostgres/current/bin/psql -U postgres -c \"ALTER SYSTEM SET logging_collector TO 'on';\"\n\n# /opt/vmware/vpostgres/current/bin/psql -U postgres -c \"SELECT pg_reload_conf();\"","ccis":["CCI-000172","CCI-001464","CCI-001814","CCI-001844"]},{"vulnId":"V-256608","ruleId":"SV-256608r887610_rule","severity":"medium","ruleTitle":"VMware Postgres must be configured to log to \"stderr\".","description":"Without the ability to centrally manage the content captured in the audit records, identification, troubleshooting, and correlation of suspicious behavior would be difficult and could lead to a delayed or incomplete analysis of an ongoing attack.\n\nThe content captured in audit records must be managed from a central location (necessitating automation). Centralized management of audit records and logs provides for efficiency in maintenance and management of records, as well as the backup and archiving of those records.\n\nFor VMware Postgres logs to be successfully sent to a remote log management system, log events must be sent to \"stderr\". Those events will be captured and logged to disk where they will be picked up by \"rsyslog\" for shipping.","checkContent":"At the command prompt, run the following command:\n\n# /opt/vmware/vpostgres/current/bin/psql -U postgres -A -t -c \"SHOW log_destination;\"\n\nExpected result:\n\nstderr\n\nIf the output does not match the expected result, this is a finding.","fixText":"At the command prompt, run the following commands:\n\n# /opt/vmware/vpostgres/current/bin/psql -U postgres -c \"ALTER SYSTEM SET log_destination TO 'stderr';\"\n\n# /opt/vmware/vpostgres/current/bin/psql -U postgres -c \"SELECT pg_reload_conf();\"","ccis":["CCI-001855"]},{"vulnId":"V-256609","ruleId":"SV-256609r887613_rule","severity":"medium","ruleTitle":"\"Rsyslog\" must be configured to monitor VMware Postgres logs.","description":"For performance reasons, \"rsyslog\" file monitoring is preferred over configuring VMware Postgres to send events to a \"syslog\" facility. Without ensuring that logs are created, that \"rsyslog\" configs are created, and that those configs are loaded, the log file monitoring and shipping will not be effective.\n\nSatisfies: SRG-APP-000359-DB-000319, SRG-APP-000360-DB-000320, SRG-APP-000515-DB-000318","checkContent":"At the command prompt, run the following command:\n\n# rpm -V VMware-Postgres-cis-visl-scripts|grep -E \"vmware-services-vmware-vpostgres.conf|vmware-services-vmware-postgres-archiver.conf\" | grep \"^..5......\"\n\nIf the command returns any output, this is a finding.","fixText":"Navigate to and open:\n\n/etc/vmware-syslog/vmware-services-vmware-vpostgres.conf\n\nCreate the file if it does not exist.\n\nSet the contents of the file as follows:\n\n# vmware-vpostgres first logs, before loading configuration\ninput(type=\"imfile\"\n      File=\"/var/log/vmware/vpostgres/serverlog.std*\"\n      Tag=\"vpostgres-first\"\n      Severity=\"info\"\n      Facility=\"local0\")\n# vmware-vpostgres logs\ninput(type=\"imfile\"\n      File=\"/var/log/vmware/vpostgres/postgresql-*.log\"\n      Tag=\"vpostgres\"\n      Severity=\"info\"\n      Facility=\"local0\")\n\nNavigate to and open:\n\n/etc/vmware-syslog/vmware-services-vmware-postgres-archiver.conf\n\nCreate the file if it does not exist.\n\nSet the contents of the file as follows:\n\n# vmware-postgres-archiver logs\ninput(type=\"imfile\"\n      File=\"/var/log/vmware/vpostgres/pg_archiver.log.std*\"\n      Tag=\"postgres-archiver\"\n      Severity=\"info\"\n      Facility=\"local0\")","ccis":["CCI-001851","CCI-001855","CCI-001858"]},{"vulnId":"V-256610","ruleId":"SV-256610r887616_rule","severity":"medium","ruleTitle":"VMware Postgres must use Coordinated Universal Time (UTC) for log timestamps.","description":"If time stamps are not consistently applied and there is no common time reference, it is difficult to perform forensic analysis. Time stamps generated by VMware Postgres must include date and time expressed in UTC, a modern continuation of Greenwich Mean Time (GMT).","checkContent":"At the command prompt, run the following command:\n\n# /opt/vmware/vpostgres/current/bin/psql -U postgres -A -t -c \"SHOW log_timezone;\"\n\nExpected result:\n\nEtc/UTC\n\nIf the output does not match the expected result, this is a finding.","fixText":"At the command prompt, run the following commands:\n\n# /opt/vmware/vpostgres/current/bin/psql -U postgres -c \"ALTER SYSTEM SET log_timezone TO 'Etc/UTC';\"\n\n# /opt/vmware/vpostgres/current/bin/psql -U postgres -c \"SELECT pg_reload_conf();\"","ccis":["CCI-001890"]}]}