mirror of
https://github.com/jprdonnelly/qseow-scripts.git
synced 2026-02-12 12:00:06 -05:00
2497 lines
340 KiB
Plaintext
2497 lines
340 KiB
Plaintext
{
|
|
"stig": {
|
|
"date": "2020-09-23",
|
|
"description": "This Security Technical Implementation Guide is published as a tool to improve the security of Department of Defense (DoD) information systems. The requirements are derived from the National Institute of Standards and Technology (NIST) 800-53 and related documents. Comments or proposed revisions to this document should be sent via email to the following address: disa.stig_spt@mail.mil.",
|
|
"findings": {
|
|
"V-214048": {
|
|
"checkid": "C-15264r360775_chk",
|
|
"checktext": "As the database administrator, run the following SQL:\n\n$ psql -c \"SHOW port\"\n\nIf the currently defined port configuration is deemed prohibited, this is a finding.",
|
|
"description": "In order 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/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.",
|
|
"fixid": "F-15262r360776_fix",
|
|
"fixtext": "Note: The following instructions use the PGDATA and PGVER environment variables. See supplementary content APPENDIX-F for instructions on configuring PGDATA and APPENDIX-H for PGVER.\n\nTo change the listening port of the database, as the database administrator, change the following setting in postgresql.conf: \n\n$ sudo su - postgres \n$ vi $PGDATA/postgresql.conf \n\nChange the port parameter to the desired port. \n\nNext, restart the database: \n\n# SYSTEMD SERVER ONLY \n$ sudo systemctl restart postgresql-${PGVER?} \n\n# INITD SERVER ONLY \n$ sudo service postgresql-${PGVER?} restart \n\nNote: psql uses the default port 5432 by default. This can be changed by specifying the port with psql or by setting the PGPORT environment variable: \n\n$ psql -p 5432 -c \"SHOW port\" \n$ export PGPORT=5432",
|
|
"iacontrols": null,
|
|
"id": "V-214048",
|
|
"ruleID": "SV-214048r508027_rule",
|
|
"severity": "medium",
|
|
"title": "PostgreSQL must be configured to prohibit or restrict the use of organization-defined functions, ports, protocols, and/or services, as defined in the PPSM CAL and vulnerability assessments.",
|
|
"version": "PGS9-00-000100"
|
|
},
|
|
"V-214049": {
|
|
"checkid": "C-15265r360778_chk",
|
|
"checktext": "Note: The following instructions use the PGDATA environment variable. See supplementary content APPENDIX-F for instructions on configuring PGDATA.\n\nAs a database administrator (shown here as \"postgres\"), create a table, insert a value, alter the table and update the table by running the following SQL:\n\nCREATE TABLE stig_test(id INT);\nINSERT INTO stig_test(id) VALUES (0);\nALTER TABLE stig_test ADD COLUMN name text;\nUPDATE stig_test SET id = 1 WHERE id = 0;\n\nNext, as a user without access to the stig_test table, run the following SQL:\n\nINSERT INTO stig_test(id) VALUES (1);\nALTER TABLE stig_test DROP COLUMN name;\nUPDATE stig_test SET id = 0 WHERE id = 1;\n\nThe prior SQL should generate errors:\n\nERROR: permission denied for relation stig_test\nERROR: must be owner of relation stig_test\nERROR: permission denied for relation stig_test\n\nNow, as the database administrator, drop the test table by running the following SQL:\n\nDROP TABLE stig_test;\n\nNow verify the errors were logged:\n\n$ sudo su - postgres\n$ cat ${PGDATA?}/pg_log/<latest_logfile>$PGDATA/\n< 2016-02-23 14:51:31.103 EDT psql postgres postgres 570bf22a.3af2 2016-04-11 14:51:22 EDT [local] >LOG: AUDIT: SESSION,1,1,DDL,CREATE TABLE,,,CREATE TABLE stig_test(id INT);,<none>\n< 2016-02-23 14:51:44.835 EDT psql postgres postgres 570bf22a.3af2 2016-04-11 14:51:22 EDT [local] >LOG: AUDIT: SESSION,2,1,WRITE,INSERT,,,INSERT INTO stig_test(id) VALUES (0);,<none>\n< 2016-02-23 14:53:25.805 EDT psql postgres postgres 570bf22a.3af2 2016-04-11 14:51:22 EDT [local] >LOG: AUDIT: SESSION,3,1,DDL,ALTER TABLE,,,ALTER TABLE stig_test ADD COLUMN name text;,<none>\n< 2016-02-23 14:53:54.381 EDT psql postgres postgres 570bf22a.3af2 2016-04-11 14:51:22 EDT [local] >LOG: AUDIT: SESSION,4,1,WRITE,UPDATE,,,UPDATE stig_test SET id = 1 WHERE id = 0;,<none>\n< 2016-02-23 14:54:20.832 EDT psql postgres postgres 570bf22a.3af2 2016-04-11 14:51:22 EDT [local] >ERROR: permission denied for relation stig_test\n< 2016-02-23 14:54:20.832 EDT psql postgres postgres 570bf22a.3af2 2016-04-11 14:51:22 EDT [local] >STATEMENT: INSERT INTO stig_test(id) VALUES (1);\n< 2016-02-23 14:54:41.032 EDT psql postgres postgres 570bf22a.3af2 2016-04-11 14:51:22 EDT [local] >ERROR: must be owner of relation stig_test\n< 2016-02-23 14:54:41.032 EDT psql postgres postgres 570bf22a.3af2 2016-04-11 14:51:22 EDT [local] >STATEMENT: ALTER TABLE stig_test DROP COLUMN name;\n< 2016-02-23 14:54:54.378 EDT psql postgres postgres 570bf22a.3af2 2016-04-11 14:51:22 EDT [local] >ERROR: permission denied for relation stig_test\n< 2016-02-23 14:54:54.378 EDT psql postgres postgres 570bf22a.3af2 2016-04-11 14:51:22 EDT [local] >STATEMENT: UPDATE stig_test SET id = 0 WHERE id = 1;\n< 2016-02-23 14:55:23.723 EDT psql postgres postgres 570bf307.3b0a 2016-04-11 14:55:03 EDT [local] >LOG: AUDIT: SESSION,1,1,DDL,DROP TABLE,,,DROP TABLE stig_test;,<none>\n\nIf audit records exist without the outcome of the event that occurred, this is a finding.",
|
|
"description": "Information system auditing capability is critical for accurate forensic analysis. Without information about the outcome of events, security personnel cannot make an accurate assessment as to whether an attack was successful or if changes were made to the security state of the system.\n\nEvent outcomes can include indicators of event success or failure and event-specific results (e.g., the security state of the information system after the event occurred). As such, they also provide a means to measure the impact of an event and help authorized personnel to determine the appropriate response.",
|
|
"fixid": "F-15263r360779_fix",
|
|
"fixtext": "Using pgaudit PostgreSQL can be configured to audit various facets of PostgreSQL. See supplementary content APPENDIX-B for documentation on installing pgaudit. \n\nAll errors, denials and unsuccessful requests are logged if logging is enabled. See supplementary content APPENDIX-C for documentation on enabling logging. \n\nNote: The following instructions use the PGDATA and PGVER environment variables. See supplementary content APPENDIX-F for instructions on configuring PGDATA and APPENDIX-H for PGVER.\n\nWith pgaudit and logging enabled, set the following configuration settings in postgresql.conf, as the database administrator (shown here as \"postgres\"), to the following: \n\n$ sudo su - postgres\n$ vi ${PGDATA?}/postgresql.conf \npgaudit.log_catalog='on' \npgaudit.log_level='log' \npgaudit.log_parameter='on' \npgaudit.log_statement_once='off' \npgaudit.log='all, -misc' \n\nNext, tune the following logging configurations in postgresql.conf: \n\n$ sudo su - postgres\n$ vi ${PGDATA?}/postgresql.conf \nlog_line_prefix = '< %m %u %d %e: >' \nlog_error_verbosity = default \n\nLast, as the system administrator, restart PostgreSQL: \n\n# SYSTEMD SERVER ONLY\n$ sudo systemctl reload postgresql-${PGVER?}\n\n# INITD SERVER ONLY\n$ sudo service postgresql-${PGVER?} reload",
|
|
"iacontrols": null,
|
|
"id": "V-214049",
|
|
"ruleID": "SV-214049r508027_rule",
|
|
"severity": "medium",
|
|
"title": "PostgreSQL must produce audit records containing sufficient information to establish the outcome (success or failure) of the events.",
|
|
"version": "PGS9-00-000200"
|
|
},
|
|
"V-214050": {
|
|
"checkid": "C-15266r360781_chk",
|
|
"checktext": "If new packages are available for PostgreSQL, they can be reviewed in the package manager appropriate for the server operating system:\n\nTo list the version of installed PostgreSQL using psql:\n\n$ sudo su - postgres\n$ psql -\u2013version\n\nTo list the current version of software for RPM:\n\n$ rpm -qa | grep postgres\n\nTo list the current version of software for APT:\n\n$ apt-cache policy postgres\n\nAll versions of PostgreSQL will be listed on:\n\nhttp://www.postgresql.org/support/versioning/\n\nAll security-relevant software updates for PostgreSQL will be listed on:\n\nhttp://www.postgresql.org/support/security/\n\nIf PostgreSQL is not at the latest version, this is a finding.\n\nIf PostgreSQL is not at the latest version and the evaluated version has CVEs (IAVAs), then this is a CAT I finding.",
|
|
"description": "Security flaws with software applications, including database management systems, are discovered daily. Vendors are constantly updating and patching their products to address newly discovered security vulnerabilities. Organizations (including any contractor to the organization) are required to promptly install security-relevant software updates (e.g., patches, service packs, and hot fixes). Flaws discovered during security assessments, continuous monitoring, incident response activities, or information system error handling must also be addressed expeditiously.\n\nOrganization-defined time periods for updating security-relevant software may vary based on a variety of factors including, for example, the security category of the information system or the criticality of the update (i.e., severity of the vulnerability related to the discovered flaw).\n\nThis requirement will apply to software patch management solutions that are used to install patches across the enclave and also to applications themselves that are not part of that patch management solution. For example, many browsers today provide the capability to install their own patch software. Patch criticality, as well as system criticality, will vary. Therefore, the tactical situations regarding the patch management process will also vary. This means that the time period utilized must be a configurable parameter. Time frames for application of security-relevant software updates may be dependent upon the Information Assurance Vulnerability Management (IAVM) process.\n\nThe application will be configured to check for and install security-relevant software updates within an identified time period from the availability of the update. The specific time period will be defined by an authoritative source (e.g., IAVM, CTOs, DTMs, and STIGs).",
|
|
"fixid": "F-15264r360782_fix",
|
|
"fixtext": "Institute and adhere to policies and procedures to ensure that patches are consistently applied to PostgreSQL within the time allowed.",
|
|
"iacontrols": null,
|
|
"id": "V-214050",
|
|
"ruleID": "SV-214050r508027_rule",
|
|
"severity": "high",
|
|
"title": "Security-relevant software updates to PostgreSQL must be installed within the time period directed by an authoritative source (e.g., IAVM, CTOs, DTMs, and STIGs).",
|
|
"version": "PGS9-00-000300"
|
|
},
|
|
"V-214051": {
|
|
"checkid": "C-15267r360784_chk",
|
|
"checktext": "Review locations of audit logs, both internal to the database and database audit logs located at the operating system level. \n\nVerify there are appropriate controls and permissions to protect the audit information from unauthorized modification. \n\nNote: The following instructions use the PGDATA environment variable. See supplementary content APPENDIX-F for instructions on configuring PGDATA. \n\n#### stderr Logging \n\nIf the PostgreSQL server is configured to use stderr for logging, the logs will be owned by the database owner (usually postgres user) with a default permissions level of 0600. The permissions can be configured in postgresql.conf. \n\nTo check the permissions for log files in postgresql.conf, as the database owner (shown here as \"postgres\"), run the following command: \n\n$ sudo su - postgres \n$ grep \"log_file_mode\" ${PGDATA?}/postgresql.conf \n\nIf the permissions are not 0600, this is a finding. \n\nNext, navigate to where the logs are stored. This can be found by running the following command against postgresql.conf as the database owner (shown here as \"postgres\"): \n\n$ sudo su - postgres \n$ grep \"log_directory\" ${PGDATA?}/postgresql.conf \n\nWith the log directory identified, as the database owner (shown here as \"postgres\"), list the permissions of the logs: \n\n$ sudo su - postgres \n$ ls -la ${PGDATA?}/pg_log \n\nIf logs are not owned by the database owner (shown here as \"postgres\") and are not the same permissions as configured in postgresql.conf, this is a finding. \n\n#### syslog Logging \n\nIf the PostgreSQL server is configured to use syslog for logging, consult the organization syslog setting for permissions and ownership of logs.",
|
|
"description": "If audit data were to become compromised, then competent forensic analysis and discovery of the true source of potentially malicious system activity is impossible to achieve. \n\nTo ensure the veracity of audit data the information system and/or the application must protect audit information from unauthorized modification. \n\nThis requirement can be achieved through multiple methods that will depend upon system architecture and design. Some commonly employed methods include ensuring log files enjoy the proper file system permissions and limiting log data locations. \n\nApplications providing a user interface to audit data will leverage user permissions and roles identifying the user accessing the data and the corresponding rights that the user enjoys in order to make access decisions regarding the modification of audit data.\n\nAudit information includes all information (e.g., audit records, audit settings, and audit reports) needed to successfully audit information system activity. \n\nModification of database audit data could mask the theft of, or the unauthorized modification of, sensitive data stored in the database.",
|
|
"fixid": "F-15265r360785_fix",
|
|
"fixtext": "To ensure that logging is enabled, review supplementary content APPENDIX-C for instructions on enabling logging.\n\nNote: The following instructions use the PGDATA environment variable. See supplementary content APPENDIX-F for instructions on configuring PGDATA.\n\n#### stderr Logging\n\nWith stderr logging enabled, as the database owner (shown here as \"postgres\"), set the following parameter in postgresql.conf:\n\n$ vi ${PGDATA?}/postgresql.conf\nlog_file_mode = 0600\n\nTo change the owner and permissions of the log files, run the following:\n\n$ chown postgres:postgres ${PGDATA?}/<log directory name>\n$ chmod 0700 ${PGDATA?}/<log directory name>\n$ chmod 600 ${PGDATA?}/<log directory name>/*.log\n\n#### syslog Logging\n\nIf PostgreSQL is configured to use syslog for logging, the log files must be configured to be owned by root with 0600 permissions.\n\n$ chown root:root <log directory name>/<log_filename>\n$ chmod 0700 <log directory name>\n$ chmod 0600 <log directory name>/*.log",
|
|
"iacontrols": null,
|
|
"id": "V-214051",
|
|
"ruleID": "SV-214051r508027_rule",
|
|
"severity": "medium",
|
|
"title": "The audit information produced by PostgreSQL must be protected from unauthorized modification.",
|
|
"version": "PGS9-00-000400"
|
|
},
|
|
"V-214052": {
|
|
"checkid": "C-15268r360787_chk",
|
|
"checktext": "Note: The following instructions use the PGDATA environment variable. See supplementary content APPENDIX-F for instructions on configuring PGDATA.\n\nIf all accounts are authenticated by the organization-level authentication/access mechanism, such as LDAP or Kerberos and not by PostgreSQL, this is not a finding.\n\nAs the database administrator (shown here as \"postgres\"), review pg_hba.conf authentication file settings:\n\n$ sudo su - postgres\n$ cat ${PGDATA?}/pg_hba.conf\n\nAll records must use an auth-method of gss, sspi, or ldap. For details on the specifics of these authentication methods see: http://www.postgresql.org/docs/current/static/auth-pg-hba-conf.html\n\nIf there are any records with a different auth-method than gss, sspi, or ldap, review the system documentation for justification and approval of these records.\n\nIf there are any records with a different auth-method than gss, sspi, or ldap, that are not documented and approved, this is a finding.",
|
|
"description": "Enterprise environments make account management for applications and databases challenging and complex. A manual process for account management functions adds the risk of a potential oversight or other error. Managing accounts for the same person in multiple places is inefficient and prone to problems with consistency and synchronization.\n\nA comprehensive application account management process that includes automation helps to ensure that accounts designated as requiring attention are consistently and promptly addressed. \n\nExamples include, but are not limited to, using automation to take action on multiple accounts designated as inactive, suspended, or terminated, or by disabling accounts located in non-centralized account stores, such as multiple servers. Account management functions can also include: assignment of group or role membership; identifying account type; specifying user access authorizations (i.e., privileges); account removal, update, or termination; and administrative alerts. The use of automated mechanisms can include, for example: using email or text messaging to notify account managers when users are terminated or transferred; using the information system to monitor account usage; and using automated telephone notification to report atypical system account usage.\n\nPostgreSQL must be configured to automatically utilize organization-level account management functions, and these functions must immediately enforce the organization's current account policy. \n\nAutomation may be comprised of differing technologies that when placed together contain an overall mechanism supporting an organization's automated account management requirements.",
|
|
"fixid": "F-15266r360788_fix",
|
|
"fixtext": "Note: The following instructions use the PGDATA environment variable. See supplementary content APPENDIX-F for instructions on configuring PGDATA.\n\nIntegrate PostgreSQL security with an organization-level authentication/access mechanism providing account management for all users, groups, roles, and any other principals.\n\nAs the database administrator (shown here as \"postgres\"), edit pg_hba.conf authentication file:\n\n$ sudo su - postgres\n$ vi ${PGDATA?}/pg_hba.conf\n\nFor each PostgreSQL-managed account that is not documented and approved, either transfer it to management by the external mechanism, or document the need for it and obtain approval, as appropriate.",
|
|
"iacontrols": null,
|
|
"id": "V-214052",
|
|
"ruleID": "SV-214052r508027_rule",
|
|
"severity": "medium",
|
|
"title": "PostgreSQL must integrate with an organization-level authentication/access mechanism providing account management and automation for all users, groups, roles, and any other principals.",
|
|
"version": "PGS9-00-000500"
|
|
},
|
|
"V-214053": {
|
|
"checkid": "C-15269r360790_chk",
|
|
"checktext": "As the database administrator, run the following SQL:\n\nSELECT current_setting('client_min_messages');\n\nIf client_min_messages is not set to error, this is a finding.",
|
|
"description": "Any PostgreSQL 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 need to be carefully considered by the organization and development team.\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\nCarefully consider the structure/content of error messages. The extent to which information systems are able to identify and handle error conditions is guided by organizational policy and operational requirements. Information that could be exploited by adversaries includes, for example, logon attempts with passwords entered by mistake as the username, mission/business information that can be derived from (if not stated explicitly by) information recorded, and personal information, such as account numbers, social security numbers, and credit card numbers.",
|
|
"fixid": "F-15267r360791_fix",
|
|
"fixtext": "Note: The following instructions use the PGDATA and PGVER environment variables. See supplementary content APPENDIX-F for instructions on configuring PGDATA and APPENDIX-H for PGVER.\n\nAs the database administrator, edit \"postgresql.conf\": \n\n$ sudo su - postgres \n$ vi $PGDATA/postgresql.conf \n\nChange the client_min_messages parameter to be \"error\": \n\nclient_min_messages = error \n\nReload the server with the new configuration (this just reloads settings currently in memory; it will not cause an interruption): \n\n# SYSTEMD SERVER ONLY \n$ sudo systemctl reload postgresql-${PGVER?}\n\n# INITD SERVER ONLY \n$ sudo service postgresql-${PGVER?} reload\n",
|
|
"iacontrols": null,
|
|
"id": "V-214053",
|
|
"ruleID": "SV-214053r508027_rule",
|
|
"severity": "medium",
|
|
"title": "PostgreSQL must provide non-privileged users with error messages that provide information necessary for corrective actions without revealing information that could be exploited by adversaries.",
|
|
"version": "PGS9-00-000600"
|
|
},
|
|
"V-214054": {
|
|
"checkid": "C-15270r360793_chk",
|
|
"checktext": "Note: The following instructions use the PGDATA and PGVER environment variables. See supplementary content APPENDIX-F for instructions on configuring PGDATA and APPENDIX-H for PGVER.\n\nAs the database administrator (shown here as \"postgres\"), check the permissions of configuration files for the database:\u00a0\n\n$ sudo su - postgres\u00a0\n$ ls -la ${PGDATA?}\u00a0\n\nIf any files are not owned by the database owner or have permissions allowing others to modify (write) configuration files, this is a finding.\u00a0\n\nAs the server administrator, check the permissions on the shared libraries for PostgreSQL:\u00a0\n\n$ sudo ls -la /usr/pgsql-${PGVER?} \n$ sudo ls -la /usr/pgsql-${PGVER?}/bin\u00a0\n$ sudo ls -la /usr/pgsql-${PGVER?}/include\u00a0\n$ sudo ls -la /usr/pgsql-${PGVER?}/lib\u00a0\n$ sudo ls -la /usr/pgsql-${PGVER?}/share\u00a0\n\nIf any files are not owned by root or have permissions allowing others to modify (write) configuration files, this is a finding.",
|
|
"description": "If the system were to allow any user to make changes to software libraries, those changes might be implemented without undergoing the appropriate testing and approvals that are part of a robust change management process.\n\nAccordingly, only qualified and authorized individuals must be allowed to obtain access to information system components for purposes of initiating changes, including upgrades and modifications.\n\nUnmanaged changes that occur to the database software libraries or configuration can lead to unauthorized or compromised installations.",
|
|
"fixid": "F-15268r360794_fix",
|
|
"fixtext": "Note: The following instructions use the PGDATA and PGVER environment variables. See supplementary content APPENDIX-F for instructions on configuring PGDATA and APPENDIX-H for PGVER.\n\nAs the database administrator (shown here as \"postgres\"), change the ownership and permissions of configuration files in PGDATA: \n\n$ sudo su - postgres \n$ chown postgres:postgres ${PGDATA?}/postgresql.conf \n$ chmod 0600 ${PGDATA?}/postgresql.conf \n\nAs the server administrator, change the ownership and permissions of shared objects in /usr/pgsql-${PGVER?}/*.so \n\n$ sudo chown root:root /usr/pgsql-${PGVER?}/lib/*.so \n$ sudo chmod 0755 /usr/pgsql-${PGVER?}/lib/*.so \n\nAs the service administrator, change the ownership and permissions of executables in /usr/pgsql-${PGVER?}/bin: \n\n$ sudo chown root:root /usr/pgsql-${PGVER?}/bin/* \n$ sudo chmod 0755 /usr/pgsql-${PGVER?}/bin/*",
|
|
"iacontrols": null,
|
|
"id": "V-214054",
|
|
"ruleID": "SV-214054r508027_rule",
|
|
"severity": "medium",
|
|
"title": "Privileges to change PostgreSQL software modules must be limited.",
|
|
"version": "PGS9-00-000700"
|
|
},
|
|
"V-214055": {
|
|
"checkid": "C-15271r360796_chk",
|
|
"checktext": "Only owners of objects can change them. To view all functions, triggers, and trigger procedures, their ownership and source, as the database administrator (shown here as \"postgres\") run the following SQL:\n\n$ sudo su - postgres\n$ psql -x -c \"\\df+\"\n\nOnly the OS database owner user (shown here as \"postgres\") or a PostgreSQL superuser can change links to external software. As the database administrator (shown here as \"postgres\"), check the permissions of configuration files for the database:\n\n$ sudo su - postgres\n$ ls -la ${PGDATA?}\n\nIf any files are not owned by the database owner or have permissions allowing others to modify (write) configuration files, this is a finding.",
|
|
"description": "If the system were to allow any user to make changes to software libraries, those changes might be implemented without undergoing the appropriate testing and approvals that are part of a robust change management process.\n\nAccordingly, only qualified and authorized individuals must be allowed to obtain access to information system components for purposes of initiating changes, including upgrades and modifications.\n\nUnmanaged changes that occur to the database code can lead to unauthorized or compromised installations.",
|
|
"fixid": "F-15269r360797_fix",
|
|
"fixtext": "To change ownership of an object, as the database administrator (shown here as \"postgres\"), run the following SQL:\n\n$ sudo su \u2013 postgres\n$ psql -c \"ALTER FUNCTION function_name OWNER TO new_role_name\"\n\nTo change ownership of postgresql.conf, as the database administrator (shown here as \"postgres\"), run the following commands:\n\n$ sudo su - postgres\n$ chown postgres:postgres ${PGDATA?}/postgresql.conf\n$ chmod 0600 ${PGDATA?}/postgresql.conf\n\nTo remove superuser from a role, as the database administrator (shown here as \"postgres\"), run the following SQL:\n\n$ sudo su - postgres\n$ psql -c \"ALTER ROLE rolename WITH NOSUPERUSER\"",
|
|
"iacontrols": null,
|
|
"id": "V-214055",
|
|
"ruleID": "SV-214055r508027_rule",
|
|
"severity": "medium",
|
|
"title": "PostgreSQL must limit privileges to change functions and triggers, and links to software external to PostgreSQL.",
|
|
"version": "PGS9-00-000710"
|
|
},
|
|
"V-214056": {
|
|
"checkid": "C-15272r360799_chk",
|
|
"checktext": "Note: The following instructions use the PGDATA environment variable. See supplementary content APPENDIX-F for instructions on configuring PGDATA.\n\nAs the database administrator (shown here as \"postgres\"), review the authentication entries in pg_hba.conf:\n\n$ sudo su - postgres\n$ cat ${PGDATA?}/pg_hba.conf\n\nIf any entries use the auth_method (last column in records) \"password\", this is a finding.",
|
|
"description": "The DoD standard for authentication is DoD-approved 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 AO approval.\n\nIn such cases, passwords need to be protected at all times, and encryption is the standard method for protecting passwords during transmission.\n\nPostgreSQL passwords sent in clear text format across the network are vulnerable to discovery by unauthorized users. Disclosure of passwords may easily lead to unauthorized access to the database.",
|
|
"fixid": "F-15270r360800_fix",
|
|
"fixtext": "Note: The following instructions use the PGDATA environment variable. See supplementary content APPENDIX-F for instructions on configuring PGDATA.\n\nAs the database administrator (shown here as \"postgres\"), edit pg_hba.conf authentication file and change all entries of \"password\" to \"md5\":\n\n$ sudo su - postgres\n$ vi ${PGDATA?}/pg_hba.conf\nhost all all .example.com md5",
|
|
"iacontrols": null,
|
|
"id": "V-214056",
|
|
"ruleID": "SV-214056r508027_rule",
|
|
"severity": "medium",
|
|
"title": "If passwords are used for authentication, PostgreSQL must transmit only encrypted representations of passwords.",
|
|
"version": "PGS9-00-000800"
|
|
},
|
|
"V-214057": {
|
|
"checkid": "C-15273r360802_chk",
|
|
"checktext": "From the system security plan or equivalent documentation, determine the appropriate permissions on database objects for each kind (group role) of user. If this documentation is missing, this is a finding.\n\nFirst, as the database administrator (shown here as \"postgres\"), check the privileges of all roles in the database by running the following SQL:\n\n$ sudo su - postgres\n$ psql -c '\\du'\n\nReview all roles and their associated privileges. If any roles' privileges exceed those documented, this is a finding.\n\nNext, as the database administrator (shown here as \"postgres\"), check the configured privileges for tables and columns by running the following SQL:\n\n$ sudo su - postgres\n$ psql -c '\\dp'\n\nReview all access privileges and column access privileges list. If any roles' privileges exceed those documented, this is a finding.\n\nNext, as the database administrator (shown here as \"postgres\"), check the configured authentication settings in pg_hba.conf:\n\n$ sudo su - postgres\n$ cat ${PGDATA?}/pg_hba.conf\n\nReview all entries and their associated authentication methods. If any entries do not have their documented authentication requirements, this is a finding.",
|
|
"description": "Authentication with a DoD-approved PKI certificate does not necessarily imply authorization to access PostgreSQL. To mitigate the risk of unauthorized access to sensitive information by entities that have been issued certificates by DoD-approved PKIs, all DoD systems, including databases, must be properly configured to implement access control policies.\n\nSuccessful authentication must not automatically give an entity access to an asset or security boundary. Authorization procedures and controls must be implemented to ensure each authenticated entity also has a validated and current authorization. Authorization is the process of determining whether an entity, once authenticated, is permitted to access a specific asset. Information systems use access control policies and enforcement mechanisms to implement this requirement.\n\nAccess control policies include identity-based policies, role-based policies, and attribute-based policies. Access enforcement mechanisms include access control lists, access control matrices, and cryptography. These policies and mechanisms must be employed by the application to control access between users (or processes acting on behalf of users) and objects (e.g., devices, files, records, processes, programs, and domains) in the information system.\n\nThis requirement is applicable to access control enforcement applications, a category that includes database management systems. If PostgreSQL does not follow applicable policy when approving access, it may be in conflict with networks or other applications in the information system. This may result in users either gaining or being denied access inappropriately and in conflict with applicable policy.",
|
|
"fixid": "F-15271r360803_fix",
|
|
"fixtext": "Create and/or maintain documentation of each group role's appropriate permissions on database objects. \n\nImplement these permissions in the database, and remove any permissions that exceed those documented. \n\n- - - - - \n\nThe following are examples of how to use role privileges in PostgreSQL to enforce access controls. For a complete list of privileges, see the official documentation: https://www.postgresql.org/docs/current/static/sql-createrole.html \n\n#### Roles Example 1 \n\nThe following example demonstrates how to create an admin role with CREATEDB and CREATEROLE privileges. \n\nAs the database administrator (shown here as \"postgres\"), run the following SQL: \n\n$ sudo su - postgres \n\n$ psql -c \"CREATE ROLE admin WITH CREATEDB CREATEROLE\" \n\n#### Roles Example 2 \n\nThe following example demonstrates how to create a role with a password that expires and makes the role a member of the \"admin\" group. \n\nAs the database administrator (shown here as \"postgres\"), run the following SQL: \n\n$ sudo su - postgres \n\n$ psql -c \"CREATE ROLE joe LOGIN ENCRYPTED PASSWORD 'stig2016!' VALID UNTIL '2016-09-20' IN ROLE admin\" \n\n#### Roles Example 3 \n\nThe following demonstrates how to revoke privileges from a role using REVOKE. \n\nAs the database administrator (shown here as \"postgres\"), run the following SQL: \n\n$ sudo su - postgres \n\n$ psql -c \"REVOKE admin FROM joe\" \n\n#### Roles Example 4 \n\nThe following demonstrates how to alter privileges in a role using ALTER. \n\nAs the database administrator (shown here as \"postgres\"), run the following SQL: \n\n$ sudo su - postgres \n\n$ psql -c \"ALTER ROLE joe NOLOGIN\" \n\nThe following are examples of how to use grant privileges in PostgreSQL to enforce access controls on objects. For a complete list of privileges, see the official documentation: https://www.postgresql.org/docs/current/static/sql-grant.html \n\n#### Grant Example 1 \n\nThe following example demonstrates how to grant INSERT on a table to a role. \n\nAs the database administrator (shown here as \"postgres\"), run the following SQL: \n\n$ sudo su - postgres \n\n$ psql -c \"GRANT SELECT ON stig_test TO joe\" \n\n#### Grant Example 2 \n\nThe following example demonstrates how to grant ALL PRIVILEGES on a table to a role. \n\nAs the database administrator (shown here as \"postgres\"), run the following SQL: \n\n$ sudo su - postgres \n\n$ psql -c \"GRANT ALL PRIVILEGES ON stig_test TO joe\" \n\n#### Grant Example 3 \n\nThe following example demonstrates how to grant a role to a role. \n\nAs the database administrator (shown here as \"postgres\"), run the following SQL: \n\n$ sudo su - postgres \n\n$ psql -c \"GRANT admin TO joe\" \n\n#### Revoke Example 1 \n\nThe following example demonstrates how to revoke access from a role. \n\nAs the database administrator (shown here as \"postgres\"), run the following SQL: \n\n$ sudo su - postgres \n\n$ psql -c \"REVOKE admin FROM joe\" \n\nTo change authentication requirements for the database, as the database administrator (shown here as \"postgres\"), edit pg_hba.conf: \n\n$ sudo su - postgres \n\n$ vi ${PGDATA?}/pg_hba.conf \n\nEdit authentication requirements to the organizational requirements. See the official documentation for the complete list of options for authentication: http://www.postgresql.org/docs/current/static/auth-pg-hba-conf.html \n\nAfter changes to pg_hba.conf, reload the server: \n\n# SYSTEMD SERVER ONLY \n$ sudo systemctl reload postgresql-${PGVER?} \n\n# INITD SERVER ONLY \n$ sudo service postgresql-${PGVER?} reload",
|
|
"iacontrols": null,
|
|
"id": "V-214057",
|
|
"ruleID": "SV-214057r508027_rule",
|
|
"severity": "medium",
|
|
"title": "PostgreSQL must enforce approved authorizations for logical access to information and system resources in accordance with applicable access control policies.",
|
|
"version": "PGS9-00-000900"
|
|
},
|
|
"V-214058": {
|
|
"checkid": "C-15274r360805_chk",
|
|
"checktext": "If security labeling is not required, this is not a finding.\n\nFirst, as the database administrator (shown here as \"postgres\"), run the following SQL against each table that requires security labels:\n\n$ sudo su - postgres\n$ psql -c \"\\d+ <schema_name>.<table_name>\"\n\nIf security labeling is required and the results of the SQL above do not show a policy attached to the table, this is a finding.\n\nIf security labeling is required and not implemented according to the system documentation, such as SSP, this is a finding.\n\nIf security labeling requirements have been specified, but the security labeling is not implemented or does not reliably maintain labels on information in storage, this is a finding.",
|
|
"description": "Without the association of security labels to information, there is no basis for PostgreSQL to make security-related access-control decisions.\n\nSecurity labels are abstractions representing the basic properties or characteristics of an entity (e.g., subjects and objects) with respect to safeguarding information. \n\nThese labels are typically associated with internal data structures (e.g., tables, rows) within the database and are used to enable the implementation of access control and flow control policies, reflect special dissemination, handling or distribution instructions, or support other aspects of the information security policy. \n\nOne example includes marking data as classified or FOUO. These security labels may be assigned manually or during data processing, but, either way, it is imperative these assignments are maintained while the data is in storage. If the security labels are lost when the data is stored, there is the risk of a data compromise.",
|
|
"fixid": "F-15272r360806_fix",
|
|
"fixtext": "In addition to the SQL-standard privilege system available through GRANT, tables can have row security policies that restrict, on a per-user basis, which rows can be returned by normal queries or inserted, updated, or deleted by data modification commands. This feature is also known as Row-Level Security(RLS).\n\nRLS policies can be very different depending on their use case. For one example of using RLS for Security Labels, see supplementary content APPENDIX-D.",
|
|
"iacontrols": null,
|
|
"id": "V-214058",
|
|
"ruleID": "SV-214058r508027_rule",
|
|
"severity": "medium",
|
|
"title": "PostgreSQL must associate organization-defined types of security labels having organization-defined security label values with information in transmission.",
|
|
"version": "PGS9-00-001100"
|
|
},
|
|
"V-214059": {
|
|
"checkid": "C-15275r360808_chk",
|
|
"checktext": "To check the total amount of connections allowed by the database, as the database administrator, run the following SQL:\n\n$ sudo su - postgres\n$ psql -c \"SHOW max_connections\"\n\nIf the total amount of connections is greater than documented by an organization, this is a finding.\n\nTo check the amount of connections allowed for each role, as the database administrator, run the following SQL:\n\n$ sudo su - postgres\n$ psql -c \"SELECT rolname, rolconnlimit from pg_authid\"\n\nIf any roles have more connections configured than documented, this is a finding. A value of -1 indicates Unlimited, and is a finding.",
|
|
"description": "Database management includes the ability to control the number of users and user sessions utilizing PostgreSQL. Unlimited concurrent connections to PostgreSQL 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\nThis requirement addresses concurrent session control for a single account. It does not address concurrent sessions by a single user via multiple system accounts; and it does not deal with the total number of sessions across all accounts.\n\nThe capability to limit the number of concurrent sessions per user must be configured in or added to PostgreSQL (for example, by use of a logon trigger), when this is technically feasible. Note that it is not sufficient to limit sessions via a web server or application server alone, because legitimate users and adversaries can potentially connect to PostgreSQL by other means.\n\nThe organization will need to define the maximum number of concurrent sessions by account type, by account, or a combination thereof. In deciding on the appropriate number, it is important to consider the work requirements of the various types of users. For example, 2 might be an acceptable limit for general users accessing the database via an application; but 10 might be too few for a database administrator using a database management GUI tool, where each query tab and navigation pane may count as a separate session.\n\n(Sessions may also be referred to as connections or logons, which for the purposes of this requirement are synonyms.)",
|
|
"fixid": "F-15273r360809_fix",
|
|
"fixtext": "Note: The following instructions use the PGDATA and PGVER environment variables. See supplementary content APPENDIX-F for instructions on configuring PGDATA and APPENDIX-H for PGVER.\n\nTo configure the maximum amount of connections allowed to the database, as the database administrator (shown here as \"postgres\") change the following in postgresql.conf (the value 10 is an example; set the value to suit local conditions):\u00a0\n\n$ sudo su - postgres\u00a0\n$ vi ${PGDATA?}/postgresql.conf\u00a0\nmax_connections = 10\u00a0\n\nNext, restart the database:\u00a0\n\n# SYSTEMD SERVER ONLY\u00a0\n$ sudo systemctl restart postgresql-${PGVER?}\n\n# INITD SERVER ONLY\u00a0\n$ sudo service postgresql-${PGVER?} restart\u00a0\n\nTo limit the amount of connections allowed by a specific role, as the database administrator, run the following SQL:\u00a0\n\n$ psql -c \"ALTER ROLE <rolname> CONNECTION LIMIT 1\";",
|
|
"iacontrols": null,
|
|
"id": "V-214059",
|
|
"ruleID": "SV-214059r508027_rule",
|
|
"severity": "medium",
|
|
"title": "PostgreSQL must limit the number of concurrent sessions to an organization-defined number per user for all accounts and/or account types.",
|
|
"version": "PGS9-00-001200"
|
|
},
|
|
"V-214060": {
|
|
"checkid": "C-15276r505254_chk",
|
|
"checktext": "Note: The following instructions use the PGDATA environment variable. See supplementary content APPENDIX-F for instructions on configuring PGDATA.\n\nAs the database administrator (shown here as \"postgres\"), list all users and their permissions by running the following SQL:\n\n$ sudo su - postgres\n$ psql -c \"\\dp *.*\"\n\nVerify that all objects have the correct privileges. If they do not, this is a finding.\n\nNext, as the database administrator (shown here as \"postgres\"), verify the permissions of the database directory on the filesystem:\n\n$ ls -la ${PGDATA?}\n\nIf permissions of the database directory are not limited to an authorized user account, this is a finding.",
|
|
"description": "If PostgreSQL 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\nAccordingly, only qualified and authorized individuals must be allowed to obtain access to information system components for purposes of initiating changes, including upgrades and modifications.\n\nUnmanaged changes that occur to the database software libraries or configuration can lead to unauthorized or compromised installations.",
|
|
"fixid": "F-15274r505255_fix",
|
|
"fixtext": "As the database administrator, revoke any permissions from a role that are deemed unnecessary by running the following SQL:\n\nALTER ROLE bob NOCREATEDB;\nALTER ROLE bob NOCREATEROLE;\nALTER ROLE bob NOSUPERUSER;\nALTER ROLE bob NOINHERIT;\nREVOKE SELECT ON some_function FROM bob;",
|
|
"iacontrols": null,
|
|
"id": "V-214060",
|
|
"ruleID": "SV-214060r508027_rule",
|
|
"severity": "medium",
|
|
"title": "The role(s)/group(s) used to modify database structure (including but not necessarily limited to tables, indexes, storage, etc.) and logic modules (functions, trigger procedures, links to software external to PostgreSQL, etc.) must be restricted to authorized users.",
|
|
"version": "PGS9-00-001300"
|
|
},
|
|
"V-214061": {
|
|
"checkid": "C-15277r360814_chk",
|
|
"checktext": "PostgreSQL uniquely identifies and authenticates PostgreSQL users through the use of DBMS roles. \n\nTo list all roles in the database, as the database administrator (shown here as \"postgres\"), run the following SQL:\n\n$ sudo su - postgres\n$ psql -c \"\\du\"\n\nIf users are not uniquely identified as per organizational documentation, this is a finding.",
|
|
"description": "Non-organizational users include all information system users other than organizational users, which includes organizational employees or individuals the organization deems to have equivalent status of employees (e.g., contractors, guest researchers, individuals from allied nations). \n\nNon-organizational users must be uniquely identified and authenticated for all accesses other than those accesses explicitly identified and documented by the organization when related to the use of anonymous access, such as accessing a web server. \n\nAccordingly, a risk assessment is used in determining the authentication needs of the organization. \n\nScalability, practicality, and security are simultaneously considered in balancing the need to ensure ease of use for access to federal information and information systems with the need to protect and adequately mitigate risk to organizational operations, organizational assets, individuals, other organizations, and the Nation.",
|
|
"fixid": "F-15275r360815_fix",
|
|
"fixtext": "To drop a role, as the database administrator (shown here as \"postgres\"), run the following SQL:\n\n$ sudo su - postgres\n$ psql -c \"DROP ROLE <role_to_drop>\"\n\nTo create a role, as the database administrator, run the following SQL:\n\n$ sudo su - postgres\n$ psql -c \"CREATE ROLE <role name> LOGIN\"\n\nFor the complete list of permissions allowed by roles, see the official documentation: https://www.postgresql.org/docs/current/static/sql-createrole.html",
|
|
"iacontrols": null,
|
|
"id": "V-214061",
|
|
"ruleID": "SV-214061r508027_rule",
|
|
"severity": "medium",
|
|
"title": "PostgreSQL must uniquely identify and authenticate non-organizational users (or processes acting on behalf of non-organizational users).",
|
|
"version": "PGS9-00-001400"
|
|
},
|
|
"V-214062": {
|
|
"checkid": "C-15278r360817_chk",
|
|
"checktext": "If security labeling is not required, this is not a finding.\n\nFirst, as the database administrator (shown here as \"postgres\"), run the following SQL against each table that requires security labels:\n\n$ sudo su - postgres\n$ psql -c \"\\d+ <schema_name>.<table_name>\"\n\nIf security labeling is required and the results of the SQL above do not show a policy attached to the table, this is a finding.\n\nIf security labeling is required and not implemented according to the system documentation, such as SSP, this is a finding.\n\nIf security labeling requirements have been specified, but the security labeling is not implemented or does not reliably maintain labels on information in storage, this is a finding.",
|
|
"description": "Without the association of security labels to information, there is no basis for PostgreSQL to make security-related access-control decisions.\n\nSecurity labels are abstractions representing the basic properties or characteristics of an entity (e.g., subjects and objects) with respect to safeguarding information. \n\nThese labels are typically associated with internal data structures (e.g., tables, rows) within the database and are used to enable the implementation of access control and flow control policies, reflect special dissemination, handling or distribution instructions, or support other aspects of the information security policy. \n\nOne example includes marking data as classified or FOUO. These security labels may be assigned manually or during data processing, but, either way, it is imperative these assignments are maintained while the data is in storage. If the security labels are lost when the data is stored, there is the risk of a data compromise.",
|
|
"fixid": "F-15276r360818_fix",
|
|
"fixtext": "In addition to the SQL-standard privilege system available through GRANT, tables can have row security policies that restrict, on a per-user basis, which rows can be returned by normal queries or inserted, updated, or deleted by data modification commands. This feature is also known as Row-Level Security (RLS).\n\nRLS policies can be very different depending on their use case. For one example of using RLS for Security Labels, see supplementary content APPENDIX-D.",
|
|
"iacontrols": null,
|
|
"id": "V-214062",
|
|
"ruleID": "SV-214062r508027_rule",
|
|
"severity": "medium",
|
|
"title": "PostgreSQL must associate organization-defined types of security labels having organization-defined security label values with information in storage.",
|
|
"version": "PGS9-00-001700"
|
|
},
|
|
"V-214063": {
|
|
"checkid": "C-15279r360820_chk",
|
|
"checktext": "Review PostgreSQL code (trigger procedures, functions), application code, settings, column and field definitions, and constraints to determine whether the database is protected against invalid input.\n\nIf code exists that allows invalid data to be acted upon or input into the database, this is a finding.\n\nIf column/field definitions do not exist in the database, this is a finding.\n\nIf columns/fields do not contain constraints and validity checking where required, this is a finding.\n\nWhere a column/field is noted in the system documentation as necessarily free-form, even though its name and context suggest that it should be strongly typed and constrained, the absence of these protections is not a finding.\n\nWhere a column/field is clearly identified by name, caption or context as Notes, Comments, Description, Text, etc., the absence of these protections is not a finding.\n\nCheck application code that interacts with PostgreSQL for the use of prepared statements. If prepared statements are not used, this is a finding.",
|
|
"description": "Invalid user input occurs when a user inserts data or characters into an application's data entry fields and the application is unprepared to process that data. This results in unanticipated application behavior, potentially leading to an application or information system compromise. Invalid user input is one of the primary methods employed when attempting to compromise an application.\n\nWith respect to database management systems, one class of threat is known as SQL Injection, or more generally, code injection. It takes advantage of the dynamic execution capabilities of various programming languages, including dialects of SQL. Potentially, the attacker can gain unauthorized access to data, including security settings, and severely corrupt or destroy the database.\n\nEven when no such hijacking takes place, invalid input that gets recorded in the database, whether accidental or malicious, reduces the reliability and usability of the system. Available protections include data types, referential constraints, uniqueness constraints, range checking, and application-specific logic. Application-specific logic can be implemented within the database in stored procedures and triggers, where appropriate.\n\nThis calls for inspection of application source code, which will require collaboration with the application developers. It is recognized that in many cases, the database administrator (DBA) is organizationally separate from the application developers, and may have limited, if any, access to source code. Nevertheless, protections of this type are so important to the secure operation of databases that they must not be ignored. At a minimum, the DBA must attempt to obtain assurances from the development organization that this issue has been addressed, and must document what has been discovered.",
|
|
"fixid": "F-15277r360821_fix",
|
|
"fixtext": "Modify database code to properly validate data before it is put into the database or acted upon by the database.\n\nModify the database to contain constraints and validity checking on database columns and tables that require them for data integrity.\n\nUse prepared statements when taking user input. \n\nDo not allow general users direct console access to PostgreSQL.",
|
|
"iacontrols": null,
|
|
"id": "V-214063",
|
|
"ruleID": "SV-214063r508027_rule",
|
|
"severity": "medium",
|
|
"title": "PostgreSQL must check the validity of all data inputs except those specifically identified by the organization.",
|
|
"version": "PGS9-00-001800"
|
|
},
|
|
"V-214064": {
|
|
"checkid": "C-15280r360823_chk",
|
|
"checktext": "Review PostgreSQL source code (trigger procedures, functions) and application source code, to identify cases of dynamic code execution. Any user input should be handled through prepared statements. \n\nIf dynamic code execution is employed in circumstances where the objective could practically be satisfied by static execution with strongly typed parameters, this is a finding.",
|
|
"description": "With respect to database management systems, one class of threat is known as SQL Injection, or more generally, code injection. It takes advantage of the dynamic execution capabilities of various programming languages, including dialects of SQL. In such cases, the attacker deduces the manner in which SQL statements are being processed, either from inside knowledge or by observing system behavior in response to invalid inputs. When the attacker identifies scenarios where SQL queries are being assembled by application code (which may be within the database or separate from it) and executed dynamically, the attacker is then able to craft input strings that subvert the intent of the query. Potentially, the attacker can gain unauthorized access to data, including security settings, and severely corrupt or destroy the database.\n\nThe principal protection against code injection is not to use dynamic execution except where it provides necessary functionality that cannot be utilized otherwise. Use strongly typed data items rather than general-purpose strings as input parameters to task-specific, pre-compiled stored procedures and functions (and triggers).\n\nThis calls for inspection of application source code, which will require collaboration with the application developers. It is recognized that in many cases, the database administrator (DBA) is organizationally separate from the application developers, and may have limited, if any, access to source code. Nevertheless, protections of this type are so important to the secure operation of databases that they must not be ignored. At a minimum, the DBA must attempt to obtain assurances from the development organization that this issue has been addressed, and must document what has been discovered.",
|
|
"fixid": "F-15278r360824_fix",
|
|
"fixtext": "Where dynamic code execution is employed in circumstances where the objective could practically be satisfied by static execution with strongly typed parameters, modify the code to do so.",
|
|
"iacontrols": null,
|
|
"id": "V-214064",
|
|
"ruleID": "SV-214064r508027_rule",
|
|
"severity": "medium",
|
|
"title": "PostgreSQL and associated applications must reserve the use of dynamic code execution for situations that require it.",
|
|
"version": "PGS9-00-001900"
|
|
},
|
|
"V-214065": {
|
|
"checkid": "C-15281r360826_chk",
|
|
"checktext": "Review PostgreSQL source code (trigger procedures, functions) and application source code to identify cases of dynamic code execution.\n\nIf dynamic code execution is employed without protective measures against code injection, this is a finding.",
|
|
"description": "With respect to database management systems, one class of threat is known as SQL Injection, or more generally, code injection. It takes advantage of the dynamic execution capabilities of various programming languages, including dialects of SQL. In such cases, the attacker deduces the manner in which SQL statements are being processed, either from inside knowledge or by observing system behavior in response to invalid inputs. When the attacker identifies scenarios where SQL queries are being assembled by application code (which may be within the database or separate from it) and executed dynamically, the attacker is then able to craft input strings that subvert the intent of the query. Potentially, the attacker can gain unauthorized access to data, including security settings, and severely corrupt or destroy the database.\n\nThe principal protection against code injection is not to use dynamic execution except where it provides necessary functionality that cannot be utilized otherwise. Use strongly typed data items rather than general-purpose strings as input parameters to task-specific, pre-compiled stored procedures and functions (and triggers).\n\nWhen dynamic execution is necessary, ways to mitigate the risk include the following, which should be implemented both in the on-screen application and at the database level, in the stored procedures:\n-- Allow strings as input only when necessary. \n-- Rely on data typing to validate numbers, dates, etc. Do not accept invalid values. If substituting other values for them, think carefully about whether this could be subverted.\n-- Limit the size of input strings to what is truly necessary.\n-- If single quotes/apostrophes, double quotes, semicolons, equals signs, angle brackets, or square brackets will never be valid as input, reject them.\n-- If comment markers will never be valid as input, reject them. In SQL, these are -- or /* */ \n-- If HTML and XML tags, entities, comments, etc., will never be valid, reject them.\n-- If wildcards are present, reject them unless truly necessary. In SQL these are the underscore and the percentage sign, and the word ESCAPE is also a clue that wildcards are in use.\n-- If SQL key words, such as SELECT, INSERT, UPDATE, DELETE, CREATE, ALTER, DROP, ESCAPE, UNION, GRANT, REVOKE, DENY, MODIFY will never be valid, reject them. Use case-insensitive comparisons when searching for these. Bear in mind that some of these words, particularly Grant (as a person's name), could also be valid input. \n-- If there are range limits on the values that may be entered, enforce those limits.\n-- Institute procedures for inspection of programs for correct use of dynamic coding, by a party other than the developer.\n-- Conduct rigorous testing of program modules that use dynamic coding, searching for ways to subvert the intended use.\n-- Record the inspection and testing in the system documentation.\n-- Bear in mind that all this applies not only to screen input, but also to the values in an incoming message to a web service or to a stored procedure called by a software component that has not itself been hardened in these ways. Not only can the caller be subject to such vulnerabilities; it may itself be the attacker.",
|
|
"fixid": "F-15279r360827_fix",
|
|
"fixtext": "Where dynamic code execution is used, modify the code to implement protections against code injection (IE: prepared statements).",
|
|
"iacontrols": null,
|
|
"id": "V-214065",
|
|
"ruleID": "SV-214065r508027_rule",
|
|
"severity": "medium",
|
|
"title": "PostgreSQL and associated applications, when making use of dynamic code execution, must scan input data for invalid values that may indicate a code injection attack.",
|
|
"version": "PGS9-00-002000"
|
|
},
|
|
"V-214066": {
|
|
"checkid": "C-15282r360829_chk",
|
|
"checktext": "Investigate whether there have been any incidents where PostgreSQL ran out of audit log space since the last time the space was allocated or other corrective measures were taken.\n\nIf there have been incidents where PostgreSQL ran out of audit log space, this is a finding.",
|
|
"description": "In order to ensure sufficient storage capacity for the audit logs, PostgreSQL must be able to allocate audit record storage capacity. Although another requirement (SRG-APP-000515-DB-000318) mandates that audit data be off-loaded to a centralized log management system, it remains necessary to provide space on the database server to serve as a buffer against outages and capacity limits of the off-loading mechanism.\n\nThe task of allocating audit record storage capacity is usually performed during initial installation of PostgreSQL and is closely associated with the DBA and system administrator roles. The DBA or system administrator will usually coordinate the allocation of physical drive space with the application owner/installer and the application will prompt the installer to provide the capacity information, the physical location of the disk, or both.\n\nIn determining the capacity requirements, consider such factors as: total number of users; expected number of concurrent users during busy periods; number and type of events being monitored; types and amounts of data being captured; the frequency/speed with which audit records are off-loaded to the central log management system; and any limitations that exist on PostgreSQL's ability to reuse the space formerly occupied by off-loaded records.",
|
|
"fixid": "F-15280r360830_fix",
|
|
"fixtext": "Allocate sufficient audit file/table space to support peak demand.",
|
|
"iacontrols": null,
|
|
"id": "V-214066",
|
|
"ruleID": "SV-214066r508027_rule",
|
|
"severity": "medium",
|
|
"title": "PostgreSQL must allocate audit record storage capacity in accordance with organization-defined audit record storage requirements.",
|
|
"version": "PGS9-00-002100"
|
|
},
|
|
"V-214067": {
|
|
"checkid": "C-15283r360832_chk",
|
|
"checktext": "Review system documentation to identify the required discretionary access control (DAC).\n\nReview the security configuration of the database and PostgreSQL. If applicable, review the security configuration of the application(s) using the database.\n\nIf the discretionary access control defined in the documentation is not implemented in the security configuration, this is a finding.\n\nIf any database objects are found to be owned by users not authorized to own database objects, this is a finding.\n\nTo check the ownership of objects in the database, as the database administrator, run the following:\n\n$ sudo su - postgres\n$ psql -c \"\\dn *.*\"\n$ psql -c \"\\dt *.*\"\n$ psql -c \"\\ds *.*\"\n$ psql -c \"\\dv *.*\"\n$ psql -c \"\\df+ *.*\"\n\nIf any role is given privileges to objects it should not have, this is a finding.",
|
|
"description": "Discretionary Access Control (DAC) is based on the notion that individual users are \"owners\" of objects and therefore have discretion over who should be authorized to access the object and in which mode (e.g., read or write). Ownership is usually acquired as a consequence of creating the object or via specified ownership assignment. DAC allows the owner to determine who will have access to objects they control. An example of DAC includes user-controlled table permissions.\n\nWhen discretionary access control policies are implemented, subjects are not constrained with regard to what actions they can take with information for which they have already been granted access. Thus, subjects that have been granted access to information are not prevented from passing (i.e., the subjects have the discretion to pass) the information to other subjects or objects. \n\nA subject that is constrained in its operation by Mandatory Access Control policies is still able to operate under the less rigorous constraints of this requirement. Thus, while Mandatory Access Control imposes constraints preventing a subject from passing information to another subject operating at a different sensitivity level, this requirement permits the subject to pass the information to any subject at the same sensitivity level. \n\nThe policy is bounded by the information system boundary. Once the information is passed outside of the control of the information system, additional means may be required to ensure the constraints remain in effect. While the older, more traditional definitions of discretionary access control require identity-based access control, that limitation is not required for this use of discretionary access control.",
|
|
"fixid": "F-15281r360833_fix",
|
|
"fixtext": "Implement the organization's DAC policy in the security configuration of the database and PostgreSQL, and, if applicable, the security configuration of the application(s) using the database.\n\nTo GRANT privileges to roles, as the database administrator (shown here as \"postgres\"), run statements like the following examples:\n\n$ sudo su - postgres\n$ psql -c \"CREATE SCHEMA test\"\n$ psql -c \"GRANT CREATE ON SCHEMA test TO bob\"\n$ psql -c \"CREATE TABLE test.test_table(id INT)\"\n$ psql -c \"GRANT SELECT ON TABLE test.test_table TO bob\"\n\nTo REVOKE privileges to roles, as the database administrator (shown here as \"postgres\"), run statements like the following examples:\n\n$ psql -c \"REVOKE SELECT ON TABLE test.test_table FROM bob\"\n$ psql -c \"REVOKE CREATE ON SCHEMA test FROM bob\"",
|
|
"iacontrols": null,
|
|
"id": "V-214067",
|
|
"ruleID": "SV-214067r508027_rule",
|
|
"severity": "medium",
|
|
"title": "PostgreSQL must enforce discretionary access control policies, as defined by the data owner, over defined subjects and objects.",
|
|
"version": "PGS9-00-002200"
|
|
},
|
|
"V-214068": {
|
|
"checkid": "C-15284r360835_chk",
|
|
"checktext": "Note: The following instructions use the PGDATA environment variable. See supplementary content APPENDIX-F for instructions on configuring PGDATA. \n\nReview locations of audit logs, both internal to the database and database audit logs located at the operating system level. \n\nVerify there are appropriate controls and permissions to protect the audit information from unauthorized modification. \n\n#### stderr Logging \n\nIf the PostgreSQL server is configured to use stderr for logging, the logs will be owned by the database administrator (shown here as \"postgres\") with a default permissions level of 0600. The permissions can be configured in postgresql.conf. \n\nTo check the permissions for log files in postgresql.conf, as the database administrator (shown here as \"postgres\"), run the following command: \n\n$ sudo su - postgres \n\n$ grep \"log_file_mode\" ${PGDATA?}/postgresql.conf \n\nIf the permissions are not 0600, this is a finding. \n\nNext, navigate to where the logs are stored. This can be found by running the following command against postgresql.conf as the database administrator (shown here as \"postgres\"): \n\n$ sudo su - postgres \n\n$ grep \"log_directory\" ${PGDATA?}/postgresql.conf \n\nWith the log directory identified, as the database administrator (shown here as \"postgres\"), list the permissions of the logs: \n\n$ sudo su - postgres \n\n$ ls -la ${PGDATA?}/pg_log \n\nIf logs are not owned by the database administrator (shown here as \"postgres\") and are not the same permissions as configured in postgresql.conf, this is a finding. \n\n#### syslog Logging \n\nIf the PostgreSQL server is configured to use syslog for logging, consult organization syslog setting for permissions and ownership of logs",
|
|
"description": "If audit data were to become compromised, then competent forensic analysis and discovery of the true source of potentially malicious system activity is impossible to achieve.\n\nTo ensure the veracity of audit data, the information system and/or the application must protect audit information from unauthorized deletion. This requirement can be achieved through multiple methods which will depend upon system architecture and design.\n\nSome commonly employed methods include: ensuring log files enjoy the proper file system permissions utilizing file system protections; restricting access; and backing up log data to ensure log data is retained.\n\nApplications providing a user interface to audit data will leverage user permissions and roles identifying the user accessing the data and the corresponding rights the user enjoys in order make access decisions regarding the deletion of audit data.\n\nAudit information includes all information (e.g., audit records, audit settings, and audit reports) needed to successfully audit information system activity.\n\nDeletion of database audit data could mask the theft of, or the unauthorized modification of, sensitive data stored in the database.",
|
|
"fixid": "F-15282r360836_fix",
|
|
"fixtext": "To ensure that logging is enabled, review supplementary content APPENDIX-C for instructions on enabling logging.\n\nNote: The following instructions use the PGDATA environment variable. See supplementary content APPENDIX-F for instructions on configuring PGDATA.\n\n#### stderr Logging\n\nWith stderr logging enabled, as the database owner (shown here as \"postgres\"), set the following parameter in postgresql.conf:\n\n$ vi ${PGDATA?}/postgresql.conf\nlog_file_mode = 0600\n\nTo change the owner and permissions of the log files, run the following:\n\n$ chown postgres:postgres ${PGDATA?}/<log directory name>\n$ chmod 0700 ${PGDATA?}/<log directory name>\n$ chmod 600 ${PGDATA?}/<log directory name>/*.log\n\n#### syslog Logging\n\nIf PostgreSQL is configured to use syslog for logging, the log files must be configured to be owned by root with 0600 permissions.\n\n$ chown root:root <log directory name>/<log_filename>\n$ chmod 0700 <log directory name>\n$ chmod 0600 <log directory name>/*.log",
|
|
"iacontrols": null,
|
|
"id": "V-214068",
|
|
"ruleID": "SV-214068r508027_rule",
|
|
"severity": "medium",
|
|
"title": "The audit information produced by PostgreSQL must be protected from unauthorized deletion.",
|
|
"version": "PGS9-00-002300"
|
|
},
|
|
"V-214069": {
|
|
"checkid": "C-15285r360838_chk",
|
|
"checktext": "Note: The following instructions use the PGDATA environment variable. See supplementary content APPENDIX-F for instructions on configuring PGDATA.\n\nWhen a PostgreSQL cluster is initialized using initdb, the PostgreSQL cluster will be configured to use the same time zone as the target server. \n\nAs the database administrator (shown here as \"postgres\"), check the current log_timezone setting by running the following SQL:\n\n$ sudo su - postgres\n$ psql -c \"SHOW log_timezone\"\n\nlog_timezone\n--------------\nUTC\n(1 row)\n\nIf log_timezone is not set to the desired time zone, this is a finding.",
|
|
"description": "If time stamps are not consistently applied and there is no common time reference, it is difficult to perform forensic analysis.\n\nTime stamps generated by PostgreSQL must include date and time. Time is commonly expressed in Coordinated Universal Time (UTC), a modern continuation of Greenwich Mean Time (GMT), or local time with an offset from UTC.",
|
|
"fixid": "F-15283r360839_fix",
|
|
"fixtext": "Note: The following instructions use the PGDATA and PGVER environment variables. See supplementary content APPENDIX-F for instructions on configuring PGDATA and APPENDIX-H for PGVER.\n\nTo change log_timezone in postgresql.conf to use a different time zone for logs, as the database administrator (shown here as \"postgres\"), run the following:\u00a0\n\n$ sudo su - postgres\u00a0\n$ vi ${PGDATA?}/postgresql.conf\u00a0\nlog_timezone='UTC'\u00a0\n\nNext, restart the database:\u00a0\n\n# SYSTEMD SERVER ONLY\u00a0\n$ sudo systemctl reload postgresql-${PGVER?}\n\n# INITD SERVER ONLY\u00a0\n$ sudo service postgresql-${PGVER?} reload",
|
|
"iacontrols": null,
|
|
"id": "V-214069",
|
|
"ruleID": "SV-214069r508027_rule",
|
|
"severity": "medium",
|
|
"title": "PostgreSQL must record time stamps, in audit records and application data, that can be mapped to Coordinated Universal Time (UTC, formerly GMT).",
|
|
"version": "PGS9-00-002400"
|
|
},
|
|
"V-214070": {
|
|
"checkid": "C-15286r360841_chk",
|
|
"checktext": "Note: The following instructions use the PGDATA environment variable. See supplementary content APPENDIX-F for instructions on configuring PGDATA.\u00a0\n\nCheck PostgreSQL settings and custom database code to determine if detailed error messages are ever displayed to unauthorized individuals.\u00a0\n\nTo check the level of detail for errors exposed to clients, as the database administrator (shown here as \"postgres\"), run the following:\u00a0\n\n$ sudo su - postgres\u00a0\n$ grep \"client_min_messages\" ${PGDATA?}/postgresql.conf\u00a0\n\nIf client_min_messages is set to LOG or DEBUG, this is a finding.\u00a0\n\nIf detailed error messages are displayed to individuals not authorized to view them, this is a finding.\u00a0\n\n#### stderr Logging\u00a0\n\nLogs may contain detailed information and should only be accessible by the database owner.\u00a0\n\nAs the database administrator, verify the following settings of logs in the postgresql.conf file.\u00a0\n\nNote: Consult the organization's documentation on acceptable log privileges\u00a0\n\n$ sudo su - postgres\u00a0\n$ grep log_directory ${PGDATA?}/postgresql.conf\u00a0\n$ grep log_file_mode ${PGDATA?}/postgresql.conf\u00a0\n\nNext, verify the log files have the set configurations.\u00a0\n\nNote: Use location of logs from log_directory.\u00a0\n\n$ ls -l <audit_log_path>\u00a0\ntotal 32\u00a0\n-rw-------. 1 postgres postgres 0 Apr 8 00:00 postgresql-Fri.log\u00a0\n-rw-------. 1 postgres postgres 8288 Apr 11 17:36 postgresql-Mon.log\u00a0\n-rw-------. 1 postgres postgres 0 Apr 9 00:00 postgresql-Sat.log\u00a0\n-rw-------. 1 postgres postgres 0 Apr 10 00:00 postgresql-Sun.log\u00a0\n-rw-------. 1 postgres postgres 16212 Apr 7 17:05 postgresql-Thu.log\u00a0\n-rw-------. 1 postgres postgres 1130 Apr 6 17:56 postgresql-Wed.log\u00a0\n\nIf logs are not owned by the database administrator or have permissions that are not 0600, this is a finding.\u00a0\n\n#### syslog Logging\u00a0\n\nIf PostgreSQL is configured to use syslog for logging, consult organization location and permissions for syslog log files. If the logs are not owned by root or have permissions that are not 0600, this is a finding.",
|
|
"description": "If PostgreSQL provides too much information in error logs and administrative messages to the screen, this could lead to compromise. The structure and content of error messages need to be carefully considered by the organization and development team. The extent to which the information system is able to identify and handle error conditions is guided by organizational policy and operational requirements. \n\nSome default PostgreSQL error messages can contain information that could aid an attacker in, among others things, identifying the database type, host address, or state of the database. Custom errors may contain sensitive customer information. \n\nIt is important that detailed error messages be visible only to those who are authorized to view them; that general users receive only generalized acknowledgment that errors have occurred; and that these generalized messages appear only when relevant to the user's task. For example, a message along the lines of, \"An error has occurred. Unable to save your changes. If this problem persists, please contact your help desk\" would be relevant. A message such as \"Warning: your transaction generated a large number of page splits\" would likely not be relevant. \n\nAdministrative users authorized to review detailed error messages typically are the ISSO, ISSM, SA, and DBA. Other individuals or roles may be specified according to organization-specific needs, with DBA approval.",
|
|
"fixid": "F-15284r548748_fix",
|
|
"fixtext": "Note: The following instructions use the PGDATA environment variable. See supplementary content APPENDIX-F for instructions on configuring PGDATA.\n\nTo set the level of detail for errors messages exposed to clients, as the database administrator (shown here as \"postgres\"), run the following commands:\n\n$ sudo su - postgres\n$ vi ${PGDATA?}/postgresql.conf\nclient_min_messages = error",
|
|
"iacontrols": null,
|
|
"id": "V-214070",
|
|
"ruleID": "SV-214070r548749_rule",
|
|
"severity": "medium",
|
|
"title": "PostgreSQL must reveal detailed error messages only to the ISSO, ISSM, SA and DBA.",
|
|
"version": "PGS9-00-002500"
|
|
},
|
|
"V-214071": {
|
|
"checkid": "C-15287r360844_chk",
|
|
"checktext": "Note: The following instructions use the PGDATA environment variable. See supplementary content APPENDIX-F for instructions on configuring PGDATA.\n\nCheck PostgreSQL settings and documentation to determine whether designated personnel are able to select which auditable events are being audited.\n\nAs the database administrator (shown here as \"postgres\"), verify the permissions for PGDATA:\n\n$ ls -la ${PGDATA?}\n\nIf anything in PGDATA is not owned by the database administrator, this is a finding.\n\nNext, as the database administrator, run the following SQL:\n\n$ sudo su - postgres\n$ psql -c \"\\du\"\n\nReview the role permissions, if any role is listed as superuser but should not have that access, this is a finding.",
|
|
"description": "Without the capability to restrict which roles and individuals can select which events are audited, unauthorized personnel may be able to prevent or interfere with the auditing of critical events.\n\nSuppression of auditing could permit an adversary to evade detection.\n\nMisconfigured audits can degrade the system's performance by overwhelming the audit log. Misconfigured audits may also make it more difficult to establish, correlate, and investigate the events relating to an incident or identify those responsible for one.",
|
|
"fixid": "F-15285r360845_fix",
|
|
"fixtext": "Configure PostgreSQL's settings to allow designated personnel to select which auditable events are audited.\n\nUsing pgaudit allows administrators the flexibility to choose what they log. For an overview of the capabilities of pgaudit, see https://github.com/pgaudit/pgaudit. \n\nSee supplementary content APPENDIX-B for documentation on installing pgaudit.\n\nSee supplementary content APPENDIX-C for instructions on enabling logging. Only administrators/superuser can change PostgreSQL configurations. Access to the database administrator must be limited to designated personnel only.\n\nTo ensure that postgresql.conf is owned by the database owner:\n\n$ chown postgres:postgres ${PGDATA?}/postgresql.conf\n$ chmod 600 ${PGDATA?}/postgresql.conf",
|
|
"iacontrols": null,
|
|
"id": "V-214071",
|
|
"ruleID": "SV-214071r508027_rule",
|
|
"severity": "medium",
|
|
"title": "PostgreSQL must allow only the ISSM (or individuals or roles appointed by the ISSM) to select which auditable events are to be audited.",
|
|
"version": "PGS9-00-002600"
|
|
},
|
|
"V-214072": {
|
|
"checkid": "C-15288r505257_chk",
|
|
"checktext": "Review DBMS, OS, or third-party logging software settings to determine whether a real-time alert will be sent to the appropriate personnel when auditing fails for any reason.\n\nIf real-time alerts are not sent upon auditing failure, this is a finding",
|
|
"description": "It is critical for the appropriate personnel to be aware if a system is at risk of failing to process audit logs as required. Without a real-time alert, security personnel may be unaware of an impending failure of the audit capability, and system operation may be adversely affected. \n\nThe appropriate support staff include, at a minimum, the ISSO and the DBA/SA.\n\nA failure of database auditing will result in either the database continuing to function without auditing or in a complete halt to database operations. When audit processing fails, appropriate personnel must be alerted immediately to avoid further downtime or unaudited transactions\n\nAlerts provide organizations with urgent messages. Real-time alerts provide these messages immediately (i.e., the time from event detection to alert occurs in seconds or less).\n\nThe necessary monitoring and alerts may be implemented using features of PostgreSQL, the OS, third-party software, custom code, or a combination of these. The term \"the system\" is used to encompass all of these.",
|
|
"fixid": "F-15286r505258_fix",
|
|
"fixtext": "Configure the system to provide an immediate real-time alert to appropriate support staff when an audit log failure occurs.\n\nIt is possible to create scripts or implement third-party tools to enable real-time alerting for audit failures in PostgreSQL.",
|
|
"iacontrols": null,
|
|
"id": "V-214072",
|
|
"ruleID": "SV-214072r508027_rule",
|
|
"severity": "medium",
|
|
"title": "PostgreSQL must provide an immediate real-time alert to appropriate support staff of all audit log failures.",
|
|
"version": "PGS9-00-002700"
|
|
},
|
|
"V-214073": {
|
|
"checkid": "C-15289r548753_chk",
|
|
"checktext": "If the data owner does not have a strict requirement for ensuring data integrity and confidentiality is maintained at every step of the data transfer and handling process, this is not a finding.\nFirst, check if ssl is enabled for the database instance. As the database administrator (shown here as \"postgres\"), verify SSL is enabled by running the following from a command prompt:\n\n$ sudo su - postgres\n$ psql -c \"SHOW ssl\"\n\nIf SSL is not enabled, this is a finding.\nNext, open the pg_hba.conf file in a viewer or editor and review the authentication settings that are configured in that file. \n\nNext, verify hostssl entries in pg_hba.conf: \n\n$ sudo su - postgres \n$ grep hostssl ${PGDATA?}/pg_hba.conf \n\nIf hostssl entries do not contain clientcert=1, this is a finding. \nIf any uncommented lines are not of TYPE \"hostssl\" and do not include the \"clientcert=1\" authentication option and are not documented in the system security plan or equivalent document as being approved, this is a finding.\nIf PostgreSQL, associated applications, and infrastructure do not employ protective measures against unauthorized disclosure and modification during reception, this is a finding.",
|
|
"description": "Information can be either unintentionally or maliciously disclosed or modified during reception, including, for example, during aggregation, at protocol transformation points, and during packing/unpacking. These unauthorized disclosures or modifications compromise the confidentiality or integrity of the information.\n\nThis requirement applies only to those applications that are either distributed or can allow access to data nonlocally. Use of this requirement will be limited to situations where the data owner has a strict requirement for ensuring data integrity and confidentiality is maintained at every step of the data transfer and handling process. \n\nWhen receiving data, PostgreSQL, associated applications, and infrastructure must leverage protection mechanisms.\n\nFor more information on configuring PostgreSQL to use SSL, consult the following documentation:\nhttps://www.postgresql.org/docs/current/ssl-tcp.html\n\nPostgres provides native support for using SSL connections to encrypt client/server communications. To enable the use of SSL, the postgres \u201cssl\u201d configuration parameter must be set to \u201con\u201d and the database instance needs to be configured to use a valid server certificate and private key installed on the server. With SSL enabled, connections made to the database server will default to being encrypted. However, it is possible for clients to override the default and attempt to establish an unencrypted connection. To prevent connections made from non-local hosts from being unencrypted, the postgres host-based authentication settings should be configured to only allow hostssl (i.e., encrypted) connections. The hostssl connections can be further configured to require that the client present a valid (trusted) SSL certificate for a connection.",
|
|
"fixid": "F-15287r360851_fix",
|
|
"fixtext": "Implement protective measures against unauthorized disclosure and modification during reception.\n\nTo configure PostgreSQL to use SSL, see supplementary content APPENDIX-G for instructions on enabling SSL.",
|
|
"iacontrols": null,
|
|
"id": "V-214073",
|
|
"ruleID": "SV-214073r548754_rule",
|
|
"severity": "medium",
|
|
"title": "PostgreSQL must maintain the confidentiality and integrity of information during reception.",
|
|
"version": "PGS9-00-003000"
|
|
},
|
|
"V-214074": {
|
|
"checkid": "C-15290r360853_chk",
|
|
"checktext": "Review system documentation to identify accounts authorized to own database objects. Review accounts that own objects in the database(s).\n\nIf any database objects are found to be owned by users not authorized to own database objects, this is a finding.\n\nTo check the ownership of objects in the database, as the database administrator, run the following SQL:\n\n$ sudo su - postgres\n$ psql -x -c \"\\dn *.*\"\n$ psql -x -c \"\\dt *.*\"\n$ psql -x -c \"\\ds *.*\"\n$ psql -x -c \"\\dv *.*\"\n$ psql -x -c \"\\df+ *.*\"\n\nIf any object is not owned by an authorized role for ownership, this is a finding.",
|
|
"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 utilizes the object to perform the actions if they were the owner. If not properly managed, this can lead to privileged actions being taken by unauthorized individuals.\n\nConversely, if critical tables or other objects rely on unauthorized owner accounts, these objects may be lost when an account is removed.",
|
|
"fixid": "F-15288r360854_fix",
|
|
"fixtext": "Assign ownership of authorized objects to authorized object owner accounts.\u00a0\n\n#### Schema Owner\u00a0\n\nTo create a schema owned by the user bob, run the following SQL:\u00a0\n\n$ sudo su - postgres\u00a0\n$ psql -c \"CREATE SCHEMA test AUTHORIZATION bob\" \n\nTo alter the ownership of an existing object to be owned by the user bob, run the following SQL:\u00a0\n\n$ sudo su - postgres\u00a0\n$ psql -c \"ALTER SCHEMA test OWNER TO bob\"",
|
|
"iacontrols": null,
|
|
"id": "V-214074",
|
|
"ruleID": "SV-214074r508027_rule",
|
|
"severity": "medium",
|
|
"title": "Database objects (including but not limited to tables, indexes, storage, trigger procedures, functions, links to software external to PostgreSQL, etc.) must be owned by database/DBMS principals authorized for ownership.",
|
|
"version": "PGS9-00-003100"
|
|
},
|
|
"V-214075": {
|
|
"checkid": "C-15291r360856_chk",
|
|
"checktext": "Review procedures for controlling, granting access to, and tracking use of the PostgreSQL software installation account(s).\n\nIf access or use of this account is not restricted to the minimum number of personnel required or if unauthorized access to the account has been granted, this is a finding.",
|
|
"description": "When dealing with change control issues, it should be noted any changes to the hardware, software, and/or firmware components of the information system and/or application can have significant effects on the overall security of the system. \n\nIf the system were to allow any user to make changes to software libraries, those changes might be implemented without undergoing the appropriate testing and approvals that are part of a robust change management process.\n\nAccordingly, only qualified and authorized individuals must be allowed access to information system components for purposes of initiating changes, including upgrades and modifications.\n\nDBA and other privileged administrative or application owner accounts are granted privileges that allow actions that can have a great impact on database security and operation. It is especially important to grant privileged access to only those persons who are qualified and authorized to use them.",
|
|
"fixid": "F-15289r360857_fix",
|
|
"fixtext": "Develop, document, and implement procedures to restrict and track use of the PostgreSQL software installation account.",
|
|
"iacontrols": null,
|
|
"id": "V-214075",
|
|
"ruleID": "SV-214075r508027_rule",
|
|
"severity": "medium",
|
|
"title": "The PostgreSQL software installation account must be restricted to authorized users.",
|
|
"version": "PGS9-00-003200"
|
|
},
|
|
"V-214076": {
|
|
"checkid": "C-15292r360859_chk",
|
|
"checktext": "Review the PostgreSQL software library directory and any subdirectories.\u00a0\n\nIf any non-PostgreSQL software directories exist on the disk directory, examine or investigate their use. If any of the directories are used by other applications, including third-party applications that use the PostgreSQL, this is a finding.\u00a0\n\nOnly applications that are required for the functioning and administration, not use, of the PostgreSQL software library should be located in the same disk directory as the PostgreSQL software libraries.\u00a0\n\nIf other applications are located in the same directory as PostgreSQL, this is a finding.",
|
|
"description": "When dealing with change control issues, it should be noted, any changes to the hardware, software, and/or firmware components of the information system and/or application can potentially have significant effects on the overall security of the system.\n\nMultiple applications can provide a cumulative negative effect. A vulnerability and subsequent exploit to one application can lead to an exploit of other applications sharing the same security context. For example, an exploit to a web server process that leads to unauthorized administrative access to host system directories can most likely lead to a compromise of all applications hosted by the same system. Database software not installed using dedicated directories both threatens and is threatened by other hosted applications. Access controls defined for one application may by default provide access to the other application's database objects or directories. Any method that provides any level of separation of security context assists in the protection between applications.",
|
|
"fixid": "F-15290r360860_fix",
|
|
"fixtext": "Install all applications on directories separate from the PostgreSQL software library directory. Relocate any directories or reinstall other application software that currently shares the PostgreSQL software library directory.",
|
|
"iacontrols": null,
|
|
"id": "V-214076",
|
|
"ruleID": "SV-214076r508027_rule",
|
|
"severity": "medium",
|
|
"title": "Database software, including PostgreSQL configuration files, must be stored in dedicated directories separate from the host OS and other applications.",
|
|
"version": "PGS9-00-003300"
|
|
},
|
|
"V-214077": {
|
|
"checkid": "C-15293r360862_chk",
|
|
"checktext": "Review the system documentation to identify what additional information the organization has determined necessary.\n\nCheck PostgreSQL settings and existing audit records to verify that all organization-defined additional, more detailed information is in the audit records for audit events identified by type, location, or subject.\n\nIf any additional information is defined and is not contained in the audit records, this is a finding.",
|
|
"description": "Information system auditing capability is critical for accurate forensic analysis. Reconstruction of harmful events or forensic analysis is not possible if audit records do not contain enough information. To support analysis, some types of events will need information to be logged that exceeds the basic requirements of event type, time stamps, location, source, outcome, and user identity. If additional information is not available, it could negatively impact forensic investigations into user actions or other malicious events.\n\nThe organization must determine what additional information is required for complete analysis of the audited events. The additional information required is dependent on the type of information (e.g., sensitivity of the data and the environment within which it resides). At a minimum, the organization must employ either full-text recording of privileged commands or the individual identities of users of shared accounts, or both. The organization must maintain audit trails in sufficient detail to reconstruct events to determine the cause and impact of compromise. \n\nExamples of detailed information the organization may require in audit records are full-text recording of privileged commands or the individual identities of shared account users.",
|
|
"fixid": "F-15291r360863_fix",
|
|
"fixtext": "Configure PostgreSQL audit settings to include all organization-defined detailed information in the audit records for audit events identified by type, location, or subject.\n\nUsing pgaudit PostgreSQL can be configured to audit these requests. See supplementary content APPENDIX-B for documentation on installing pgaudit.\n\nTo ensure that logging is enabled, review supplementary content APPENDIX-C for instructions on enabling logging.",
|
|
"iacontrols": null,
|
|
"id": "V-214077",
|
|
"ruleID": "SV-214077r508027_rule",
|
|
"severity": "medium",
|
|
"title": "PostgreSQL must include additional, more detailed, organization-defined information in the audit records for audit events identified by type, location, or subject.",
|
|
"version": "PGS9-00-003500"
|
|
},
|
|
"V-214078": {
|
|
"checkid": "C-15294r360865_chk",
|
|
"checktext": "Functions in PostgreSQL can be created with the SECURITY DEFINER option. When SECURITY DEFINER functions are executed by a user, said function is run with the privileges of the user who created it.\u00a0\n\nTo list all functions that have SECURITY DEFINER, as, the database administrator (shown here as \"postgres\"), run the following SQL:\u00a0\n\n$ sudo su - postgres\u00a0\n$ psql -c \"SELECT nspname, proname, proargtypes, prosecdef, rolname, proconfig FROM pg_proc p JOIN pg_namespace n ON p.pronamespace = n.oid JOIN pg_authid a ON a.oid = p.proowner WHERE prosecdef OR NOT proconfig IS NULL\"\u00a0\n\nIn the query results, a prosecdef value of \"t\" on a row indicates that that function uses privilege elevation.\u00a0\n\nIf elevation of PostgreSQL privileges is utilized but not documented, this is a finding.\u00a0\n\nIf elevation of PostgreSQL privileges is documented, but not implemented as described in the documentation, this is a finding.\u00a0\n\nIf the privilege-elevation logic can be invoked in ways other than intended, or in contexts other than intended, or by subjects/principals other than intended, this is a finding.",
|
|
"description": "In certain situations, to provide required functionality, PostgreSQL needs to execute internal logic (stored procedures, functions, triggers, etc.) and/or external code modules with elevated privileges. However, if the privileges required for execution are at a higher level than the privileges assigned to organizational users invoking the functionality applications/programs, those users are indirectly provided with greater privileges than assigned by organizations.\n\nPrivilege elevation must be utilized only where necessary and protected from misuse.\n\nThis calls for inspection of application source code, which will require collaboration with the application developers. It is recognized that in many cases, the database administrator (DBA) is organizationally separate from the application developers, and may have limited, if any, access to source code. Nevertheless, protections of this type are so important to the secure operation of databases that they must not be ignored. At a minimum, the DBA must attempt to obtain assurances from the development organization that this issue has been addressed, and must document what has been discovered.",
|
|
"fixid": "F-15292r360866_fix",
|
|
"fixtext": "Determine where, when, how, and by what principals/subjects elevated privilege is needed.\u00a0\u00a0\n\nTo change a SECURITY DEFINER function to SECURITY INVOKER, as the database administrator (shown here as \"postgres\"), run the following SQL:\u00a0\n\n$ sudo su - postgres\u00a0\n$ psql -c \"ALTER FUNCTION <function_name> SECURITY INVOKER\"",
|
|
"iacontrols": null,
|
|
"id": "V-214078",
|
|
"ruleID": "SV-214078r508027_rule",
|
|
"severity": "medium",
|
|
"title": "Execution of software modules (to include functions and trigger procedures) with elevated privileges must be restricted to necessary cases only.",
|
|
"version": "PGS9-00-003600"
|
|
},
|
|
"V-214079": {
|
|
"checkid": "C-15295r360868_chk",
|
|
"checktext": "As the database administrator (shown here as \"postgres\"), make a small SQL syntax error in psql by running the following:\u00a0\n\n$ sudo su - postgres\u00a0\n$ psql -c \"CREAT TABLEincorrect_syntax(id INT)\"\u00a0\nERROR: syntax error at or near \"CREAT\"\u00a0\n\nNote: The following instructions use the PGVER environment variable. See supplementary content APPENDIX-H for instructions on configuring PGVER.\n\nNow, as the database administrator (shown here as \"postgres\"), verify the syntax error was logged (change the log file name and part to suit the circumstances):\u00a0\n\n$ sudo su - postgres\u00a0\n$ cat ~/${PGVER?}/data/pg_log/postgresql-Wed.log\u00a0\n2016-03-30 16:18:10.772 EDT postgres postgres 5706bb87.90dERROR: syntax error at or near \"CREAT\" at character 1\u00a0\n2016-03-30 16:18:10.772 EDT postgres postgres 5706bb87.90dSTATEMENT: CREAT TABLE incorrect_syntax(id INT);\u00a0\n\nReview system documentation to determine how input errors from application to PostgreSQL are to be handled in general and if any special handling is defined for specific circumstances.\u00a0\n\nIf it does not implement the documented behavior, this is a finding.",
|
|
"description": "A common vulnerability is unplanned behavior when invalid inputs are received. This requirement guards against adverse or unintended system behavior caused by invalid inputs, where information system responses to the invalid input may be disruptive or cause the system to fail into an unsafe state.\n\nThe behavior will be derived from the organizational and system requirements and includes, but is not limited to, notification of the appropriate personnel, creating an audit record, and rejecting invalid input.",
|
|
"fixid": "F-15293r360869_fix",
|
|
"fixtext": "Enable logging.\n\nTo ensure that logging is enabled, review supplementary content APPENDIX-C for instructions on enabling logging.\n\nAll errors and denials are logged if logging is enabled.",
|
|
"iacontrols": null,
|
|
"id": "V-214079",
|
|
"ruleID": "SV-214079r508027_rule",
|
|
"severity": "medium",
|
|
"title": "When invalid inputs are received, PostgreSQL must behave in a predictable and documented manner that reflects organizational and system objectives.",
|
|
"version": "PGS9-00-003700"
|
|
},
|
|
"V-214080": {
|
|
"checkid": "C-15296r360871_chk",
|
|
"checktext": "On UNIX systems, PostgreSQL can be configured to use stderr, csvlog and syslog. To send logs to a centralized location, syslog should be used.\n\nAs the database owner (shown here as \"postgres\"), ensure PostgreSQL uses syslog by running the following SQL:\n\n$ sudo su - postgres\n$ psql -c \"SHOW log_destination\"\n\nAs the database owner (shown here as \"postgres\"), check which log facility PostgreSQL is configured by running the following SQL:\n\n$ sudo su - postgres\n$ psql -c \"SHOW syslog_facility\"\n\nCheck with the organization to see how syslog facilities are defined in their organization.\n\nIf PostgreSQL audit records are not written directly to or systematically transferred to a centralized log management system, this is a finding.",
|
|
"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\nPostgreSQL may write audit records to database tables, to files in the file system, to other kinds of local repository, or directly to a centralized log management system. Whatever the method used, it must be compatible with off-loading the records to the centralized system.",
|
|
"fixid": "F-15294r360872_fix",
|
|
"fixtext": "Note: The following instructions use the PGDATA and PGVER environment variables. See supplementary content APPENDIX-F for instructions on configuring PGDATA and APPENDIX-H for PGVER. \n\nTo ensure that logging is enabled, review supplementary content APPENDIX-C for instructions on enabling logging.\u00a0\n\nWith logging enabled, as the database owner (shown here as \"postgres\"), configure the follow parameters in postgresql.conf:\u00a0\n\nNote: Consult the organization on how syslog facilities are defined in the syslog daemon configuration.\u00a0\n\n$ sudo su - postgres\u00a0\n$ vi ${PGDATA?}/postgresql.conf\u00a0\nlog_destination = 'syslog'\u00a0\nsyslog_facility = 'LOCAL0'\u00a0\nsyslog_ident = 'postgres'\u00a0\n\nNow, as the system administrator, reload the server with the new configuration:\u00a0\n\n# SYSTEMD SERVER ONLY\u00a0\n$ sudo systemctl reload postgresql-${PGVER?}\n\n# INITD SERVER ONLY\u00a0\n$ sudo service postgresql-${PGVER?} reload",
|
|
"iacontrols": null,
|
|
"id": "V-214080",
|
|
"ruleID": "SV-214080r508027_rule",
|
|
"severity": "medium",
|
|
"title": "PostgreSQL must utilize centralized management of the content captured in audit records generated by all components of PostgreSQL.",
|
|
"version": "PGS9-00-003800"
|
|
},
|
|
"V-214081": {
|
|
"checkid": "C-15297r360874_chk",
|
|
"checktext": "Check PostgreSQL settings to determine whether objects or code implementing security functionality are located in a separate security domain, such as a separate database or schema created specifically for security functionality.\n\nBy default, all objects in pg_catalog and information_schema are owned by the database administrator. \n\nTo check the access controls for those schemas, as the database administrator (shown here as \"postgres\"), run the following commands to review the access privileges granted on the data dictionary and security tables, views, sequences, functions and trigger procedures:\n\n$ sudo su - postgres\n$ psql -x -c \"\\dp pg_catalog.*\"\n$ psql -x -c \"\\dp information_schema.*\"\n\nRepeat the \\dp statements for any additional schemas that contain locally defined security objects.\n\nRepeat using \\df+*.* to review ownership of PostgreSQL functions:\n\n$ sudo su - postgres\n$ psql -x -c \"\\df+ pg_catalog.*\"\n$ psql -x -c \"\\df+ information_schema.*\"\n\nRefer to the PostgreSQL online documentation for GRANT for help in interpreting the Access Privileges column in the output from \\du. Note that an entry starting with an equals sign indicates privileges granted to Public (all users). By default, most of the tables and views in the pg_catalog and information_schema schemas can be read by Public.\n\nIf any user besides the database administrator(s) is listed in access privileges and not documented, this is a finding.\n\nIf security-related database objects or code are not kept separate, this is a finding.",
|
|
"description": "An isolation boundary provides access control and protects the integrity of the hardware, software, and firmware that perform security functions.\n\nSecurity functions are the hardware, software, and/or firmware of the information system responsible for enforcing the system security policy and supporting the isolation of code and data on which the protection is based.\n\nDevelopers and implementers can increase the assurance in security functions by employing well-defined security policy models; structured, disciplined, and rigorous hardware and software development techniques; and sound system/security engineering principles.\n\nDatabase Management Systems typically separate security functionality from non-security 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 non-security functionality are commingled, users who have access to non-security functionality may be able to access security functionality.",
|
|
"fixid": "F-15295r360875_fix",
|
|
"fixtext": "Do not locate security-related database objects with application tables or schema.\n\nReview any site-specific applications security modules built into the database: determine what schema they are located in and take appropriate action.\n\nDo not grant access to pg_catalog or information_schema to anyone but the database administrator(s). Access to the database administrator account(s) must not be granted to anyone without official approval.",
|
|
"iacontrols": null,
|
|
"id": "V-214081",
|
|
"ruleID": "SV-214081r508027_rule",
|
|
"severity": "medium",
|
|
"title": "PostgreSQL must isolate security functions from non-security functions.",
|
|
"version": "PGS9-00-004000"
|
|
},
|
|
"V-214082": {
|
|
"checkid": "C-15298r360877_chk",
|
|
"checktext": "Note: The following instructions use the PGDATA environment variable. See supplementary content APPENDIX-F for instructions on configuring PGDATA.\n\nTo verify that system denies are logged when unprivileged users attempt to change database configuration, as the database administrator (shown here as \"postgres\"), run the following commands:\n\n$ sudo su - postgres\n$ psql\n\nNext, create a role with no privileges, change the current role to that user and attempt to change a configuration by running the following SQL:\n\nCREATE ROLE bob;\nSET ROLE bob;\nSET pgaudit.role='test';\n\nNow check pg_log (use the latest log):\n\n$ cat ${PGDATA?}/pg_log/postgresql-Thu.log\n< 2016-01-28 17:57:34.092 UTC bob postgres: >ERROR: permission denied to set parameter \"pgaudit.role\"\n< 2016-01-28 17:57:34.092 UTC bob postgres: >STATEMENT: SET pgaudit.role='test';\n\nIf the denial is not logged, this is a finding.\n\nBy default PostgreSQL configuration files are owned by the postgres user and cannot be edited by non-privileged users:\n\n$ ls -la ${PGDATA?} | grep postgresql.conf\n-rw-------. 1 postgres postgres 21758 Jan 22 10:27 postgresql.conf\n\nIf postgresql.conf is not owned by the database owner and does not have read and write permissions for the owner, this is a finding.",
|
|
"description": "Without auditing the enforcement of access restrictions against changes to configuration, it would be difficult to identify attempted attacks and an audit trail would not be available for forensic investigation for after-the-fact actions.\n\nEnforcement actions are the methods or mechanisms used to prevent unauthorized changes to configuration settings. Enforcement action methods may be as simple as denying access to a file based on the application of file permissions (access restriction). Audit items may consist of lists of actions blocked by access restrictions or changes identified after the fact.",
|
|
"fixid": "F-15296r360878_fix",
|
|
"fixtext": "Enable logging.\n\nAll denials are logged by default if logging is enabled. To ensure that logging is enabled, review supplementary content APPENDIX-C for instructions on enabling logging.",
|
|
"iacontrols": null,
|
|
"id": "V-214082",
|
|
"ruleID": "SV-214082r508027_rule",
|
|
"severity": "medium",
|
|
"title": "PostgreSQL must produce audit records of its enforcement of access restrictions associated with changes to the configuration of PostgreSQL or database(s).",
|
|
"version": "PGS9-00-004100"
|
|
},
|
|
"V-214083": {
|
|
"checkid": "C-15299r360880_chk",
|
|
"checktext": "Note: The following instructions use the PGDATA environment variable. See supplementary content APPENDIX-F for instructions on configuring PGDATA.\u00a0\n\nReview locations of audit logs, both internal to the database and database audit logs located at the operating system level.\u00a0\n\nVerify there are appropriate controls and permissions to protect the audit information from unauthorized access.\u00a0\n\n#### syslog Logging\u00a0\n\nIf PostgreSQL is configured to use syslog for logging, consult organization location and permissions for syslog log files.\u00a0\n\n#### stderr Logging\u00a0\n\nAs the database administrator (shown here as \"postgres\"), check the current log_file_mode configuration by running the following:\u00a0\n\nNote: Consult the organization's documentation on acceptable log privileges.\u00a0\n\n$ sudo su - postgres\u00a0\n$ psql -c \"SHOW log_file_mode\"\u00a0\n\nIf log_file_mode is not 600, this is a finding.\u00a0\n\nNext, check the current log_destination path by running the following SQL:\u00a0\n\nNote: This is relative to PGDATA.\u00a0\n\n$ psql -c \"SHOW log_destination\"\u00a0\n\nNext, verify the log files have the set configurations in the log_destination:\u00a0\n\nNote: Use location of logs from log_directory.\u00a0\n\n$ ls -l ${PGDATA?}/pg_log/\u00a0\ntotal 32\u00a0\n-rw-------. 1 postgres postgres 0 Apr 8 00:00 postgresql-Fri.log\u00a0\n-rw-------. 1 postgres postgres 8288 Apr 11 17:36 postgresql-Mon.log\u00a0\n-rw-------. 1 postgres postgres 0 Apr 9 00:00 postgresql-Sat.log\u00a0\n-rw-------. 1 postgres postgres 0 Apr 10 00:00 postgresql-Sun.log\u00a0\n-rw-------. 1 postgres postgres 16212 Apr 7 17:05 postgresql-Thu.log\u00a0\n-rw-------. 1 postgres postgres 1130 Apr 6 17:56 postgresql-Wed.log\u00a0\n\nIf logs with 600 permissions do not exist in log_destination, this is a finding.",
|
|
"description": "If audit data were to become compromised, then competent forensic analysis and discovery of the true source of potentially malicious system activity is difficult, if not impossible, to achieve. In addition, access to audit records provides information an attacker could potentially use to his or her advantage.\n\nTo ensure the veracity of audit data, the information system and/or the application must protect audit information from any and all unauthorized access. This includes read, write, copy, etc.\n\nThis requirement can be achieved through multiple methods which will depend upon system architecture and design. Some commonly employed methods include ensuring log files enjoy the proper file system permissions utilizing file system protections and limiting log data location.\n\nAdditionally, applications with user interfaces to audit records should not allow for the unfettered manipulation of or access to those records via the application. If the application provides access to the audit data, the application becomes accountable for ensuring that audit information is protected from unauthorized access.\n\nAudit information includes all information (e.g., audit records, audit settings, and audit reports) needed to successfully audit information system activity.",
|
|
"fixid": "F-15297r360881_fix",
|
|
"fixtext": "Note: The following instructions use the PGDATA and PGVER environment variables. See supplementary content APPENDIX-F for instructions on configuring PGDATA and APPENDIX-H for PGVER. \n\nTo ensure that logging is enabled, review supplementary content APPENDIX-C for instructions on enabling logging.\u00a0\n\n#### syslog Logging\u00a0\n\nIf PostgreSQL is configured to use syslog for logging, consult organization location and permissions for syslog log files.\u00a0\n\n#### stderr Logging\u00a0\n\nIf PostgreSQL is configured to use stderr for logging, permissions of the log files can be set in postgresql.conf.\u00a0\n\nAs the database administrator (shown here as \"postgres\"), edit the following settings of logs in the postgresql.conf file:\u00a0\n\nNote: Consult the organization's documentation on acceptable log privileges.\u00a0\n\n$ sudo su - postgres\u00a0\n$ vi ${PGDATA?}/postgresql.conf\u00a0\nlog_file_mode = 0600\u00a0\n\nNext, as the system administrator, reload the server with the new configuration:\u00a0\n\n# SYSTEMD SERVER ONLY\u00a0\n$ sudo systemctl reload postgresql-${PGVER?}\u00a0\n\n# INITD SERVER ONLY\u00a0\n$ sudo service postgresql-${PGVER?} reload",
|
|
"iacontrols": null,
|
|
"id": "V-214083",
|
|
"ruleID": "SV-214083r508027_rule",
|
|
"severity": "medium",
|
|
"title": "The audit information produced by PostgreSQL must be protected from unauthorized read access.",
|
|
"version": "PGS9-00-004200"
|
|
},
|
|
"V-214084": {
|
|
"checkid": "C-15300r360883_chk",
|
|
"checktext": "To check software installed by packages, as the system administrator, run the following command:\n\n# RHEL/CENT Systems\n$ sudo rpm -qa | grep postgres\n\nIf multiple versions of postgres are installed but are unused, this is a finding.",
|
|
"description": "Previous versions of PostgreSQL components that are not removed from the information system after updates have been installed may be exploited by adversaries.\n\nSome PostgreSQL installation tools may remove older versions of software automatically from the information system. In other cases, manual review and removal will be required. In planning installations and upgrades, organizations must include steps (automated, manual, or both) to identify and remove the outdated modules.\n\nA transition period may be necessary when both the old and the new software are required. This should be taken into account in the planning.",
|
|
"fixid": "F-15298r360884_fix",
|
|
"fixtext": "Use package managers (RPM or apt-get) for installing PostgreSQL. Unused software is removed when updated.",
|
|
"iacontrols": null,
|
|
"id": "V-214084",
|
|
"ruleID": "SV-214084r508027_rule",
|
|
"severity": "medium",
|
|
"title": "When updates are applied to PostgreSQL software, any software components that have been replaced or made unnecessary must be removed.",
|
|
"version": "PGS9-00-004300"
|
|
},
|
|
"V-214085": {
|
|
"checkid": "C-15301r360886_chk",
|
|
"checktext": "As the database administrator (shown here as \"postgres\"), run the following SQL:\n\n$ sudo su - postgres\n$ psql -c \"SHOW pgaudit.log\"\n\nIf pgaudit.log does not contain, \"ddl, write, role\", this is a finding.",
|
|
"description": "Changes in categorized information must be tracked. Without an audit trail, unauthorized access to protected data could go undetected.\n\nFor detailed information on categorizing information, refer to FIPS Publication 199, Standards for Security Categorization of Federal Information and Information Systems, and FIPS Publication 200, Minimum Security Requirements for Federal Information and Information Systems.",
|
|
"fixid": "F-15299r360887_fix",
|
|
"fixtext": "Note: The following instructions use the PGDATA and PGVER environment variables. See supplementary content APPENDIX-F for instructions on configuring PGDATA and APPENDIX-H for PGVER. \n\nUsing pgaudit the DBMS (PostgreSQL) can be configured to audit these requests. See supplementary content APPENDIX-B for documentation on installing pgaudit. \n\nWith pgaudit installed the following configurations can be made: \n\n$ sudo su - postgres \n\n$ vi ${PGDATA?}/postgresql.conf \n\nAdd the following parameters (or edit existing parameters): \n\npgaudit.log = 'ddl, write, role' \n\nNow, as the system administrator, reload the server with the new configuration: \n\n# SYSTEMD SERVER ONLY \n$ sudo systemctl reload postgresql- ${PGVER?} \n\n# INITD SERVER ONLY \n$ sudo service postgresql- ${PGVER?} reload",
|
|
"iacontrols": null,
|
|
"id": "V-214085",
|
|
"ruleID": "SV-214085r508027_rule",
|
|
"severity": "medium",
|
|
"title": "PostgreSQL must generate audit records when categorized information (e.g., classification levels/security levels) is accessed.",
|
|
"version": "PGS9-00-004400"
|
|
},
|
|
"V-214086": {
|
|
"checkid": "C-15302r360889_chk",
|
|
"checktext": "Note: The following instructions use the PGDATA environment variable. See supplementary content APPENDIX-F for instructions on configuring PGDATA.\n\nFirst, as the database administrator (shown here as \"postgres\"), setup a test schema and revoke users privileges from using it by running the following SQL:\n\n$ sudo su - postgres\n$ psql -c \"CREATE SCHEMA stig_test_schema AUTHORIZATION postgres\"\n$ psql -c \"REVOKE ALL ON SCHEMA stig_test_schema FROM public\"\n$ psql -c \"GRANT ALL ON SCHEMA stig_test_schema TO postgres\"\n\nNext, create a test table, insert a value into that table for the following checks by running the following SQL:\n\n$ psql -c \"CREATE TABLE stig_test_schema.stig_test_table(id INT)\"\n$ psql -c \"INSERT INTO stig_test_schema.stig_test_table(id) VALUES (0)\"\n\n#### CREATE\nAttempt to CREATE a table in the stig_test_schema schema with a role that does not have privileges by running the following SQL:\n\npsql -c \"CREATE ROLE bob; SET ROLE bob; CREATE TABLE stig_test_schema.test_table(id INT);\"\nERROR: permission denied for schema stig_test_schema\n\nNext, as a database administrator (shown here as \"postgres\"), verify that the denial was logged:\n\n$ sudo su - postgres\n$ cat ${PGDATA?}/pg_log/<latest_log>\n< 2016-03-09 09:55:19.423 EST postgres 56e0393f.186b postgres: >ERROR: permission denied for schema stig_test_schema at character 14\n< 2016-03-09 09:55:19.423 EST postgres 56e0393f.186b postgres: >STATEMENT: CREATE TABLE stig_test_schema.test_table(id INT);\n\nIf the denial is not logged, this is a finding.\n\n#### INSERT\nAs role bob, attempt to INSERT into the table created earlier, stig_test_table by running the following SQL:\n\n$ sudo su - postgres\n$ psql -c \"SET ROLE bob; INSERT INTO stig_test_schema.stig_test_table(id) VALUES (0);\"\n\nNext, as a database administrator (shown here as \"postgres\"), verify that the denial was logged:\n\n$ sudo su - postgres\n$ cat ${PGDATA?}/pg_log/<latest_log>\n< 2016-03-09 09:58:30.709 EST postgres 56e0393f.186b postgres: >ERROR: permission denied for schema stig_test_schema at character 13\n< 2016-03-09 09:58:30.709 EST postgres 56e0393f.186b postgres: >STATEMENT: INSERT INTO stig_test_schema.stig_test_table(id) VALUES (0);\n\nIf the denial is not logged, this is a finding.\n\n#### SELECT\nAs role bob, attempt to SELECT from the table created earlier, stig_test_table by running the following SQL:\n\n$ sudo su - postgres\n$ psql -c \"SET ROLE bob; SELECT * FROM stig_test_schema.stig_test_table;\"\n\nNext, as a database administrator (shown here as \"postgres\"), verify that the denial was logged:\n\n$ sudo su - postgres\n$ cat ${PGDATA?}/pg_log/<latest_log>\n< 2016-03-09 09:57:58.327 EST postgres 56e0393f.186b postgres: >ERROR: permission denied for schema stig_test_schema at character 15\n< 2016-03-09 09:57:58.327 EST postgres 56e0393f.186b postgres: >STATEMENT: SELECT * FROM stig_test_schema.stig_test_table;\n\nIf the denial is not logged, this is a finding.\n\n#### ALTER\nAs role bob, attempt to ALTER the table created earlier, stig_test_table by running the following SQL:\n\n$ sudo su - postgres\n$ psql -c \"SET ROLE bob; ALTER TABLE stig_test_schema.stig_test_table ADD COLUMN name TEXT;\"\n\nNext, as a database administrator (shown here as \"postgres\"), verify that the denial was logged:\n\n$ sudo su - postgres\n$ cat ${PGDATA?}/pg_log/<latest_log>\n< 2016-03-09 10:03:43.765 EST postgres 56e0393f.186b postgres: >STATEMENT: ALTER TABLE stig_test_schema.stig_test_table ADD COLUMN name TEXT;\n\nIf the denial is not logged, this is a finding.\n\n#### UPDATE\nAs role bob, attempt to UPDATE a row created earlier, stig_test_table by running the following SQL:\n\n$ sudo su - postgres\n$ psql -c \"SET ROLE bob; UPDATE stig_test_schema.stig_test_table SET id=1 WHERE id=0;\"\n\nNext, as a database administrator (shown here as \"postgres\"), verify that the denial was logged:\n\n$ sudo su - postgres\n$ cat ${PGDATA?}/pg_log/<latest_log>\n< 2016-03-09 10:08:27.696 EST postgres 56e0393f.186b postgres: >ERROR: permission denied for schema stig_test_schema at character 8\n< 2016-03-09 10:08:27.696 EST postgres 56e0393f.186b postgres: >STATEMENT: UPDATE stig_test_schema.stig_test_table SET id=1 WHERE id=0;\n\nIf the denial is not logged, this is a finding.\n\n#### DELETE\nAs role bob, attempt to DELETE a row created earlier, stig_test_table by running the following SQL:\n\n$ sudo su - postgres\n$ psql -c \"SET ROLE bob; DELETE FROM stig_test_schema.stig_test_table WHERE id=0;\"\n\nNext, as a database administrator (shown here as \"postgres\"), verify that the denial was logged:\n\n$ sudo su - postgres\n$ cat ${PGDATA?}/pg_log/<latest_log>\n< 2016-03-09 10:09:29.607 EST postgres 56e0393f.186b postgres: >ERROR: permission denied for schema stig_test_schema at character 13\n< 2016-03-09 10:09:29.607 EST postgres 56e0393f.186b postgres: >STATEMENT: DELETE FROM stig_test_schema.stig_test_table WHERE id=0;\n\nIf the denial is not logged, this is a finding.\n\n#### PREPARE \nAs role bob, attempt to execute a prepared system using PREPARE by running the following SQL:\n\n$ sudo su - postgres\n$ psql -c \"SET ROLE bob; PREPARE stig_test_plan(int) AS SELECT id FROM stig_test_schema.stig_test_table WHERE id=$1;\"\n\nNext, as a database administrator (shown here as \"postgres\"), verify that the denial was logged:\n\n$ sudo su - postgres\n$ cat ${PGDATA?}/pg_log/<latest_log>\n< 2016-03-09 10:16:22.628 EST postgres 56e03e02.18e4 postgres: >ERROR: permission denied for schema stig_test_schema at character 46\n< 2016-03-09 10:16:22.628 EST postgres 56e03e02.18e4 postgres: >STATEMENT: PREPARE stig_test_plan(int) AS SELECT id FROM stig_test_schema.stig_test_table WHERE id=$1;\n\nIf the denial is not logged, this is a finding.\n\n#### DROP\nAs role bob, attempt to DROP the table created earlier stig_test_table by running the following SQL:\n\n$ sudo su - postgres\n$ psql -c \"SET ROLE bob; DROP TABLE stig_test_schema.stig_test_table;\"\n\nNext, as a database administrator (shown here as \"postgres\"), verify that the denial was logged:\n\n$ sudo su - postgres\n$ cat ${PGDATA?}/pg_log/<latest_log>\n< 2016-03-09 10:18:55.255 EST postgres 56e03e02.18e4 postgres: >ERROR: permission denied for schema stig_test_schema\n< 2016-03-09 10:18:55.255 EST postgres 56e03e02.18e4 postgres: >STATEMENT: DROP TABLE stig_test_schema.stig_test_table;\n\nIf the denial is not logged, this is a finding.",
|
|
"description": "Changes to the security configuration must be tracked.\n\nThis requirement applies to situations where security data is retrieved or modified via data manipulation operations, as opposed to via specialized security functionality.\n\nIn an SQL environment, types of access include, but are not necessarily limited to:\n\nSELECT\nINSERT\nUPDATE\nDELETE\nEXECUTE\n\nTo aid in diagnosis, it is necessary to keep track of failed attempts in addition to the successful ones.",
|
|
"fixid": "F-15300r360890_fix",
|
|
"fixtext": "Configure PostgreSQL to produce audit records when unsuccessful attempts to access security objects occur.\n\nAll denials are logged if logging is enabled. To ensure that logging is enabled, review supplementary content APPENDIX-C for instructions on enabling logging.",
|
|
"iacontrols": null,
|
|
"id": "V-214086",
|
|
"ruleID": "SV-214086r508027_rule",
|
|
"severity": "medium",
|
|
"title": "PostgreSQL must generate audit records when unsuccessful attempts to access security objects occur.",
|
|
"version": "PGS9-00-004500"
|
|
},
|
|
"V-214087": {
|
|
"checkid": "C-15303r360892_chk",
|
|
"checktext": "Note: The following instructions use the PGDATA environment variable. See supplementary content APPENDIX-F for instructions on configuring PGDATA.\n\nIn this example the user joe will log into the Postgres database unsuccessfully:\n\n$ psql -d postgres -U joe\n\nAs the database administrator (shown here as \"postgres\"), check pg_log for a FATAL connection audit trail:\n\n$ sudo su - postgres\n$ cat ${PGDATA?}/pg_log/postgresql-Tue.log\n< 2016-02-16 16:18:13.027 EST joe 56c65135.b5f postgres: >LOG: connection authorized: user=joe database=postgres\n< 2016-02-16 16:18:13.027 EST joe 56c65135.b5f postgres: >FATAL: role \"joe\" does not exist\n\nIf an audit record is not generated each time a user (or other principal) attempts, but fails to log on or connect to PostgreSQL (including attempts where the user ID is invalid/unknown), this is a finding.",
|
|
"description": "For completeness of forensic analysis, it is necessary to track failed attempts to log on to PostgreSQL. While positive identification may not be possible in a case of failed authentication, as much information as possible about the incident must be captured.",
|
|
"fixid": "F-15301r360893_fix",
|
|
"fixtext": "Note: The following instructions use the PGDATA and PGVER environment variables. See supplementary content APPENDIX-F for instructions on configuring PGDATA and APPENDIX-H for PGVER.\n\nTo ensure that logging is enabled, review supplementary content APPENDIX-C for instructions on enabling logging.\u00a0\n\nIf logging is enabled the following configurations must be made to log unsuccessful connections, date/time, username, and session identifier.\u00a0\n\nFirst, as the database administrator (shown here as \"postgres\"), edit postgresql.conf:\u00a0\n\n$ sudo su - postgres\u00a0\n$ vi ${PGDATA?}/postgresql.conf\u00a0\n\nEdit the following parameters:\u00a0\n\nlog_connections = on\u00a0\nlog_line_prefix = '< %m %u %c: >'\u00a0\u00a0\n\nWhere:\u00a0\n* %m is the time and date\u00a0\n* %u is the username\u00a0\n* %c is the session ID for the connection\u00a0\n\nNow, as the system administrator, reload the server with the new configuration:\u00a0\n\n# SYSTEMD SERVER ONLY\u00a0\n$ sudo systemctl reload postgresql-${PGVER?}\n\n# INITD SERVER ONLY\u00a0\n$ sudo service postgresql-${PGVER?} reload",
|
|
"iacontrols": null,
|
|
"id": "V-214087",
|
|
"ruleID": "SV-214087r508027_rule",
|
|
"severity": "medium",
|
|
"title": "PostgreSQL must generate audit records when unsuccessful logons or connection attempts occur.",
|
|
"version": "PGS9-00-004600"
|
|
},
|
|
"V-214088": {
|
|
"checkid": "C-15304r360895_chk",
|
|
"checktext": "Note: The following instructions use the PGDATA environment variable. See supplementary content APPENDIX-F for instructions on configuring PGDATA.\n\nFirst, log into the database with the postgres user by running the following commands:\n\n$ sudo su - postgres\n$ psql -U postgres\n\nNext, as the database administrator, verify the log for a connection audit trail:\n\n$ sudo su - postgres\n$ cat ${PGDATA?}/pg_log/postgresql-Tue.log\n< 2016-02-23 20:25:39.931 EST postgres 56cfa993.7a72 postgres: >LOG: connection authorized: user=postgres database=postgres\n< 2016-02-23 20:27:45.428 EST postgres 56cfa993.7a72 postgres: >LOG: AUDIT: SESSION,1,1,READ,SELECT,,,SELECT current_user;,<none>\n< 2016-02-23 20:27:47.988 EST postgres 56cfa993.7a72 postgres: >LOG: disconnection: session time: 0:00:08.057 user=postgres database=postgres host=[local]\n\nIf connections are not logged, this is a finding.",
|
|
"description": "For completeness of forensic analysis, it is necessary to know how long a user's (or other principal's) connection to PostgreSQL lasts. This can be achieved by recording disconnections, in addition to logons/connections, in the audit logs.\n\nDisconnection may be initiated by the user or forced by the system (as in a timeout) or result from a system or network failure. To the greatest extent possible, all disconnections must be logged.",
|
|
"fixid": "F-15302r360896_fix",
|
|
"fixtext": "Note: The following instructions use the PGDATA and PGVER environment variables. See supplementary content APPENDIX-F for instructions on configuring PGDATA and APPENDIX-H for PGVER.\n\nTo ensure that logging is enabled, review supplementary content APPENDIX-C for instructions on enabling logging.\u00a0\n\nIf logging is enabled the following configurations must be made to log connections, date/time, username, and session identifier.\u00a0\n\nFirst, as the database administrator (shown here as \"postgres\"), edit postgresql.conf by running the following:\u00a0\n\n$ sudo su - postgres\u00a0\n$ vi ${PGDATA?}/postgresql.conf\u00a0\n\nEdit the following parameters:\u00a0\n\nlog_connections = on\u00a0\nlog_disconnections = on\u00a0\nlog_line_prefix = '< %m %u %c: >'\u00a0\u00a0\n\nWhere:\u00a0\n* %m is the time and date\u00a0\n* %u is the username\u00a0\n* %c is the session ID for the connection\u00a0\n\nNow, as the system administrator, reload the server with the new configuration:\u00a0\n\n# SYSTEMD SERVER ONLY\u00a0\n$ sudo systemctl reload postgresql-${PGVER?} \n\n# INITD SERVER ONLY\u00a0\n$ sudo service postgresql-${PGVER?} reload",
|
|
"iacontrols": null,
|
|
"id": "V-214088",
|
|
"ruleID": "SV-214088r508027_rule",
|
|
"severity": "medium",
|
|
"title": "PostgreSQL must generate audit records showing starting and ending time for user access to the database(s).",
|
|
"version": "PGS9-00-004700"
|
|
},
|
|
"V-214089": {
|
|
"checkid": "C-15305r360898_chk",
|
|
"checktext": "Note: The following instructions use the PGDATA environment variable. See supplementary content APPENDIX-F for instructions on configuring PGDATA.\n\nAs the database administrator (shown here as \"postgres\"), create a test role by running the following SQL:\n\n$ sudo su - postgres\n$ psql -c \"CREATE ROLE bob\"\n\nNext, to test if audit records are generated from unsuccessful attempts at modifying security objects, run the following SQL:\n\n$ sudo su - postgres\n$ psql -c \"SET ROLE bob; UPDATE pg_authid SET rolsuper = 't' WHERE rolname = 'bob';\"\n\nNext, as the database administrator (shown here as \"postgres\"), verify that the denials were logged:\n\n$ sudo su - postgres\n$ cat ${PGDATA?}/pg_log/<latest_log>\n< 2016-03-17 10:34:00.017 EDT bob 56eabf52.b62 postgres: >ERROR: permission denied for relation pg_authid\n< 2016-03-17 10:34:00.017 EDT bob 56eabf52.b62 postgres: >STATEMENT: UPDATE pg_authid SET rolsuper = 't' WHERE rolname = 'bob';\n\nIf denials are not logged, this is a finding.",
|
|
"description": "Changes in the database objects (tables, views, procedures, functions) that record and control permissions, privileges, and roles granted to users and roles must be tracked. Without an audit trail, unauthorized changes to the security subsystem could go undetected. The database could be severely compromised or rendered inoperative.\n\nTo aid in diagnosis, it is necessary to keep track of failed attempts in addition to the successful ones.",
|
|
"fixid": "F-15303r360899_fix",
|
|
"fixtext": "Configure PostgreSQL to produce audit records when unsuccessful attempts to modify security objects occur.\n\nUnsuccessful attempts to modifying security objects can be logged if logging is enabled. To ensure that logging is enabled, review supplementary content APPENDIX-C for instructions on enabling logging.",
|
|
"iacontrols": null,
|
|
"id": "V-214089",
|
|
"ruleID": "SV-214089r508027_rule",
|
|
"severity": "medium",
|
|
"title": "PostgreSQL must generate audit records when unsuccessful attempts to modify security objects occur.",
|
|
"version": "PGS9-00-004800"
|
|
},
|
|
"V-214090": {
|
|
"checkid": "C-15306r360901_chk",
|
|
"checktext": "Note: The following instructions use the PGDATA environment variable. See supplementary content APPENDIX-F for instructions on configuring PGDATA.\n\nFirst, as the database administrator (shown here as \"postgres\"), create a role by running the following SQL:\n\nChange the privileges of another user:\n\n$ sudo su - postgres\n$ psql -c \"CREATE ROLE bob\"\n\nNext, GRANT then REVOKE privileges from the role:\n\n$ psql -c \"GRANT CONNECT ON DATABASE postgres TO bob\"\n$ psql -c \"REVOKE CONNECT ON DATABASE postgres FROM bob\"\n\npostgres=# REVOKE CONNECT ON DATABASE postgres FROM bob;\nREVOKE\n\npostgres=# GRANT CONNECT ON DATABASE postgres TO bob;\nGRANT\n\nNow, as the database administrator (shown here as \"postgres\"), verify the events were logged:\n\n$ sudo su - postgres\n$ cat ${PGDATA?}/pg_log/<latest_log>\n< 2016-07-13 16:25:21.103 EDT postgres postgres LOG: > AUDIT: SESSION,1,1,ROLE,GRANT,,,GRANT CONNECT ON DATABASE postgres TO bob,<none>\n< 2016-07-13 16:25:25.520 EDT postgres postgres LOG: > AUDIT: SESSION,1,1,ROLE,REVOKE,,,REVOKE CONNECT ON DATABASE postgres FROM bob,<none>\n\nIf the above steps cannot verify that audit records are produced when privileges/permissions/role memberships are added, this is a finding.",
|
|
"description": "Changes in the permissions, privileges, and roles granted to users and roles must be tracked. Without an audit trail, unauthorized elevation or restriction of privileges could go undetected. Elevated privileges give users access to information and functionality that they should not have; restricted privileges wrongly deny access to authorized users.\n\nIn an SQL environment, adding permissions is typically done via the GRANT command, or, in the negative, the REVOKE command.",
|
|
"fixid": "F-15304r360902_fix",
|
|
"fixtext": "Note: The following instructions use the PGDATA and PGVER environment variables. See supplementary content APPENDIX-F for instructions on configuring PGDATA and APPENDIX-H for PGVER.\n\nUsing pgaudit PostgreSQL can be configured to audit these requests. See supplementary content APPENDIX-B for documentation on installing pgaudit.\u00a0\n\nWith pgaudit installed the following configurations can be made:\u00a0\n\n$ sudo su - postgres\u00a0\n$ vi ${PGDATA?}/postgresql.conf\u00a0\n\nAdd the following parameters (or edit existing parameters):\u00a0\n\npgaudit.log = 'role'\u00a0\n\nNow, as the system administrator, reload the server with the new configuration:\u00a0\n\n# SYSTEMD SERVER ONLY\u00a0\n$ sudo systemctl reload postgresql-${PGVER?} \n\n# INITD SERVER ONLY\u00a0\n$ sudo service postgresql-${PGVER?} reload",
|
|
"iacontrols": null,
|
|
"id": "V-214090",
|
|
"ruleID": "SV-214090r508027_rule",
|
|
"severity": "medium",
|
|
"title": "PostgreSQL must generate audit records when privileges/permissions are added.",
|
|
"version": "PGS9-00-004900"
|
|
},
|
|
"V-214091": {
|
|
"checkid": "C-15307r360904_chk",
|
|
"checktext": "First, as the database administrator, verify pgaudit is enabled by running the following SQL:\n\n$ sudo su - postgres\n$ psql -c \"SHOW shared_preload_libraries\"\n\nIf the output does not contain \"pgaudit\", this is a finding.\n\nNext, verify that role, read, write, and ddl auditing are enabled:\n\n$ psql -c \"SHOW pgaudit.log\"\n\nIf the output does not contain role, read, write, and ddl, this is a finding.",
|
|
"description": "Changes in categorized information must be tracked. Without an audit trail, unauthorized access to protected data could go undetected.\n\nTo aid in diagnosis, it is necessary to keep track of failed attempts in addition to the successful ones.\n\nFor detailed information on categorizing information, refer to FIPS Publication 199, Standards for Security Categorization of Federal Information and Information Systems, and FIPS Publication 200, Minimum Security Requirements for Federal Information and Information Systems.",
|
|
"fixid": "F-15305r360905_fix",
|
|
"fixtext": "Note: The following instructions use the PGDATA and PGVER environment variables. See supplementary content APPENDIX-F for instructions on configuring PGDATA and APPENDIX-H for PGVER.\n\nAll errors and denials are logged if logging is enabled. To ensure that logging is enabled, review supplementary content APPENDIX-C for instructions on enabling logging.\u00a0\n\nUsing pgaudit PostgreSQL can be configured to audit these requests. See supplementary content APPENDIX-B for documentation on installing pgaudit.\u00a0\n\nWith pgaudit installed the following configurations can be made:\u00a0\n\n$ sudo su - postgres\u00a0\n$ vi ${PGDATA?}/postgresql.conf\u00a0\n\nAdd the following parameters (or edit existing parameters):\u00a0\n\npgaudit.log='ddl, role, read, write'\u00a0\n\nNow, as the system administrator, reload the server with the new configuration:\u00a0\n\n# SYSTEMD SERVER ONLY\u00a0\n$ sudo systemctl reload postgresql-${PGVER?}\n\n# INITD SERVER ONLY\u00a0\n$ sudo service postgresql-${PGVER?} reload",
|
|
"iacontrols": null,
|
|
"id": "V-214091",
|
|
"ruleID": "SV-214091r508027_rule",
|
|
"severity": "medium",
|
|
"title": "PostgreSQL must generate audit records when unsuccessful attempts to delete categorized information (e.g., classification levels/security levels) occur.",
|
|
"version": "PGS9-00-005000"
|
|
},
|
|
"V-214092": {
|
|
"checkid": "C-15308r360907_chk",
|
|
"checktext": "Note: The following instructions use the PGDATA environment variable. See supplementary content APPENDIX-F for instructions on configuring PGDATA.\n\nFirst, as the database administrator (shown here as \"postgres\"), check if log_connections is enabled by running the following SQL:\n\n$ sudo su - postgres\n$ psql -c \"SHOW log_connections\"\n\nIf log_connections is off, this is a finding.\n\nNext, verify the logs that the previous connection to the database was logged:\n\n$ sudo su - postgres\n$ cat ${PGDATA?}/pg_log/<latest_log>\n< 2016-02-16 15:54:03.934 EST postgres postgres 56c64b8b.aeb: >LOG: connection authorized: user=postgres database=postgres\n\nIf an audit record is not generated each time a user (or other principal) logs on or connects to PostgreSQL, this is a finding.",
|
|
"description": "For completeness of forensic analysis, it is necessary to track who/what (a user or other principal) logs on to PostgreSQL.",
|
|
"fixid": "F-15306r360908_fix",
|
|
"fixtext": "Note: The following instructions use the PGDATA and PGVER environment variables. See supplementary content APPENDIX-F for instructions on configuring PGDATA and APPENDIX-H for PGVER.\n\nTo ensure that logging is enabled, review supplementary content APPENDIX-C for instructions on enabling logging.\u00a0\n\nIf logging is enabled the following configurations must be made to log connections, date/time, username, and session identifier.\u00a0\n\nFirst, as the database administrator (shown here as \"postgres\"), edit postgresql.conf:\u00a0\n\n$ sudo su - postgres\u00a0\n$ vi ${PGDATA?}/postgresql.conf\u00a0\n\nEdit the following parameters as such:\u00a0\n\nlog_connections = on\u00a0\nlog_line_prefix = '< %m %u %d %c: >'\u00a0\u00a0\n\nWhere:\u00a0\n* %m is the time and date\u00a0\n* %u is the username\u00a0\n* %d is the database\u00a0\n* %c is the session ID for the connection\u00a0\n\nNow, as the system administrator, reload the server with the new configuration:\u00a0\n\n# SYSTEMD SERVER ONLY\u00a0\n$ sudo systemctl reload postgresql-${PGVER?} \n\n# INITD SERVER ONLY\u00a0\n$ sudo service postgresql-${PGVER?} reload",
|
|
"iacontrols": null,
|
|
"id": "V-214092",
|
|
"ruleID": "SV-214092r508027_rule",
|
|
"severity": "medium",
|
|
"title": "PostgreSQL must generate audit records when successful logons or connections occur.",
|
|
"version": "PGS9-00-005100"
|
|
},
|
|
"V-214093": {
|
|
"checkid": "C-15309r360910_chk",
|
|
"checktext": "Note: The following instructions use the PGDATA environment variable. See supplementary content APPENDIX-F for instructions on configuring PGDATA.\n\nFirst, as the database administrator (shown here as \"postgres\"), create a test table stig_test, enable row level security, and create a policy by running the following SQL:\n\n$ sudo su - postgres\n$ psql -c \"CREATE TABLE stig_test(id INT)\"\n$ psql -c \"ALTER TABLE stig_test ENABLE ROW LEVEL SECURITY\"\n$ psql -c \"CREATE POLICY lock_table ON stig_test USING ('postgres' = current_user)\"\n\nNext, drop the policy and disable row level security:\n\n$ psql -c \"DROP POLICY lock_table ON stig_test\"\n$ psql -c \"ALTER TABLE stig_test DISABLE ROW LEVEL SECURITY\"\n\nNow, as the database administrator (shown here as \"postgres\"), verify the security objects deletions were logged:\n\n$ cat ${PGDATA?}/pg_log/<latest_log>\n2016-03-30 14:54:18.991 EDT postgres postgres LOG: AUDIT: SESSION,11,1,DDL,DROP POLICY,,,DROP POLICY lock_table ON stig_test;,<none>\n2016-03-30 14:54:42.373 EDT postgres postgres LOG: AUDIT: SESSION,12,1,DDL,ALTER TABLE,,,ALTER TABLE stig_test DISABLE ROW LEVEL SECURITY;,<none>\n\nIf audit records are not produced when security objects are dropped, this is a finding.",
|
|
"description": "The removal of security objects from the database/PostgreSQL would seriously degrade a system's information assurance posture. If such an event occurs, it must be logged.",
|
|
"fixid": "F-15307r360911_fix",
|
|
"fixtext": "Note: The following instructions use the PGDATA and PGVER environment variables. See supplementary content APPENDIX-F for instructions on configuring PGDATA and APPENDIX-H for PGVER.\n\nUsing pgaudit PostgreSQL can be configured to audit these requests. See supplementary content APPENDIX-B for documentation on installing pgaudit.\u00a0\n\nWith pgaudit installed the following configurations can be made:\u00a0\n\n$ sudo su - postgres\u00a0\n$ vi ${PGDATA?}/postgresql.conf\u00a0\n\nAdd the following parameters (or edit existing parameters):\u00a0\n\npgaudit.log = 'ddl'\u00a0\n\nNow, as the system administrator, reload the server with the new configuration:\u00a0\n\n# SYSTEMD SERVER ONLY\u00a0\n$ sudo systemctl reload postgresql-${PGVER?}\n\n# INITD SERVER ONLY\u00a0\n$ sudo service postgresql-${PGVER?} reload",
|
|
"iacontrols": null,
|
|
"id": "V-214093",
|
|
"ruleID": "SV-214093r508027_rule",
|
|
"severity": "medium",
|
|
"title": "PostgreSQL must generate audit records when security objects are deleted.",
|
|
"version": "PGS9-00-005200"
|
|
},
|
|
"V-214094": {
|
|
"checkid": "C-15310r360913_chk",
|
|
"checktext": "Note: The following instructions use the PGDATA environment variable. See supplementary content APPENDIX-F for instructions on configuring PGDATA.\n\nFirst, as the database administrator (shown here as \"postgres\"), create a role 'bob' by running the following SQL:\n\n$ sudo su - postgres\n$ psql -c \"CREATE ROLE bob\"\n\nNext, attempt to retrieve information from the pg_authid table:\n\n$ psql -c \"SET ROLE bob; SELECT * FROM pg_authid\"\n\nNow, as the database administrator (shown here as \"postgres\"), verify the event was logged in pg_log:\n\n$ sudo su - postgres\n$ cat ${PGDATA?}/pg_log/<latest_log>\n< 2016-07-13 16:49:58.864 EDT postgres postgres ERROR: > permission denied for relation pg_authid\n< 2016-07-13 16:49:58.864 EDT postgres postgres STATEMENT: > SELECT * FROM pg_authid;\n\nIf the above steps cannot verify that audit records are produced when PostgreSQL denies retrieval of privileges/permissions/role memberships, this is a finding.",
|
|
"description": "Under some circumstances, it may be useful to monitor who/what is reading privilege/permission/role information. Therefore, it must be possible to configure auditing to do this. PostgreSQLs typically make such information available through views or functions.\n\nThis requirement addresses explicit requests for privilege/permission/role membership information. It does not refer to the implicit retrieval of privileges/permissions/role memberships that PostgreSQL continually performs to determine if any and every action on the database is permitted.\n\nTo aid in diagnosis, it is necessary to keep track of failed attempts in addition to the successful ones.",
|
|
"fixid": "F-15308r360914_fix",
|
|
"fixtext": "Configure PostgreSQL to produce audit records when unsuccessful attempts to access privileges occur.\n\nAll denials are logged if logging is enabled. To ensure that logging is enabled, review supplementary content APPENDIX-C for instructions on enabling logging.",
|
|
"iacontrols": null,
|
|
"id": "V-214094",
|
|
"ruleID": "SV-214094r508027_rule",
|
|
"severity": "medium",
|
|
"title": "PostgreSQL must generate audit records when unsuccessful attempts to retrieve privileges/permissions occur.",
|
|
"version": "PGS9-00-005300"
|
|
},
|
|
"V-214095": {
|
|
"checkid": "C-15311r360916_chk",
|
|
"checktext": "Note: The following instructions use the PGDATA environment variable. See supplementary content APPENDIX-F for instructions on configuring PGDATA.\u00a0\n\nFirst, as the database administrator (shown here as \"postgres\"), create the roles joe and bob with LOGIN by running the following SQL:\u00a0\n\n$ sudo su - postgres\u00a0\n$ psql -c \"CREATE ROLE joe LOGIN\"\u00a0\n$ psql -c \"CREATE ROLE bob LOGIN\"\u00a0\n\nNext, set current role to bob and attempt to alter the role joe:\u00a0\n\n$ psql -c \"SET ROLE bob; ALTER ROLE joe NOLOGIN;\"\u00a0\n\nNow, as the database administrator (shown here as \"postgres\"), verify the denials are logged:\u00a0\n\n$ sudo su - postgres\u00a0\n$ cat ${PGDATA?}/pg_log/<latest_log>\u00a0\n< 2016-03-17 11:28:10.004 EDT bob 56eacd05.cda postgres: >ERROR: permission denied to alter role\u00a0\n< 2016-03-17 11:28:10.004 EDT bob 56eacd05.cda postgres: >STATEMENT: ALTER ROLE joe;\u00a0\n\nIf audit logs are not generated when unsuccessful attempts to delete privileges/permissions occur, this is a finding.",
|
|
"description": "Failed attempts to change the permissions, privileges, and roles granted to users and roles must be tracked. Without an audit trail, unauthorized attempts to elevate or restrict privileges could go undetected.\n\nIn an SQL environment, deleting permissions is typically done via the REVOKE command.\n\nTo aid in diagnosis, it is necessary to keep track of failed attempts in addition to the successful ones.",
|
|
"fixid": "F-15309r360917_fix",
|
|
"fixtext": "Configure PostgreSQL to produce audit records when unsuccessful attempts to delete privileges occur.\n\nAll denials are logged if logging is enabled. To ensure that logging is enabled, review supplementary content APPENDIX-C for instructions on enabling logging.",
|
|
"iacontrols": null,
|
|
"id": "V-214095",
|
|
"ruleID": "SV-214095r508027_rule",
|
|
"severity": "medium",
|
|
"title": "PostgreSQL must generate audit records when unsuccessful attempts to delete privileges/permissions occur.",
|
|
"version": "PGS9-00-005400"
|
|
},
|
|
"V-214096": {
|
|
"checkid": "C-15312r360919_chk",
|
|
"checktext": "Note: The following instructions use the PGDATA environment variable. See supplementary content APPENDIX-F for instructions on configuring PGDATA.\n\nFirst, as the database administrator (shown here as \"postgres\"), check if pgaudit is enabled by running the following SQL:\n\n$ sudo su - postgres\n$ psql -c \"SHOW shared_preload_libraries\"\n\nIf pgaudit is not found in the results, this is a finding.\n\nNext, as the database administrator (shown here as \"postgres\"), list all role memberships for the database:\n\n$ sudo su - postgres\n$ psql -c \"\\du\"\n\nNext, verify the query was logged:\n\n$ sudo su - postgres\n$ cat ${PGDATA?}/pg_log/<latest_log>\n< 2016-01-28 19:43:12.126 UTC postgres postgres: >LOG: AUDIT: SESSION,1,1,READ,SELECT,,,\"SELECT r.rolname, r.rolsuper, r.rolinherit,\nr.rolcreaterole, r.rolcreatedb, r.rolcanlogin,\nr.rolconnlimit, r.rolvaliduntil,\nARRAY(SELECT b.rolname\nFROM pg_catalog.pg_auth_members m\nJOIN pg_catalog.pg_roles b ON (m.roleid = b.oid)\nWHERE m.member = r.oid) as memberof\n, r.rolreplication\n, r.rolbypassrls\nFROM pg_catalog.pg_roles r\nORDER BY 1;\",<none>\n\nIf audit records are not produced, this is a finding.",
|
|
"description": "Under some circumstances, it may be useful to monitor who/what is reading privilege/permission/role information. Therefore, it must be possible to configure auditing to do this. PostgreSQLs typically make such information available through views or functions.\n\nThis requirement addresses explicit requests for privilege/permission/role membership information. It does not refer to the implicit retrieval of privileges/permissions/role memberships that PostgreSQL continually performs to determine if any and every action on the database is permitted.",
|
|
"fixid": "F-15310r360920_fix",
|
|
"fixtext": "Note: The following instructions use the PGDATA and PGVER environment variables. See supplementary content APPENDIX-F for instructions on configuring PGDATA and APPENDIX-H for PGVER.\n\nUsing pgaudit PostgreSQL can be configured to audit these requests. See supplementary content APPENDIX-B for documentation on installing pgaudit.\u00a0\n\nWith pgaudit installed the following configurations can be made:\u00a0\n\n$ sudo su - postgres\u00a0\n$ vi ${PGDATA?}/postgresql.conf\u00a0\n\nAdd the following parameters (or edit existing parameters):\u00a0\n\npgaudit.log_catalog = 'on'\u00a0\npgaudit.log = 'read'\u00a0\n\nNow, as the system administrator, reload the server with the new configuration:\u00a0\n\n# SYSTEMD SERVER ONLY\u00a0\n$ sudo systemctl reload postgresql-${PGVER?}\n\n# INITD SERVER ONLY\u00a0\n$ sudo service postgresql-${PGVER?} reload\n",
|
|
"iacontrols": null,
|
|
"id": "V-214096",
|
|
"ruleID": "SV-214096r508027_rule",
|
|
"severity": "medium",
|
|
"title": "PostgreSQL must be able to generate audit records when privileges/permissions are retrieved.",
|
|
"version": "PGS9-00-005500"
|
|
},
|
|
"V-214097": {
|
|
"checkid": "C-15313r360922_chk",
|
|
"checktext": "First, as the database administrator, verify pgaudit is enabled by running the following SQL:\n\n$ sudo su - postgres\n$ psql -c \"SHOW shared_preload_libraries\"\n\nIf the output does not contain \"pgaudit\", this is a finding.\n\nNext, verify that role, read, write, and ddl auditing are enabled:\n\n$ psql -c \"SHOW pgaudit.log\"\n\nIf the output does not contain role, read, write, and ddl, this is a finding.",
|
|
"description": "Changes in categorized information must be tracked. Without an audit trail, unauthorized access to protected data could go undetected.\n\nTo aid in diagnosis, it is necessary to keep track of failed attempts in addition to the successful ones.\n\nFor detailed information on categorizing information, refer to FIPS Publication 199, Standards for Security Categorization of Federal Information and Information Systems, and FIPS Publication 200, Minimum Security Requirements for Federal Information and Information Systems.",
|
|
"fixid": "F-15311r360923_fix",
|
|
"fixtext": "Note: The following instructions use the PGDATA and PGVER environment variables. See supplementary content APPENDIX-F for instructions on configuring PGDATA and APPENDIX-H for PGVER.\n\nConfigure PostgreSQL to produce audit records when unsuccessful attempts to modify categories of information.\u00a0\n\nTo ensure that logging is enabled, review supplementary content APPENDIX-C for instructions on enabling logging. All denials are logged when logging is enabled.\u00a0\n\nWith pgaudit installed the following configurations can be made:\u00a0\n\n$ sudo su - postgres\u00a0\n$ vi ${PGDATA?}/postgresql.conf\u00a0\n\nAdd the following parameters (or edit existing parameters):\u00a0\n\npgaudit.log='ddl, role, read, write'\u00a0\n\nNow, as the system administrator, reload the server with the new configuration:\u00a0\n\n# SYSTEMD SERVER ONLY\u00a0\n$ sudo systemctl reload postgresql-${PGVER?}\n\n# INITD SERVER ONLY\u00a0\n$ sudo service postgresql-${PGVER?} reload",
|
|
"iacontrols": null,
|
|
"id": "V-214097",
|
|
"ruleID": "SV-214097r508027_rule",
|
|
"severity": "medium",
|
|
"title": "PostgreSQL must generate audit records when unsuccessful attempts to modify categorized information (e.g., classification levels/security levels) occur.",
|
|
"version": "PGS9-00-005600"
|
|
},
|
|
"V-214098": {
|
|
"checkid": "C-15314r360925_chk",
|
|
"checktext": "Note: The following instructions use the PGDATA environment variable. See supplementary content APPENDIX-F for instructions on configuring PGDATA.\n\nFirst, as the database administrator (shown here as \"postgres\"), create a schema, test_schema, create a table, test_table, within test_schema, and insert a value:\n\n$ sudo su - postgres\n$ psql -c \"CREATE SCHEMA test_schema\"\n$ psql -c \"CREATE TABLE test_schema.test_table(id INT)\"\n$ psql -c \"INSERT INTO test_schema.test_table(id) VALUES (0)\"\n\nNext, create a role 'bob' and attempt to SELECT, INSERT, UPDATE, and DROP from the test table: \n\n$ psql -c \"CREATE ROLE BOB\"\n$ psql -c \"SET ROLE bob; SELECT * FROM test_schema.test_table\"\n\n$ psql -c \"SET ROLE bob; INSERT INTO test_schema.test_table VALUES (0)\"\n$ psql -c \"SET ROLE bob; UPDATE test_schema.test_table SET id = 1 WHERE id = 0\"\n$ psql -c \"SET ROLE bob; DROP TABLE test_schema.test_table\"\n$ psql -c \"SET ROLE bob; DROP SCHEMA test_schema\"\n\nNow, as the database administrator (shown here as \"postgres\"), review PostgreSQL/database security and audit settings to verify that audit records are created for unsuccessful attempts at the specified access to the specified objects:\n\n$ sudo su - postgres\n$ cat ${PGDATA?}/pg_log/<latest_log>\n2016-03-30 17:23:41.254 EDT postgres postgres ERROR: permission denied for schema test_schema at character 15\n2016-03-30 17:23:41.254 EDT postgres postgres STATEMENT: SELECT * FROM test_schema.test_table;\n2016-03-30 17:23:53.973 EDT postgres postgres ERROR: permission denied for schema test_schema at character 13\n2016-03-30 17:23:53.973 EDT postgres postgres STATEMENT: INSERT INTO test_schema.test_table VALUES (0);\n2016-03-30 17:24:32.647 EDT postgres postgres ERROR: permission denied for schema test_schema at character 8\n2016-03-30 17:24:32.647 EDT postgres postgres STATEMENT: UPDATE test_schema.test_table SET id = 1 WHERE id = 0;\n2016-03-30 17:24:46.197 EDT postgres postgres ERROR: permission denied for schema test_schema\n2016-03-30 17:24:46.197 EDT postgres postgres STATEMENT: DROP TABLE test_schema.test_table;\n2016-03-30 17:24:51.582 EDT postgres postgres ERROR: must be owner of schema test_schema\n2016-03-30 17:24:51.582 EDT postgres postgres STATEMENT: DROP SCHEMA test_schema;\n\nIf any of the above steps did not create audit records for SELECT, INSERT, UPDATE, and DROP, this is a finding.",
|
|
"description": "Without tracking all or selected types of access to all or selected objects (tables, views, procedures, functions, etc.), it would be difficult to establish, correlate, and investigate the events relating to an incident or identify those responsible for one. \n\nIn an SQL environment, types of access include, but are not necessarily limited to:\n\nSELECT\nINSERT\nUPDATE\nDROP\nEXECUTE\n\nTo aid in diagnosis, it is necessary to keep track of failed attempts in addition to the successful ones.",
|
|
"fixid": "F-15312r360926_fix",
|
|
"fixtext": "Configure PostgreSQL to produce audit records when unsuccessful attempts to access objects occur.\n\nAll errors and denials are logged if logging is enabled. To ensure that logging is enabled, review supplementary content APPENDIX-C for instructions on enabling logging.",
|
|
"iacontrols": null,
|
|
"id": "V-214098",
|
|
"ruleID": "SV-214098r508027_rule",
|
|
"severity": "medium",
|
|
"title": "PostgreSQL must generate audit records when unsuccessful accesses to objects occur.",
|
|
"version": "PGS9-00-005700"
|
|
},
|
|
"V-214099": {
|
|
"checkid": "C-15315r360928_chk",
|
|
"checktext": "First, as the database administrator, verify pgaudit is enabled by running the following SQL:\n\n$ sudo su - postgres\n$ psql -c \"SHOW shared_preload_libraries\"\n\nIf the output does not contain pgaudit, this is a finding.\n\nNext, verify that role, read, write, and ddl auditing are enabled:\n\n$ psql -c \"SHOW pgaudit.log\"\n\nIf the output does not contain role, read, write, and ddl, this is a finding.",
|
|
"description": "Without tracking privileged activity, it would be difficult to establish, correlate, and investigate the events relating to an incident or identify those responsible for one. \n\nSystem documentation should include a definition of the functionality considered privileged. \n\nA privileged function in this context is any operation that modifies the structure of the database, its built-in logic, or its security settings. This would include all Data Definition Language (DDL) statements and all security-related statements. In an SQL environment, it encompasses, but is not necessarily limited to: \n\nCREATE \nALTER \nDROP \nGRANT \nREVOKE \n\nThere may also be Data Manipulation Language (DML) statements that, subject to context, should be regarded as privileged. Possible examples in SQL include: \n\nTRUNCATE TABLE, DELETE, or DELETE affecting more than n rows, for some n, or DELETE without a WHERE clause.\n\nUPDATE or UPDATE affecting more than n rows, for some n, or UPDATE without a WHERE clause.\n\nAny SELECT, INSERT, UPDATE, or DELETE to an application-defined security table executed by other than a security principal. \n\nDepending on the capabilities of PostgreSQL and the design of the database and associated applications, audit logging may be achieved by means of DBMS auditing features, database triggers, other mechanisms, or a combination of these. \n\nNote: That it is particularly important to audit, and tightly control, any action that weakens the implementation of this requirement itself, since the objective is to have a complete audit trail of all administrative activity.",
|
|
"fixid": "F-15313r360929_fix",
|
|
"fixtext": "Note: The following instructions use the PGDATA and PGVER environment variables. See supplementary content APPENDIX-F for instructions on configuring PGDATA and APPENDIX-H for PGVER.\n\nUsing pgaudit PostgreSQL can be configured to audit these requests. See supplementary content APPENDIX-B for documentation on installing pgaudit.\u00a0\n\nWith pgaudit installed the following configurations can be made:\u00a0\n\n$ sudo su - postgres\u00a0\n$ vi ${PGDATA?}/postgresql.conf\u00a0\n\nAdd the following parameters (or edit existing parameters):\u00a0\nshared_preload_libraries = \u2018pgaudit\u2019\u00a0\npgaudit.log='ddl, role, read, write'\u00a0\n\nNow, as the system administrator, reload the server with the new configuration:\u00a0\n\n# SYSTEMD SERVER ONLY\u00a0\n$ sudo systemctl reload postgresql-${PGVER?}\n\n# INITD SERVER ONLY\u00a0\n$ sudo service postgresql-${PGVER?} reload",
|
|
"iacontrols": null,
|
|
"id": "V-214099",
|
|
"ruleID": "SV-214099r508027_rule",
|
|
"severity": "medium",
|
|
"title": "PostgreSQL must generate audit records for all privileged activities or other system-level access.",
|
|
"version": "PGS9-00-005800"
|
|
},
|
|
"V-214100": {
|
|
"checkid": "C-15316r360931_chk",
|
|
"checktext": "First, as the database administrator (shown here as \"postgres\"), run the following SQL:\n\n$ sudo su - postgres\n$ psql -c \"SHOW pgaudit.log\"\n\nIf pgaudit.log does not contain, \"ddl, write, role\", this is a finding.",
|
|
"description": "Changes in categorized information must be tracked. Without an audit trail, unauthorized access to protected data could go undetected.\n\nTo aid in diagnosis, it is necessary to keep track of failed attempts in addition to the successful ones.\n\nFor detailed information on categorizing information, refer to FIPS Publication 199, Standards for Security Categorization of Federal Information and Information Systems, and FIPS Publication 200, Minimum Security Requirements for Federal Information and Information Systems.",
|
|
"fixid": "F-15314r360932_fix",
|
|
"fixtext": "Note: The following instructions use the PGDATA and PGVER environment variables. See supplementary content APPENDIX-F for instructions on configuring PGDATA and APPENDIX-H for PGVER.\n\nConfigure PostgreSQL to produce audit records when unsuccessful attempts to access categories of information.\u00a0\n\nAll denials are logged if logging is enabled. To ensure that logging is enabled, review supplementary content APPENDIX-C for instructions on enabling logging.\u00a0\n\nWith pgaudit installed the following configurations can be made:\u00a0\n\n$ sudo su - postgres\u00a0\n$ vi ${PGDATA?}/postgresql.conf\u00a0\n\nAdd the following parameters (or edit existing parameters):\u00a0\n\npgaudit.log = 'ddl, write, role'\u00a0\n\nNow, as the system administrator, reload the server with the new configuration:\u00a0\n\n# SYSTEMD SERVER ONLY\u00a0\n$ sudo systemctl reload postgresql-${PGVER?}\n\n# INITD SERVER ONLY\u00a0\n$ sudo service postgresql-${PGVER?} reload",
|
|
"iacontrols": null,
|
|
"id": "V-214100",
|
|
"ruleID": "SV-214100r508027_rule",
|
|
"severity": "medium",
|
|
"title": "PostgreSQL must generate audit records when unsuccessful attempts to access categorized information (e.g., classification levels/security levels) occur.",
|
|
"version": "PGS9-00-005900"
|
|
},
|
|
"V-214101": {
|
|
"checkid": "C-15317r360934_chk",
|
|
"checktext": "First, as the database administrator, verify pgaudit is enabled by running the following SQL:\n\n$ sudo su - postgres\n$ psql -c \"SHOW shared_preload_libraries\"\n\nIf the output does not contain pgaudit, this is a finding.\n\nNext, verify that role, read, write, and ddl auditing are enabled:\n\n$ psql -c \"SHOW pgaudit.log\"\n\nIf the output does not contain role, read, write, and ddl, this is a finding.",
|
|
"description": "Changes to the security configuration must be tracked.\n\nThis requirement applies to situations where security data is retrieved or modified via data manipulation operations, as opposed to via specialized security functionality.\n\nIn an SQL environment, types of access include, but are not necessarily limited to:\n\nCREATE\nSELECT\nINSERT\nUPDATE\nDELETE\nPREPARE\nEXECUTE\nALTER\nDROP",
|
|
"fixid": "F-15315r360935_fix",
|
|
"fixtext": "Note: The following instructions use the PGDATA and PGVER environment variables. See supplementary content APPENDIX-F for instructions on configuring PGDATA and APPENDIX-H for PGVER.\n\nUsing pgaudit PostgreSQL can be configured to audit these requests. See supplementary content APPENDIX-B for documentation on installing pgaudit.\u00a0\n\nWith pgaudit installed the following configurations can be made:\u00a0\n\n$ sudo su - postgres\u00a0\n$ vi ${PGDATA?}/postgresql.conf\u00a0\n\nAdd the following parameters (or edit existing parameters):\u00a0\n\npgaudit.log='ddl, role, read, write'\u00a0\n\nNow, as the system administrator, reload the server with the new configuration:\u00a0\n\n# SYSTEMD SERVER ONLY\u00a0\n$ sudo systemctl reload postgresql-${PGVER?}\n\n# INITD SERVER ONLY\u00a0\n$ sudo service postgresql-${PGVER?} reload",
|
|
"iacontrols": null,
|
|
"id": "V-214101",
|
|
"ruleID": "SV-214101r508027_rule",
|
|
"severity": "medium",
|
|
"title": "PostgreSQL must be able to generate audit records when security objects are accessed.",
|
|
"version": "PGS9-00-006000"
|
|
},
|
|
"V-214102": {
|
|
"checkid": "C-15318r360937_chk",
|
|
"checktext": "First, as the database administrator, verify pgaudit is enabled by running the following SQL:\n\n$ sudo su - postgres\n$ psql -c \"SHOW shared_preload_libraries\"\n\nIf the output does not contain pgaudit, this is a finding.\n\nNext, verify that role, read, write, and ddl auditing are enabled:\n\n$ psql -c \"SHOW pgaudit.log\"\n\nIf the output does not contain role, read, write, and ddl, this is a finding.",
|
|
"description": "Changes in the permissions, privileges, and roles granted to users and roles must be tracked. Without an audit trail, unauthorized elevation or restriction of privileges could go undetected. Elevated privileges give users access to information and functionality that they should not have; restricted privileges wrongly deny access to authorized users.\n\nIn an SQL environment, deleting permissions is typically done via the REVOKE command.",
|
|
"fixid": "F-15316r360938_fix",
|
|
"fixtext": "Note: The following instructions use the PGDATA and PGVER environment variables. See supplementary content APPENDIX-F for instructions on configuring PGDATA and APPENDIX-H for PGVER.\n\nUsing pgaudit PostgreSQL can be configured to audit these requests. See supplementary content APPENDIX-B for documentation on installing pgaudit.\u00a0\n\nWith pgaudit installed the following configurations can be made:\u00a0\n\n$ sudo su - postgres\u00a0\n$ vi ${PGDATA?}/postgresql.conf\u00a0\n\nAdd the following parameters (or edit existing parameters):\u00a0\n\npgaudit.log = 'role'\u00a0\n\nNow, as the system administrator, reload the server with the new configuration:\u00a0\n\n# SYSTEMD SERVER ONLY\u00a0\n$ sudo systemctl reload postgresql-${PGVER?}\n\n# INITD SERVER ONLY\u00a0\n$ sudo service postgresql-${PGVER?} reload",
|
|
"iacontrols": null,
|
|
"id": "V-214102",
|
|
"ruleID": "SV-214102r508027_rule",
|
|
"severity": "medium",
|
|
"title": "PostgreSQL must generate audit records when privileges/permissions are deleted.",
|
|
"version": "PGS9-00-006100"
|
|
},
|
|
"V-214103": {
|
|
"checkid": "C-15319r360940_chk",
|
|
"checktext": "First, as the database administrator, verify that log_connections and log_disconnections are enabled by running the following SQL:\n\n$ sudo su - postgres\n$ psql -c \"SHOW log_connections\"\n$ psql -c \"SHOW log_disconnections\"\n\nIf either is off, this is a finding.\n\nNext, verify that log_line_prefix contains sufficient information by running the following SQL:\n\n$ sudo su - postgres\n$ psql -c \"SHOW log_line_prefix\"\n\nIf log_line_prefix does not contain at least %m %u %d %c, this is a finding.",
|
|
"description": "For completeness of forensic analysis, it is necessary to track who logs on to PostgreSQL.\n\nConcurrent connections by the same user from multiple workstations may be valid use of the system; or such connections may be due to improper circumvention of the requirement to use the CAC for authentication; or they may indicate unauthorized account sharing; or they may be because an account has been compromised.\n\n(If the fact of multiple, concurrent logons by a given user can be reliably reconstructed from the log entries for other events (logons/connections; voluntary and involuntary disconnections), then it is not mandatory to create additional log entries specifically for this.)",
|
|
"fixid": "F-15317r360941_fix",
|
|
"fixtext": "Note: The following instructions use the PGDATA and PGVER environment variables. See supplementary content APPENDIX-F for instructions on configuring PGDATA and APPENDIX-H for PGVER.\n\nTo ensure that logging is enabled, review supplementary content APPENDIX-C for instructions on enabling logging.\u00a0\n\nFirst, as the database administrator (shown here as \"postgres\"), edit postgresql.conf:\u00a0\n\n$ sudo su - postgres\u00a0\n$ vi ${PGDATA?}/postgresql.conf\u00a0\n\nEdit the following parameters as such:\u00a0\n\nlog_connections = on\u00a0\nlog_disconnections = on\u00a0\nlog_line_prefix = '< %m %u %d %c: >'\u00a0\n\nWhere:\u00a0\n* %m is the time and date\u00a0\n* %u is the username\u00a0\n* %d is the database\u00a0\n* %c is the session ID for the connection\u00a0\n\nNow, as the system administrator, reload the server with the new configuration:\u00a0\n\n# SYSTEMD SERVER ONLY\u00a0\n$ sudo systemctl reload postgresql-${PGVER?}\n\n# INITD SERVER ONLY\u00a0\n$ sudo service postgresql-${PGVER?} reload",
|
|
"iacontrols": null,
|
|
"id": "V-214103",
|
|
"ruleID": "SV-214103r508027_rule",
|
|
"severity": "medium",
|
|
"title": "PostgreSQL must generate audit records when concurrent logons/connections by the same user from different workstations occur.",
|
|
"version": "PGS9-00-006200"
|
|
},
|
|
"V-214104": {
|
|
"checkid": "C-15320r360943_chk",
|
|
"checktext": "First, as the database administrator, verify pgaudit is enabled by running the following SQL:\u00a0\n\n$ sudo su - postgres\u00a0\n$ psql -c \"SHOW shared_preload_libraries\"\u00a0\n\nIf the output does not contain pgaudit, this is a finding.\u00a0\n\nNext, verify that role, read, write, and ddl auditing are enabled:\u00a0\n\n$ psql -c \"SHOW pgaudit.log\"\u00a0\n\nIf the output does not contain role, read, write, and ddl, this is a finding.",
|
|
"description": "The removal of security objects from the database/PostgreSQL would seriously degrade a system's information assurance posture. If such an action is attempted, it must be logged.\n\nTo aid in diagnosis, it is necessary to keep track of failed attempts in addition to the successful ones.",
|
|
"fixid": "F-15318r360944_fix",
|
|
"fixtext": "Note: The following instructions use the PGDATA and PGVER environment variables. See supplementary content APPENDIX-F for instructions on configuring PGDATA and APPENDIX-H for PGVER.\n\nConfigure PostgreSQL to produce audit records when unsuccessful attempts to delete security objects occur.\u00a0\n\nAll errors and denials are logged if logging is enabled. To ensure that logging is enabled, review supplementary content APPENDIX-C for instructions on enabling logging.\u00a0\n\nWith pgaudit installed the following configurations can be made:\u00a0\n\n$ sudo su - postgres\u00a0\n$ vi ${PGDATA?}/postgresql.conf\u00a0\n\nAdd the following parameters (or edit existing parameters):\u00a0\n\npgaudit.log='ddl, role, read, write'\u00a0\n\nNow, as the system administrator, reload the server with the new configuration:\u00a0\n\n# SYSTEMD SERVER ONLY\u00a0\n$ sudo systemctl reload postgresql-${PGVER?}\n\n# INITD SERVER ONLY\u00a0\n$ sudo service postgresql-${PGVER?} reload",
|
|
"iacontrols": null,
|
|
"id": "V-214104",
|
|
"ruleID": "SV-214104r508027_rule",
|
|
"severity": "medium",
|
|
"title": "PostgreSQL must generate audit records when unsuccessful attempts to delete security objects occur.",
|
|
"version": "PGS9-00-006300"
|
|
},
|
|
"V-214105": {
|
|
"checkid": "C-15321r360946_chk",
|
|
"checktext": "First, as the database administrator, verify pgaudit is enabled by running the following SQL:\n\n$ sudo su - postgres\n$ psql -c \"SHOW shared_preload_libraries\"\n\nIf the output does not contain pgaudit, this is a finding.\n\nNext, verify that role is enabled:\n\n$ psql -c \"SHOW pgaudit.log\"\n\nIf the output does not contain role, this is a finding.",
|
|
"description": "Changes in the permissions, privileges, and roles granted to users and roles must be tracked. Without an audit trail, unauthorized elevation or restriction of privileges could go undetected. Elevated privileges give users access to information and functionality that they should not have; restricted privileges wrongly deny access to authorized users.\n\nIn an SQL environment, modifying permissions is typically done via the GRANT and REVOKE commands.",
|
|
"fixid": "F-15319r360947_fix",
|
|
"fixtext": "Note: The following instructions use the PGDATA and PGVER environment variables. See supplementary content APPENDIX-F for instructions on configuring PGDATA and APPENDIX-H for PGVER.\n\nUsing pgaudit PostgreSQL can be configured to audit these requests. See supplementary content APPENDIX-B for documentation on installing pgaudit.\u00a0\n\nWith pgaudit installed the following configurations can be made:\u00a0\n\n$ sudo su - postgres\u00a0\n$ vi ${PGDATA?}/postgresql.conf\u00a0\n\nAdd the following parameters (or edit existing parameters):\u00a0\n\npgaudit.log='role'\u00a0\n\nNow, as the system administrator, reload the server with the new configuration:\u00a0\n\n# SYSTEMD SERVER ONLY\u00a0\n$ sudo systemctl reload postgresql-${PGVER?}\n\n# INITD SERVER ONLY\u00a0\n$ sudo service postgresql-${PGVER?} reload",
|
|
"iacontrols": null,
|
|
"id": "V-214105",
|
|
"ruleID": "SV-214105r508027_rule",
|
|
"severity": "medium",
|
|
"title": "PostgreSQL must generate audit records when privileges/permissions are modified.",
|
|
"version": "PGS9-00-006400"
|
|
},
|
|
"V-214106": {
|
|
"checkid": "C-15322r360949_chk",
|
|
"checktext": "As the database administrator (shown here as \"postgres\"), create the role bob by running the following SQL:\n\n$ sudo su - postgres\n$ psql -c \"CREATE ROLE bob\"\n\nNext, change the current role to bob and attempt to execute privileged activity:\n\n$ psql -c \"CREATE ROLE stig_test SUPERUSER\"\n$ psql -c \"CREATE ROLE stig_test CREATEDB\"\n$ psql -c \"CREATE ROLE stig_test CREATEROLE\"\n$ psql -c \"CREATE ROLE stig_test CREATEUSER\"\n\nNow, as the database administrator (shown here as \"postgres\"), verify that an audit event was produced (use the latest log):\n\n$ sudo su - postgres\n$ cat ${PGDATA?}/pg_log/<latest_log>\n< 2016-02-23 20:16:32.396 EST postgres 56cfa74f.79eb postgres: >ERROR: must be superuser to create superusers\n< 2016-02-23 20:16:32.396 EST postgres 56cfa74f.79eb postgres: >STATEMENT: CREATE ROLE stig_test SUPERUSER;\n< 2016-02-23 20:16:48.725 EST postgres 56cfa74f.79eb postgres: >ERROR: permission denied to create role\n< 2016-02-23 20:16:48.725 EST postgres 56cfa74f.79eb postgres: >STATEMENT: CREATE ROLE stig_test CREATEDB;\n< 2016-02-23 20:16:54.365 EST postgres 56cfa74f.79eb postgres: >ERROR: permission denied to create role\n< 2016-02-23 20:16:54.365 EST postgres 56cfa74f.79eb postgres: >STATEMENT: CREATE ROLE stig_test CREATEROLE;\n< 2016-02-23 20:17:05.949 EST postgres 56cfa74f.79eb postgres: >ERROR: must be superuser to create superusers\n< 2016-02-23 20:17:05.949 EST postgres 56cfa74f.79eb postgres: >STATEMENT: CREATE ROLE stig_test CREATEUSER;\n\nIf audit records are not produced, this is a finding.",
|
|
"description": "Without tracking privileged activity, it would be difficult to establish, correlate, and investigate the events relating to an incident or identify those responsible for one.\n\nSystem documentation should include a definition of the functionality considered privileged.\n\nA privileged function in this context is any operation that modifies the structure of the database, its built-in logic, or its security settings. This would include all Data Definition Language (DDL) statements and all security-related statements. In an SQL environment, it encompasses, but is not necessarily limited to:\n\nCREATE\nALTER\nDROP\nGRANT\nREVOKE\n\nNote: That it is particularly important to audit, and tightly control, any action that weakens the implementation of this requirement itself, since the objective is to have a complete audit trail of all administrative activity.\n\nTo aid in diagnosis, it is necessary to keep track of failed attempts in addition to the successful ones.",
|
|
"fixid": "F-15320r360950_fix",
|
|
"fixtext": "Configure PostgreSQL to produce audit records when unsuccessful attempts to execute privileged SQL.\n\nAll denials are logged by default if logging is enabled. To ensure that logging is enabled, review supplementary content APPENDIX-C for instructions on enabling logging.",
|
|
"iacontrols": null,
|
|
"id": "V-214106",
|
|
"ruleID": "SV-214106r508027_rule",
|
|
"severity": "medium",
|
|
"title": "PostgreSQL must generate audit records when unsuccessful attempts to execute privileged activities or other system-level access occur.",
|
|
"version": "PGS9-00-006500"
|
|
},
|
|
"V-214107": {
|
|
"checkid": "C-15323r360952_chk",
|
|
"checktext": "First, as the database administrator, verify pgaudit is enabled by running the following SQL:\u00a0\n\n$ sudo su - postgres\u00a0\n$ psql -c \"SHOW shared_preload_libraries\"\u00a0\n\nIf the results does not contain pgaudit, this is a finding.\u00a0\n\nNext, verify that role, read, write, and ddl auditing are enabled:\u00a0\n\n$ psql -c \"SHOW pgaudit.log\"\u00a0\n\nIf the output does not contain role, read, write, and ddl, this is a finding.\u00a0\n\nNext, verify that accessing the catalog is audited by running the following SQL:\u00a0\n\n$ psql -c \"SHOW pgaudit.log_catalog\"\u00a0\n\nIf log_catalog is not on, this is a finding.",
|
|
"description": "Changes in the database objects (tables, views, procedures, functions) that record and control permissions, privileges, and roles granted to users and roles must be tracked. Without an audit trail, unauthorized changes to the security subsystem could go undetected. The database could be severely compromised or rendered inoperative.",
|
|
"fixid": "F-15321r360953_fix",
|
|
"fixtext": "Note: The following instructions use the PGDATA and PGVER environment variables. See supplementary content APPENDIX-F for instructions on configuring PGDATA and APPENDIX-H for PGVER.\n\nTo ensure that logging is enabled, review supplementary content APPENDIX-C for instructions on enabling logging.\u00a0\n\nUsing pgaudit the DBMS (PostgreSQL) can be configured to audit these requests. See supplementary content `APPENDIX-B` for documentation on installing `pgaudit`.\u00a0\n\nWith pgaudit installed the following configurations can be made:\u00a0\n\n$ sudo su - postgres\u00a0\n$ vi ${PGDATA?}/postgresql.conf\u00a0\n\nAdd the following parameters (or edit existing parameters):\u00a0\n\npgaudit.log_catalog = 'on'\u00a0\npgaudit.log='ddl, role, read, write'\u00a0\n\nNow, as the system administrator, reload the server with the new configuration:\u00a0\n\n# SYSTEMD SERVER ONLY\u00a0\n$ sudo systemctl reload postgresql-${PGVER?}\n\n# INITD SERVER ONLY\u00a0\n$ sudo service postgresql-${PGVER?} reload",
|
|
"iacontrols": null,
|
|
"id": "V-214107",
|
|
"ruleID": "SV-214107r508027_rule",
|
|
"severity": "medium",
|
|
"title": "PostgreSQL must generate audit records when security objects are modified.",
|
|
"version": "PGS9-00-006600"
|
|
},
|
|
"V-214108": {
|
|
"checkid": "C-15324r360955_chk",
|
|
"checktext": "If category tracking is not required in the database, this is not applicable.\n\nFirst, as the database administrator, verify pgaudit is enabled by running the following SQL:\n\n$ sudo su - postgres\n$ psql -c \"SHOW shared_preload_libraries\"\n\nIf the output does not contain pgaudit, this is a finding.\n\nNext, verify that role, read, write, and ddl auditing are enabled:\n\n$ psql -c \"SHOW pgaudit.log\"\n\nIf the output does not contain role, read, write, and ddl, this is a finding.",
|
|
"description": "Changes in categorized information must be tracked. Without an audit trail, unauthorized access to protected data could go undetected.\n\nFor detailed information on categorizing information, refer to FIPS Publication 199, Standards for Security Categorization of Federal Information and Information Systems, and FIPS Publication 200, Minimum Security Requirements for Federal Information and Information Systems.",
|
|
"fixid": "F-15322r360956_fix",
|
|
"fixtext": "Note: The following instructions use the PGDATA and PGVER environment variables. See supplementary content APPENDIX-F for instructions on configuring PGDATA and APPENDIX-H for PGVER.\n\nTo ensure that logging is enabled, review supplementary content APPENDIX-C for instructions on enabling logging.\u00a0\n\nUsing pgaudit PostgreSQL can be configured to audit these requests. See supplementary content APPENDIX-B for documentation on installing pgaudit.\u00a0\n\nWith pgaudit installed the following configurations can be made:\u00a0\n\n$ sudo su - postgres\u00a0\n$ vi ${PGDATA?}/postgresql.conf\u00a0\n\nAdd the following parameters (or edit existing parameters):\u00a0\n\npgaudit.log='ddl, role, read, write'\u00a0\n\nNow, as the system administrator, reload the server with the new configuration:\u00a0\n\n# SYSTEMD SERVER ONLY\u00a0\n$ sudo systemctl reload postgresql-${PGVER?}\n\n# INITD SERVER ONLY\u00a0\n$ sudo service postgresql-${PGVER?} reload",
|
|
"iacontrols": null,
|
|
"id": "V-214108",
|
|
"ruleID": "SV-214108r508027_rule",
|
|
"severity": "medium",
|
|
"title": "PostgreSQL must generate audit records when categorized information (e.g., classification levels/security levels) is modified.",
|
|
"version": "PGS9-00-006700"
|
|
},
|
|
"V-214109": {
|
|
"checkid": "C-15325r360958_chk",
|
|
"checktext": "First, as the database administrator (shown here as \"postgres\"), create a role 'bob' and a test table by running the following SQL:\u00a0\n\n$ sudo su - postgres\u00a0\n$ psql -c \"CREATE ROLE bob; CREATE TABLE test(id INT)\"\u00a0\n\nNext, set current role to bob and attempt to modify privileges:\u00a0\n\n$ psql -c \"SET ROLE bob; GRANT ALL PRIVILEGES ON test TO bob;\"\u00a0\n$ psql -c \"SET ROLE bob; REVOKE ALL PRIVILEGES ON test FROM bob;\"\u00a0\n\nNow, as the database administrator (shown here as \"postgres\"), verify the unsuccessful attempt was logged:\u00a0\n\n$ sudo su - postgres\u00a0\n$ cat ${PGDATA?}/pg_log/<latest_log>\u00a0\n2016-07-14 18:12:23.208 EDT postgres postgres ERROR: permission denied for relation test\u00a0\n2016-07-14 18:12:23.208 EDT postgres postgres STATEMENT: GRANT ALL PRIVILEGES ON test TO bob;\u00a0\n2016-07-14 18:14:52.895 EDT postgres postgres ERROR: permission denied for relation test\u00a0\n2016-07-14 18:14:52.895 EDT postgres postgres STATEMENT: REVOKE ALL PRIVILEGES ON test FROM bob;\u00a0\n\nIf audit logs are not generated when unsuccessful attempts to modify privileges/permissions occur, this is a finding.",
|
|
"description": "Failed attempts to change the permissions, privileges, and roles granted to users and roles must be tracked. Without an audit trail, unauthorized attempts to elevate or restrict privileges could go undetected.\n\nModifying permissions is done via the GRANT and REVOKE commands.\n\nTo aid in diagnosis, it is necessary to keep track of failed attempts in addition to the successful ones.",
|
|
"fixid": "F-15323r360959_fix",
|
|
"fixtext": "Configure PostgreSQL to produce audit records when unsuccessful attempts to modify privileges occur.\n\nAll denials are logged by default if logging is enabled. To ensure that logging is enabled, review supplementary content APPENDIX-C for instructions on enabling logging.",
|
|
"iacontrols": null,
|
|
"id": "V-214109",
|
|
"ruleID": "SV-214109r508027_rule",
|
|
"severity": "medium",
|
|
"title": "PostgreSQL must generate audit records when unsuccessful attempts to modify privileges/permissions occur.",
|
|
"version": "PGS9-00-006800"
|
|
},
|
|
"V-214110": {
|
|
"checkid": "C-15326r360961_chk",
|
|
"checktext": "First, as the database administrator (shown here as \"postgres\"), create a role 'bob' and a test table by running the following SQL:\u00a0\n\n$ sudo su - postgres\u00a0\n$ psql -c \"CREATE ROLE bob; CREATE TABLE test(id INT);\"\u00a0\n\nNext, set current role to bob and attempt to modify privileges:\u00a0\n\n$ psql -c \"SET ROLE bob; GRANT ALL PRIVILEGES ON test TO bob;\"\u00a0\n\nNow, as the database administrator (shown here as \"postgres\"), verify the unsuccessful attempt was logged:\u00a0\n\n$ sudo su - postgres\u00a0\n$ cat ${PGDATA?}/pg_log/<latest_log>\u00a0\n2016-07-14 18:12:23.208 EDT postgres postgres ERROR: permission denied for relation test\u00a0\n2016-07-14 18:12:23.208 EDT postgres postgres STATEMENT: GRANT ALL PRIVILEGES ON test TO bob;\u00a0\n\nIf audit logs are not generated when unsuccessful attempts to add privileges/permissions occur, this is a finding.",
|
|
"description": "Failed attempts to change the permissions, privileges, and roles granted to users and roles must be tracked. Without an audit trail, unauthorized attempts to elevate or restrict privileges could go undetected.\n\nIn an SQL environment, adding permissions is typically done via the GRANT command, or, in the negative, the REVOKE command.\n\nTo aid in diagnosis, it is necessary to keep track of failed attempts in addition to the successful ones.",
|
|
"fixid": "F-15324r360962_fix",
|
|
"fixtext": "Configure PostgreSQL to produce audit records when unsuccessful attempts to add privileges occur.\n\nAll denials are logged by default if logging is enabled. To ensure that logging is enabled, review supplementary content APPENDIX-C for instructions on enabling logging.",
|
|
"iacontrols": null,
|
|
"id": "V-214110",
|
|
"ruleID": "SV-214110r508027_rule",
|
|
"severity": "medium",
|
|
"title": "PostgreSQL must generate audit records when unsuccessful attempts to add privileges/permissions occur.",
|
|
"version": "PGS9-00-006900"
|
|
},
|
|
"V-214111": {
|
|
"checkid": "C-15327r360964_chk",
|
|
"checktext": "Note: The following instructions use the PGDATA environment variable. See supplementary content APPENDIX-F for instructions on configuring PGDATA.\u00a0\n\nTo verify that a CRL file exists, as the database administrator (shown here as \"postgres\"), run the following:\u00a0\n\n$ sudo su - postgres\u00a0\n$ psql -c \"SHOW ssl_crl_file\"\u00a0\n\nIf this is not set to a CRL file, this is a finding.\u00a0\n\nNext verify the existence of the CRL file by checking the directory set in postgresql.conf in the ssl_crl_file parameter from above:\u00a0\n\nNote: If no directory is specified, then the CRL file should be located in the same directory as postgresql.conf (PGDATA).\u00a0\n\nIf the CRL file does not exist, this is a finding.\u00a0\n\nNext, verify that hostssl entries in pg_hba.conf have \"cert\" and \"clientcert=1\" enabled:\u00a0\n\n$ sudo su - postgres\u00a0\n$ grep hostssl ${PGDATA?}/pg_hba.conf\u00a0\n\nIf hostssl entries do not contain cert or clientcert=1, this is a finding.\u00a0\n\nIf certificates are not being validated by performing RFC 5280-compliant certification path validation, this is a finding.",
|
|
"description": "The DoD standard for authentication is DoD-approved PKI certificates.\n\nA certificate\u2019s certification path is the path from the end entity certificate to a trusted root certification authority (CA). Certification path validation is necessary for a relying party to make an informed decision regarding acceptance of an end entity certificate. Certification path validation includes checks such as certificate issuer trust, time validity and revocation status for each certificate in the certification path. Revocation status information for CA and subject certificates in a certification path is commonly provided via certificate revocation lists (CRLs) or online certificate status protocol (OCSP) responses.\n\nDatabase Management Systems that do not validate certificates by performing RFC 5280-compliant certification path validation are in danger of accepting certificates that are invalid and/or counterfeit. This could allow unauthorized access to the database.",
|
|
"fixid": "F-15325r360965_fix",
|
|
"fixtext": "Note: The following instructions use the PGDATA and PGVER environment variables. See supplementary content APPENDIX-F for instructions on configuring PGDATA and APPENDIX-H for PGVER.\n\nTo configure PostgreSQL to use SSL, see supplementary content APPENDIX-G.\u00a0\n\nTo generate a Certificate Revocation List, see the official Red Hat Documentation: https://access.redhat.com/documentation/en-US/Red_Hat_Update_Infrastructure/2.1/html/Administration_Guide/chap-Red_Hat_Update_Infrastructure-Administration_Guide-Certification_Revocation_List_CRL.html\u00a0\n\nAs the database administrator (shown here as \"postgres\"), copy the CRL file into the data directory:\u00a0\n\nFirst, as the system administrator, copy the CRL file into the PostgreSQL Data Directory:\u00a0\n\n$ sudo cp root.crl ${PGDATA?}/root.crl\u00a0\n\nAs the database administrator (shown here as \"postgres\"), set the ssl_crl_file parameter to the filename of the CRL:\u00a0\n\n$ sudo su - postgres\u00a0\n$ vi ${PGDATA?}/postgresql.conf\u00a0\nssl_crl_file = 'root.crl'\u00a0\n\nNext, in pg_hba.conf, require ssl authentication:\u00a0\n\n$ sudo su - postgres\u00a0\n$ vi ${PGDATA?}/pg_hba.conf\u00a0\nhostssl <database> <user> <address> cert clientcert=1\u00a0\n\nNow, as the system administrator, reload the server with the new configuration:\u00a0\n\n# SYSTEMD SERVER ONLY\u00a0\n$ sudo systemctl reload postgresql-${PGVER?}\n\n# INITD SERVER ONLY\u00a0\n$ sudo service postgresql-${PGVER?} reload",
|
|
"iacontrols": null,
|
|
"id": "V-214111",
|
|
"ruleID": "SV-214111r508027_rule",
|
|
"severity": "medium",
|
|
"title": "PostgreSQL, when utilizing PKI-based authentication, must validate certificates by performing RFC 5280-compliant certification path validation.",
|
|
"version": "PGS9-00-007000"
|
|
},
|
|
"V-214112": {
|
|
"checkid": "C-15328r360967_chk",
|
|
"checktext": "Note: The following instructions use the PGDATA environment variable. See supplementary content APPENDIX-F for instructions on configuring PGDATA.\n\nFirst, as the database administrator (shown here as \"postgres\"), check the current log_line_prefix setting by running the following SQL:\n\n$ sudo su - postgres\n$ psql -c \"SHOW log_line_prefix\"\n\nIf log_line_prefix does not contain %m %u %d %s, this is a finding.",
|
|
"description": "Information system auditing capability is critical for accurate forensic analysis. Without establishing where events occurred, it is impossible to establish, correlate, and investigate the events relating to an incident.\n\nIn order to compile an accurate risk assessment and provide forensic analysis, it is essential for security personnel to know where events occurred, such as application components, modules, session identifiers, filenames, host names, and functionality. \n\nAssociating information about where the event occurred within the application provides a means of investigating an attack; recognizing resource utilization or capacity thresholds; or identifying an improperly configured application.",
|
|
"fixid": "F-15326r360968_fix",
|
|
"fixtext": "Note: The following instructions use the PGDATA environment variable. See supplementary content APPENDIX-F for instructions on configuring PGDATA.\n\nTo check that logging is enabled, review supplementary content APPENDIX-C for instructions on enabling logging.\n\nFirst edit the postgresql.conf file as the database administrator (shown here as \"postgres\"):\n\n$ sudo su - postgres\n$ vi ${PGDATA?}/postgresql.conf\n\nExtra parameters can be added to the setting log_line_prefix to log application related information:\n\n# %a = application name\n# %u = user name\n# %d = database name\n# %r = remote host and port\n# %p = process ID\n# %m = timestamp with milliseconds\n# %i = command tag\n# %s = session startup\n# %e = SQL state\n\nFor example:\n\nlog_line_prefix = '< %m %a %u %d %r %p %i %e %s>\u2019\n\nNow, as the system administrator, reload the server with the new configuration:\n\n# SYSTEMD SERVER ONLY\n$ sudo systemctl reload postgresql-9.5\n\n# INITD SERVER ONLY\n$ sudo service postgresql-9.5 reload",
|
|
"iacontrols": null,
|
|
"id": "V-214112",
|
|
"ruleID": "SV-214112r508027_rule",
|
|
"severity": "medium",
|
|
"title": "PostgreSQL must produce audit records containing sufficient information to establish where the events occurred.",
|
|
"version": "PGS9-00-007100"
|
|
},
|
|
"V-214113": {
|
|
"checkid": "C-15329r548750_chk",
|
|
"checktext": ": If the data owner does not have a strict requirement for ensuring data integrity and confidentiality is maintained at every step of the data transfer and handling process, this is not a finding.\nFirst, check if ssl is enabled for the database instance. As the database administrator (shown here as \"postgres\"), verify SSL is enabled by running the following from a command prompt:\n\n$ sudo su - postgres\n$ psql -c \"SHOW ssl\"\n\nIf SSL is not enabled, this is a finding.\nNext, open the pg_hba.conf file in a viewer or editor and review the authentication settings that are configured in that file. \n\nNext, verify hostssl entries in pg_hba.conf: \n\n$ sudo su - postgres \n$ grep hostssl ${PGDATA?}/pg_hba.conf \n\nIf hostssl entries do not contain clientcert=1, this is a finding. \nIf any uncommented lines are not of TYPE \"hostssl\" and do not include the \"clientcert=1\" authentication option and are not documented in the system security plan or equivalent document as being approved, this is a finding.\nIf PostgreSQL does not employ protective measures against unauthorized disclosure and modification during preparation for transmission, this is a finding.",
|
|
"description": "Information can be either unintentionally or maliciously disclosed or modified during preparation for transmission, including, for example, during aggregation, at protocol transformation points, and during packing/unpacking. These unauthorized disclosures or modifications compromise the confidentiality or integrity of the information.\n\nUse of this requirement will be limited to situations where the data owner has a strict requirement for ensuring data integrity and confidentiality is maintained at every step of the data transfer and handling process. \n\nWhen transmitting data, PostgreSQL, associated applications, and infrastructure must leverage transmission protection mechanisms.\n\nFor more information on configuring PostgreSQL to use SSL, consult the following documentation:\nhttps://www.postgresql.org/docs/current/ssl-tcp.html\n\nPostgres provides native support for using SSL connections to encrypt client/server communications. To enable the use of SSL, the postgres \u201cssl\u201d configuration parameter must be set to \u201con\u201d and the database instance needs to be configured to use a valid server certificate and private key installed on the server. With SSL enabled, connections made to the database server will default to being encrypted. However, it is possible for clients to override the default and attempt to establish an unencrypted connection. To prevent connections made from non-local hosts from being unencrypted, the postgres host-based authentication settings should be configured to only allow hostssl (i.e., encrypted) connections. The hostssl connections can be further configured to require that the client present a valid (trusted) SSL certificate for a connection.",
|
|
"fixid": "F-15327r548751_fix",
|
|
"fixtext": "Note: The following instructions use the PGDATA and PGVER environment variables. See supplementary content APPENDIX-F for instructions on configuring PGDATA and APPENDIX-H for PGVER.\n\nImplement protective measures against unauthorized disclosure and modification during preparation for transmission. \n\nTo configure PostgreSQL to use SSL, as a database administrator (shown here as \"postgres\"), edit postgresql.conf: \n\n$ sudo su - postgres \n$ vi ${PGDATA?}/postgresql.conf \n\nAdd the following parameter: \n\nssl = on \n\nTo change authentication requirements for the database, as the database administrator (shown here as \"postgres\"), edit pg_hba.conf: \n\n$ sudo su - postgres \n\n$ vi ${PGDATA?}/pg_hba.conf \n\nEdit authentication requirements to the organizational requirements. See the official documentation for the complete list of options for authentication: http://www.postgresql.org/docs/current/static/auth-pg-hba-conf.html \n\nNow, as the system administrator, reload the server with the new configuration: \n\n# SYSTEMD SERVER ONLY \n$ sudo systemctl reload postgresql-${PGVER?}\n\n# INITD SERVER ONLY \n$ sudo service postgresql-${PGVER?} reload \n\nFor more information on configuring PostgreSQL to use SSL, see supplementary content APPENDIX-G.",
|
|
"iacontrols": null,
|
|
"id": "V-214113",
|
|
"ruleID": "SV-214113r548752_rule",
|
|
"severity": "medium",
|
|
"title": "PostgreSQL must maintain the confidentiality and integrity of information during preparation for transmission.",
|
|
"version": "PGS9-00-007200"
|
|
},
|
|
"V-214114": {
|
|
"checkid": "C-15330r360973_chk",
|
|
"checktext": "Check PostgreSQL auditing to determine whether organization-defined auditable events are being audited by the system.\n\nIf organization-defined auditable events are not being audited, this is a finding.",
|
|
"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\nAudit records can be generated from various components within PostgreSQL (e.g., process, module). Certain specific application functionalities may be audited as well. The list of audited events is the set of events for which audits are to be generated. This set of events is typically a subset of the list of all events for which the system is capable of generating audit records.\n\nDoD has defined the list of events for which PostgreSQL will provide an audit record generation capability as the following: \n\n(i) Successful and unsuccessful attempts to access, modify, or delete privileges, security objects, security levels, or categories of information (e.g., classification levels);\n(ii) Access actions, such as successful and unsuccessful logon attempts, privileged activities, or other system-level access, starting and ending time for user access to the system, concurrent logons from different workstations, successful and unsuccessful accesses to objects, all program initiations, and all direct access to the information system; and\n(iii) All account creation, modification, disabling, and termination actions.\n\nOrganizations may define additional events requiring continuous or ad hoc auditing.",
|
|
"fixid": "F-15328r360974_fix",
|
|
"fixtext": "Configure PostgreSQL to generate audit records for at least the DoD minimum set of events.\n\nUsing pgaudit PostgreSQL can be configured to audit these requests. See supplementary content APPENDIX-B for documentation on installing pgaudit.\n\nTo ensure that logging is enabled, review supplementary content APPENDIX-C for instructions on enabling logging.",
|
|
"iacontrols": null,
|
|
"id": "V-214114",
|
|
"ruleID": "SV-214114r508027_rule",
|
|
"severity": "medium",
|
|
"title": "PostgreSQL must provide audit record generation capability for DoD-defined auditable events within all DBMS/database components.",
|
|
"version": "PGS9-00-007400"
|
|
},
|
|
"V-214115": {
|
|
"checkid": "C-15331r360976_chk",
|
|
"checktext": "Note: The following instructions use the PGDATA environment variable. See supplementary content APPENDIX-F for instructions on configuring PGDATA.\n\nFirst, as the database administrator (shown here as \"postgres\"), verify the current log_line_prefix setting by running the following SQL:\n\n$ sudo su - postgres\n$ psql -c \"SHOW log_line_prefix\"\n\nIf log_line_prefix does not contain %m, this is a finding.\n\nNext check the logs to verify time stamps are being logged:\n\n$ sudo su - postgres\n$ cat ${PGDATA?}/pg_log/<latest_log>\n< 2016-02-23 12:53:33.947 EDT postgres postgres 570bd68d.3912 >LOG: connection authorized: user=postgres database=postgres\n< 2016-02-23 12:53:41.576 EDT postgres postgres 570bd68d.3912 >LOG: AUDIT: SESSION,1,1,DDL,CREATE TABLE,,,CREATE TABLE test_srg(id INT);,<none>\n< 2016-02-23 12:53:44.372 EDT postgres postgres 570bd68d.3912 >LOG: disconnection: session time: 0:00:10.426 user=postgres database=postgres host=[local]\n\nIf time stamps are not being logged, this is a finding.",
|
|
"description": "Without sufficient granularity of time stamps, it is not possible to adequately determine the chronological order of records. \n\nTime stamps generated by PostgreSQL must include date and time. Granularity of time measurements refers to the precision available in time stamp values. Granularity coarser than one second is not sufficient for audit trail purposes. Time stamp values are typically presented with three or more decimal places of seconds; however, the actual granularity may be coarser than the apparent precision. For example, PostgreSQL will always return at least millisecond timestamps but it can be truncated using EXTRACT functions: SELECT EXTRACT(MINUTE FROM TIMESTAMP '2001-02-16 20:38:40');.",
|
|
"fixid": "F-15329r360977_fix",
|
|
"fixtext": "Note: The following instructions use the PGDATA and PGVER environment variables. See supplementary content APPENDIX-F for instructions on configuring PGDATA and APPENDIX-H for PGVER.\n\nPostgreSQL will not log anything if logging is not enabled. To ensure that logging is enabled, review supplementary content APPENDIX-C for instructions on enabling logging.\u00a0\n\nIf logging is enabled the following configurations must be made to log events with time stamps:\u00a0\u00a0\n\nFirst, as the database administrator (shown here as \"postgres\"), edit postgresql.conf:\u00a0\n\n$ sudo su - postgres\u00a0\n$ vi ${PGDATA?}/postgresql.conf\u00a0\n\nAdd %m to log_line_prefix to enable time stamps with milliseconds:\u00a0\n\nlog_line_prefix = '< %m >'\u00a0\n\nNow, as the system administrator, reload the server with the new configuration:\u00a0\n\n# SYSTEMD SERVER ONLY\u00a0\n$ sudo systemctl reload postgresql-${PGVER?}\n\n# INITD SERVER ONLY\u00a0\n$ sudo service postgresql-${PGVER?} reload",
|
|
"iacontrols": null,
|
|
"id": "V-214115",
|
|
"ruleID": "SV-214115r508027_rule",
|
|
"severity": "medium",
|
|
"title": "PostgreSQL must generate time stamps, for audit records and application data, with a minimum granularity of one second.",
|
|
"version": "PGS9-00-007700"
|
|
},
|
|
"V-214116": {
|
|
"checkid": "C-15332r360979_chk",
|
|
"checktext": "Check PostgreSQL settings and existing audit records to verify a user name associated with the event is being captured and stored with the audit records. If audit records exist without specific user information, this is a finding.\n\nFirst, as the database administrator (shown here as \"postgres\"), verify the current setting of log_line_prefix by running the following SQL:\n\n$ sudo su - postgres\n$ psql -c \"SHOW log_line_prefix\"\n\nIf log_line_prefix does not contain %m, %u, %d, %p, %r, %a, this is a finding.",
|
|
"description": "Information system auditing capability is critical for accurate forensic analysis. Without information that establishes the identity of the subjects (i.e., users or processes acting on behalf of users) associated with the events, security personnel cannot determine responsibility for the potentially harmful event.\n\nIdentifiers (if authenticated or otherwise known) include, but are not limited to, user database tables, primary key values, user names, or process identifiers.\n\n1) Linux's sudo and su feature enables a user (with sufficient OS privileges) to emulate another user, and it is the identity of the emulated user that is seen by PostgreSQL and logged in the audit trail. Therefore, care must be taken (outside of Postgresql) to restrict sudo/su to the minimum set of users necessary.\n\n2) PostgreSQL's SET ROLE feature enables a user (with sufficient PostgreSQL privileges) to emulate another user running statements under the permission set of the emulated user. In this case, it is the emulating user's identity, and not that of the emulated user, that gets logged in the audit trail. While this is definitely better than the other way around, ideally, both identities would be recorded.",
|
|
"fixid": "F-15330r360980_fix",
|
|
"fixtext": "Note: The following instructions use the PGDATA and PGVER environment variables. See supplementary content APPENDIX-F for instructions on configuring PGDATA and APPENDIX-H for PGVER.\n\nLogging must be enabled in order to capture the identity of any user/subject or process associated with an event. To ensure that logging is enabled, review supplementary content APPENDIX-C for instructions on enabling logging.\u00a0\n\nTo enable username, database name, process ID, remote host/port and application name in logging, as the database administrator (shown here as \"postgres\"), edit the following in postgresql.conf:\u00a0\n\n$ sudo su - postgres\u00a0\n$ vi ${PGDATA?}/postgresql.conf\u00a0\nlog_line_prefix = '< %m %u %d %p %r %a >'\u00a0\n\nNow, as the system administrator, reload the server with the new configuration:\u00a0\n\n# SYSTEMD SERVER ONLY\u00a0\n$ sudo systemctl reload postgresql-${PGVER?}\n\n# INITD SERVER ONLY\u00a0\n$ sudo service postgresql-${PGVER?} reload",
|
|
"iacontrols": null,
|
|
"id": "V-214116",
|
|
"ruleID": "SV-214116r508027_rule",
|
|
"severity": "medium",
|
|
"title": "PostgreSQL must produce audit records containing sufficient information to establish the identity of any user/subject or process associated with the event.",
|
|
"version": "PGS9-00-007800"
|
|
},
|
|
"V-214117": {
|
|
"checkid": "C-15333r360982_chk",
|
|
"checktext": "First, as the system administrator, run the following to see if FIPS is enabled:\n\n$ cat /proc/sys/crypto/fips_enabled\n\nIf fips_enabled is not 1, this is a finding.",
|
|
"description": "Use of weak or untested encryption algorithms undermines the purposes of utilizing encryption to protect data. The application must implement cryptographic modules adhering to the higher standards approved by the federal government since this provides assurance they have been tested and validated.\n\nFor detailed information, refer to NIST FIPS Publication 140-2, Security Requirements For Cryptographic Modules. Note that the product's cryptographic modules must be validated and certified by NIST as FIPS-compliant.",
|
|
"fixid": "F-15331r360983_fix",
|
|
"fixtext": "Configure OpenSSL to be FIPS compliant.\n\nPostgreSQL uses OpenSSL for cryptographic modules. To configure OpenSSL to be FIPS 140-2 compliant, see the official RHEL Documentation: https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Security_Guide/sect-Security_Guide-Federal_Standards_And_Regulations-Federal_Information_Processing_Standard.html\n\nFor more information on configuring PostgreSQL to use SSL, see supplementary content APPENDIX-G.",
|
|
"iacontrols": null,
|
|
"id": "V-214117",
|
|
"ruleID": "SV-214117r508027_rule",
|
|
"severity": "high",
|
|
"title": "PostgreSQL must implement NIST FIPS 140-2 validated cryptographic modules to generate and validate cryptographic hashes.",
|
|
"version": "PGS9-00-008000"
|
|
},
|
|
"V-214119": {
|
|
"checkid": "C-15335r360988_chk",
|
|
"checktext": "First, as the system administrator, run the following to see if FIPS is enabled:\n\n$ cat /proc/sys/crypto/fips_enabled\n\nIf fips_enabled is not 1, this is a finding.",
|
|
"description": "Use of weak or untested encryption algorithms undermines the purposes of utilizing encryption to protect data. The application must implement cryptographic modules adhering to the higher standards approved by the federal government since this provides assurance they have been tested and validated.\n\nIt is the responsibility of the data owner to assess the cryptography requirements in light of applicable federal laws, Executive Orders, directives, policies, regulations, and standards.\n\nFor detailed information, refer to NIST FIPS Publication 140-2, Security Requirements For Cryptographic Modules. Note that the product's cryptographic modules must be validated and certified by NIST as FIPS-compliant.",
|
|
"fixid": "F-15333r360989_fix",
|
|
"fixtext": "Configure OpenSSL to be FIPS compliant.\n\nPostgreSQL uses OpenSSL for cryptographic modules. To configure OpenSSL to be FIPS 140-2 compliant, see the official RHEL Documentation: https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Security_Guide/sect-Security_Guide-Federal_Standards_And_Regulations-Federal_Information_Processing_Standard.html\n\nFor more information on configuring PostgreSQL to use SSL, see supplementary content APPENDIX-G.",
|
|
"iacontrols": null,
|
|
"id": "V-214119",
|
|
"ruleID": "SV-214119r508027_rule",
|
|
"severity": "high",
|
|
"title": "PostgreSQL must implement NIST FIPS 140-2 validated cryptographic modules to protect unclassified information requiring confidentiality and cryptographic protection, in accordance with the data owners requirements.",
|
|
"version": "PGS9-00-008200"
|
|
},
|
|
"V-214120": {
|
|
"checkid": "C-15336r360991_chk",
|
|
"checktext": "If the application owner and Authorizing Official have determined that encryption of data at rest is NOT required, this is not a finding.\n\nOne possible way to encrypt data within PostgreSQL is to use the pgcrypto extension.\n\nTo check if pgcrypto is installed on PostgreSQL, as a database administrator (shown here as \"postgres\"), run the following command:\n\n$ sudo su - postgres\n$ psql -c \"SELECT * FROM pg_available_extensions where name='pgcrypto'\"\n\nIf data in the database requires encryption and pgcrypto is not available, this is a finding.\n\nIf disk or filesystem requires encryption, ask the system owner, DBA, and SA to demonstrate the use of disk-level encryption. If this is required and is not found, this is a finding.\n\nIf controls do not exist or are not enabled, this is a finding.",
|
|
"description": "This control is intended to address the confidentiality and integrity of information at rest in non-mobile devices and covers user information and system information. Information at rest refers to the state of information when it is located on a secondary storage device (e.g., disk drive, tape drive) within an organizational information system. Applications and application users generate information throughout the course of their application use. \n\nUser data generated, as well as application-specific configuration data, needs to be protected. Organizations may choose to employ different mechanisms to achieve confidentiality and integrity protections, as appropriate. \n\nIf the confidentiality and integrity of application data is not protected, the data will be open to compromise and unauthorized modification.",
|
|
"fixid": "F-15334r360992_fix",
|
|
"fixtext": "Apply appropriate controls to protect the confidentiality and integrity of data at rest in the database.\n\nThe pgcrypto module provides cryptographic functions for PostgreSQL. See supplementary content APPENDIX-E for documentation on installing pgcrypto.\n\nWith pgcrypto installed, it is possible to insert encrypted data into the database:\n\nINSERT INTO accounts(username, password) VALUES ('bob', crypt('a_secure_password', gen_salt('xdes')));",
|
|
"iacontrols": null,
|
|
"id": "V-214120",
|
|
"ruleID": "SV-214120r508027_rule",
|
|
"severity": "medium",
|
|
"title": "PostgreSQL must protect the confidentiality and integrity of all information at rest.",
|
|
"version": "PGS9-00-008300"
|
|
},
|
|
"V-214121": {
|
|
"checkid": "C-15337r360994_chk",
|
|
"checktext": "If PostgreSQL supports only software development, experimentation and/or developer-level testing (that is, excluding production systems, integration testing, stress testing, and user acceptance testing), this is not a finding.\n\nReview PostgreSQL and database security settings with respect to non-administrative users' ability to create, alter, or replace logic modules, to include but not necessarily only stored procedures, functions, triggers, and views.\n\nTo list the privileges for all tables and schemas, as the database administrator (shown here as \"postgres\"), run the following:\n\n$ sudo su - postgres\n$ psql -c \"\\dp\"\n$ psql -c \"\\dn+\"\n\nThe privileges are as follows:\n\nrolename=xxxx -- privileges granted to a role\n=xxxx -- privileges granted to PUBLIC\n\nr -- SELECT (\"read\")\nw -- UPDATE (\"write\")\na -- INSERT (\"append\")\nd -- DELETE\nD -- TRUNCATE\nx -- REFERENCES\nt -- TRIGGER\nX -- EXECUTE\nU -- USAGE\nC -- CREATE\nc -- CONNECT\nT -- TEMPORARY\narwdDxt -- ALL PRIVILEGES (for tables, varies for other objects)\n* -- grant option for preceding privilege\n\n/yyyy -- role that granted this privilege\n\nIf any such permissions exist and are not documented and approved, this is a finding.",
|
|
"description": "Allowing regular users to install software, without explicit privileges, creates the risk that untested or potentially malicious software will be installed on the system. Explicit privileges (escalated or administrative privileges) provide the regular user with explicit capabilities and control that exceed the rights of a regular user.\n\nPostgreSQL functionality and the nature and requirements of databases will vary; so while users are not permitted to install unapproved software, there may be instances where the organization allows the user to install approved software packages such as from an approved software repository. The requirements for production servers will be more restrictive than those used for development and research.\n\nPostgreSQL must enforce software installation by users based upon what types of software installations are permitted (e.g., updates and security patches to existing software) and what types of installations are prohibited (e.g., software whose pedigree with regard to being potentially malicious is unknown or suspect) by the organization). \n\nIn the case of a database management system, this requirement covers stored procedures, functions, triggers, views, etc.",
|
|
"fixid": "F-15335r360995_fix",
|
|
"fixtext": "Document and obtain approval for any non-administrative users who require the ability to create, alter or replace logic modules.\n\nImplement the approved permissions. Revoke any unapproved permissions.",
|
|
"iacontrols": null,
|
|
"id": "V-214121",
|
|
"ruleID": "SV-214121r508027_rule",
|
|
"severity": "medium",
|
|
"title": "PostgreSQL must prohibit user installation of logic modules (functions, trigger procedures, views, etc.) without explicit privileged status.",
|
|
"version": "PGS9-00-008400"
|
|
},
|
|
"V-214122": {
|
|
"checkid": "C-15338r360997_chk",
|
|
"checktext": "Check PostgreSQL settings and vendor documentation to verify that administrative functionality is separate from user functionality.\n\nAs the database administrator (shown here as \"postgres\"), list all roles and permissions for the database:\n\n$ sudo su - postgres\n$ psql -c \"\\du\"\n\nIf any non-administrative role has the attribute \"Superuser\", \"Create role\", \"Create DB\" or \"Bypass RLS\", this is a finding.\n\nIf administrator and general user functionality are not separated either physically or logically, this is a finding.",
|
|
"description": "Information system management functionality includes functions necessary to administer databases, network components, workstations, or servers and typically requires privileged user access. \n\nThe separation of user functionality from information system management functionality is either physical or logical and is accomplished by using different computers, different central processing units, different instances of the operating system, different network addresses, combinations of these methods, or other methods, as appropriate. \n\nAn example of this type of separation is observed in web administrative interfaces that use separate authentication methods for users of any other information system resources. \n\nThis may include isolating the administrative interface on a different domain and with additional access controls.\n\nIf administrative functionality or information regarding PostgreSQL management is presented on an interface available for users, information on DBMS settings may be inadvertently made available to the user.",
|
|
"fixid": "F-15336r360998_fix",
|
|
"fixtext": "Configure PostgreSQL to separate database administration and general user functionality.\n\nDo not grant superuser, create role, create db or bypass rls role attributes to users that do not require it.\n\nTo remove privileges, see the following example:\n\nALTER ROLE <username> NOSUPERUSER NOCREATEDB NOCREATEROLE NOBYPASSRLS;",
|
|
"iacontrols": null,
|
|
"id": "V-214122",
|
|
"ruleID": "SV-214122r508027_rule",
|
|
"severity": "medium",
|
|
"title": "PostgreSQL must separate user functionality (including user interface services) from database management functionality.",
|
|
"version": "PGS9-00-008500"
|
|
},
|
|
"V-214123": {
|
|
"checkid": "C-15339r361000_chk",
|
|
"checktext": "As the database administrator (shown here as \"postgres\"), check the current settings by running the following SQL: \n\n$ sudo su - postgres \n$ psql -c \"SHOW shared_preload_libraries\" \n\nIf pgaudit is not in the current setting, this is a finding. \n\nAs the database administrator (shown here as \"postgres\"), check the current settings by running the following SQL: \n\n$ psql -c \"SHOW log_destination\" \n\nIf stderr or syslog are not in the current setting, this is a finding.",
|
|
"description": "Session auditing is for use when a user's activities are under investigation. To be sure of capturing all activity during those periods when session auditing is in use, it needs to be in operation for the whole time PostgreSQL is running.",
|
|
"fixid": "F-15337r361001_fix",
|
|
"fixtext": "Configure PostgreSQL to enable auditing.\n\nTo ensure that logging is enabled, review supplementary content APPENDIX-C for instructions on enabling logging.\n\nFor session logging we suggest using pgaudit. For instructions on how to setup pgaudit, see supplementary content APPENDIX-B.",
|
|
"iacontrols": null,
|
|
"id": "V-214123",
|
|
"ruleID": "SV-214123r508027_rule",
|
|
"severity": "medium",
|
|
"title": "PostgreSQL must initiate session auditing upon startup.",
|
|
"version": "PGS9-00-008600"
|
|
},
|
|
"V-214124": {
|
|
"checkid": "C-15340r361003_chk",
|
|
"checktext": "Review the system documentation to determine whether the organization has defined the information at rest that is to be protected from modification, which must include, at a minimum, PII and classified information.\n\nIf no information is identified as requiring such protection, this is not a finding.\n\nReview the configuration of PostgreSQL, operating system/file system, and additional software as relevant.\n\nIf any of the information defined as requiring cryptographic protection from modification is not encrypted in a manner that provides the required level of protection, this is a finding.\n\nOne possible way to encrypt data within PostgreSQL is to use pgcrypto extension.\n\nTo check if pgcrypto is installed on PostgreSQL, as a database administrator (shown here as \"postgres\"), run the following command:\n\n$ sudo su - postgres\n$ psql -c \"SELECT * FROM pg_available_extensions where name='pgcrypto'\"\n\nIf data in the database requires encryption and pgcrypto is not available, this is a finding.\n\nIf disk or filesystem requires encryption, ask the system owner, DBA, and SA to demonstrate filesystem or disk level encryption.\n\nIf this is required and is not found, this is a finding.",
|
|
"description": "PostgreSQLs handling data requiring \"data at rest\" protections must employ cryptographic mechanisms to prevent unauthorized disclosure and modification of the information at rest. These cryptographic mechanisms may be native to PostgreSQL or implemented via additional software or operating system/file system settings, as appropriate to the situation.\n\nSelection of a cryptographic mechanism is based on the need to protect the integrity of organizational information. The strength of the mechanism is commensurate with the security category and/or classification of the information. Organizations have the flexibility to either encrypt all information on storage devices (i.e., full disk encryption) or encrypt specific data structures (e.g., files, records, or fields). \n\nThe decision whether and what to encrypt rests with the data owner and is also influenced by the physical measures taken to secure the equipment and media on which the information resides.",
|
|
"fixid": "F-15338r361004_fix",
|
|
"fixtext": "Configure PostgreSQL, operating system/file system, and additional software as relevant, to provide the required level of cryptographic protection.\n\nThe pgcrypto module provides cryptographic functions for PostgreSQL. See supplementary content APPENDIX-E for documentation on installing pgcrypto.\n\nWith pgcrypto installed, it's possible to insert encrypted data into the database:\n\nINSERT INTO accounts(username, password) VALUES ('bob', crypt('a_secure_password', gen_salt('md5')));",
|
|
"iacontrols": null,
|
|
"id": "V-214124",
|
|
"ruleID": "SV-214124r508027_rule",
|
|
"severity": "medium",
|
|
"title": "PostgreSQL must implement cryptographic mechanisms to prevent unauthorized modification of organization-defined information at rest (to include, at a minimum, PII and classified information) on organization-defined information system components.",
|
|
"version": "PGS9-00-008700"
|
|
},
|
|
"V-214125": {
|
|
"checkid": "C-15341r361006_chk",
|
|
"checktext": "Check PostgreSQL settings and existing audit records to verify information specific to the source (origin) of the event is being captured and stored with audit records.\u00a0\n\nAs the database administrator (usually postgres, check the current log_line_prefix and log_hostname setting by running the following SQL:\u00a0\n\n$ sudo su - postgres\u00a0\n$ psql -c \"SHOW log_line_prefix\"\u00a0\n$ psql -c \"SHOW log_hostname\"\u00a0\n\nFor a complete list of extra information that can be added to log_line_prefix, see the official documentation: https://www.postgresql.org/docs/current/static/runtime-config-logging.html#GUC-LOG-LINE-PREFIX\u00a0\n\nIf the current settings do not provide enough information regarding the source of the event, this is a finding.",
|
|
"description": "Information system auditing capability is critical for accurate forensic analysis. Without establishing the source of the event, it is impossible to establish, correlate, and investigate the events relating to an incident.\n\nIn order to compile an accurate risk assessment and provide forensic analysis, it is essential for security personnel to know where events occurred, such as application components, modules, session identifiers, filenames, host names, and functionality. \n\nIn addition to logging where events occur within the application, the application must also produce audit records that identify the application itself as the source of the event.\n\nAssociating information about the source of the event within the application provides a means of investigating an attack; recognizing resource utilization or capacity thresholds; or identifying an improperly configured application.",
|
|
"fixid": "F-15339r361007_fix",
|
|
"fixtext": "Note: The following instructions use the PGDATA and PGVER environment variables. See supplementary content APPENDIX-F for instructions on configuring PGDATA and APPENDIX-H for PGVER.\n\nTo ensure that logging is enabled, review supplementary content APPENDIX-C for instructions on enabling logging.\u00a0\n\nIf logging is enabled the following configurations can be made to log the source of an event.\u00a0\n\nFirst, as the database administrator, edit postgresql.conf:\u00a0\n\n$ sudo su - postgres\u00a0\n$ vi ${PGDATA?}/postgresql.conf\u00a0\n\n###### Log Line Prefix\u00a0\n\nExtra parameters can be added to the setting log_line_prefix to log source of event:\u00a0\n\n# %a = application name\u00a0\n# %u = user name\u00a0\n# %d = database name\u00a0\n# %r = remote host and port\u00a0\n# %p = process ID\u00a0\n# %m = timestamp with milliseconds\u00a0\n\nFor example:\u00a0\nlog_line_prefix = '< %m %a %u %d %r %p %m >'\u00a0\n\n###### Log Hostname\u00a0\n\nBy default only IP address is logged. To also log the hostname the following parameter can also be set in postgresql.conf:\u00a0\n\nlog_hostname = on\u00a0\n\nNow, as the system administrator, reload the server with the new configuration:\u00a0\n\n# SYSTEMD SERVER ONLY\u00a0\n$ sudo systemctl reload postgresql-${PGVER?}\n\n# INITD SERVER ONLY\u00a0\n$ sudo service postgresql-${PGVER?} reload",
|
|
"iacontrols": null,
|
|
"id": "V-214125",
|
|
"ruleID": "SV-214125r508027_rule",
|
|
"severity": "medium",
|
|
"title": "PostgreSQL must produce audit records containing sufficient information to establish the sources (origins) of the events.",
|
|
"version": "PGS9-00-008800"
|
|
},
|
|
"V-214126": {
|
|
"checkid": "C-15342r361009_chk",
|
|
"checktext": "To get a list of all extensions installed, use the following commands:\u00a0\n\n$ sudo su - postgres\u00a0\n$ psql -c \"select * from pg_extension where extname != 'plpgsql'\"\u00a0\n\nIf any extensions exist that are not approved, this is a finding.",
|
|
"description": "Information systems 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 (e.g., key missions, functions).\u00a0\n\nIt is detrimental for software products to provide, or install by default, functionality exceeding requirements or mission objectives.\u00a0\u00a0\n\nPostgreSQL must adhere to the principles of least functionality by providing only essential capabilities.",
|
|
"fixid": "F-15340r361010_fix",
|
|
"fixtext": "To remove extensions, use the following commands:\n\n$ sudo su - postgres\n$ psql -c \"DROP EXTENSION <extension_name>\"\n\nNote: It is recommended that plpgsql not be removed.",
|
|
"iacontrols": null,
|
|
"id": "V-214126",
|
|
"ruleID": "SV-214126r508027_rule",
|
|
"severity": "medium",
|
|
"title": "Unused database components, PostgreSQL software, and database objects must be removed.",
|
|
"version": "PGS9-00-008900"
|
|
},
|
|
"V-214127": {
|
|
"checkid": "C-15343r361012_chk",
|
|
"checktext": "PostgreSQL\u2019s Copy command can interact with the underlying OS. Only superuser has access to this command.\n\nFirst, as the database administrator (shown here as \"postgres\"), run the following SQL to list all roles and their privileges:\n\n$ sudo su - postgres\n$ psql -x -c \"\\du\"\n\nIf any role has \"superuser\" that should not, this is a finding.\n\nIt is possible for an extension to contain code that could access external executables via SQL. To list all installed extensions, as the database administrator (shown here as \"postgres\"), run the following SQL:\n\n$ sudo su - postgres\n$ psql -x -c \"SELECT * FROM pg_available_extensions WHERE installed_version IS NOT NULL\"\n\nIf any extensions are installed that are not approved, this is a finding.",
|
|
"description": "Information systems 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 (e.g., key missions, functions). \n\nIt is detrimental for applications to provide, or install by default, functionality exceeding requirements or mission objectives. \n\nApplications must adhere to the principles of least functionality by providing only essential capabilities.\n\nPostgreSQLs may spawn additional external processes to execute procedures that are defined in PostgreSQL but stored in external host files (external procedures). The spawned process used to execute the external procedure may operate within a different OS security context than PostgreSQL and provide unauthorized access to the host system.",
|
|
"fixid": "F-15341r361013_fix",
|
|
"fixtext": "To remove superuser from a role, as the database administrator (shown here as \"postgres\"), run the following SQL:\n\n$ sudo su - postgres\n$ psql -c \"ALTER ROLE <role-name> WITH NOSUPERUSER\"\n\nTo remove extensions from PostgreSQL, as the database administrator (shown here as \"postgres\"), run the following SQL:\n\n$ sudo su - postgres\n$ psql -c \"DROP EXTENSION extension_name\"",
|
|
"iacontrols": null,
|
|
"id": "V-214127",
|
|
"ruleID": "SV-214127r508027_rule",
|
|
"severity": "medium",
|
|
"title": "Access to external executables must be disabled or restricted.",
|
|
"version": "PGS9-00-009100"
|
|
},
|
|
"V-214128": {
|
|
"checkid": "C-15344r361015_chk",
|
|
"checktext": "To list all installed packages, as the system administrator, run the following:\n\n# RHEL/CENT Systems\n$ sudo yum list installed | grep postgres\n\n# Debian Systems\n$ dpkg --get-selections | grep postgres\n\nIf any packages are installed that are not required, this is a finding.",
|
|
"description": "Information systems 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 (e.g., key missions, functions).\u00a0\u00a0\n\nIt is detrimental for software products to provide, or install by default, functionality exceeding requirements or mission objectives.\u00a0\u00a0\n\nPostgreSQL must adhere to the principles of least functionality by providing only essential capabilities.\u00a0\n\nUnused, unnecessary PostgreSQL components increase the attack vector for PostgreSQL by introducing additional targets for attack. By minimizing the services and applications installed on the system, the number of potential vulnerabilities is reduced. Components of the system that are unused and cannot be uninstalled must be disabled. The techniques available for disabling components will vary by DBMS product, OS and the nature of the component and may include DBMS configuration settings, OS service settings, OS file access security, and DBMS user/role permissions.",
|
|
"fixid": "F-15342r361016_fix",
|
|
"fixtext": "To remove any unneeded executables, as the system administrator, run the following:\n\n# RHEL/CENT Systems\n$ sudo yum erase <package_name>\n\n# Debian Systems\n$ sudo apt-get remove <package_name>",
|
|
"iacontrols": null,
|
|
"id": "V-214128",
|
|
"ruleID": "SV-214128r508027_rule",
|
|
"severity": "medium",
|
|
"title": "Unused database components which are integrated in PostgreSQL and cannot be uninstalled must be disabled.",
|
|
"version": "PGS9-00-009200"
|
|
},
|
|
"V-214129": {
|
|
"checkid": "C-15345r361018_chk",
|
|
"checktext": "If security labeling is not required, this is not a finding.\n\nFirst, as the database administrator (shown here as \"postgres\"), run the following SQL against each table that requires security labels:\n\n$ sudo su - postgres\n$ psql -c \"\\d+ <schema_name>.<table_name>\"\n\nIf security labeling requirements have been specified, but the security labeling is not implemented or does not reliably maintain labels on information in process, this is a finding.",
|
|
"description": "Without the association of security labels to information, there is no basis for PostgreSQL to make security-related access-control decisions.\n\nSecurity labels are abstractions representing the basic properties or characteristics of an entity (e.g., subjects and objects) with respect to safeguarding information. \n\nThese labels are typically associated with internal data structures (e.g., tables, rows) within the database and are used to enable the implementation of access control and flow control policies, reflect special dissemination, handling or distribution instructions, or support other aspects of the information security policy. \n\nOne example includes marking data as classified or FOUO. These security labels may be assigned manually or during data processing, but, either way, it is imperative these assignments are maintained while the data is in storage. If the security labels are lost when the data is stored, there is the risk of a data compromise.\n\nThe mechanism used to support security labeling may be the sepgsql feature of PostgreSQL, a third-party product, or custom application code.",
|
|
"fixid": "F-15343r361019_fix",
|
|
"fixtext": "In addition to the SQL-standard privilege system available through GRANT, tables can have row security policies that restrict, on a per-user basis, which rows can be returned by normal queries or inserted, updated, or deleted by data modification commands. This feature is also known as Row-Level Security (RLS).\n\nRLS policies can be very different depending on their use case. For one example of using RLS for Security Labels, see supplementary content APPENDIX-D.",
|
|
"iacontrols": null,
|
|
"id": "V-214129",
|
|
"ruleID": "SV-214129r508027_rule",
|
|
"severity": "medium",
|
|
"title": "PostgreSQL must associate organization-defined types of security labels having organization-defined security label values with information in process.",
|
|
"version": "PGS9-00-009400"
|
|
},
|
|
"V-214130": {
|
|
"checkid": "C-15346r361021_chk",
|
|
"checktext": "To check if password encryption is enabled, as the database administrator (shown here as \"postgres\"), run the following SQL:\n\n$ sudo su - postgres\n$ psql -c \"SHOW password_encryption\"\n\nIf password_encryption is not on, this is a finding.\n\nNext, to identify if any passwords have been stored without being hashed and salted, as the database administrator (shown here as \"postgres\"), run the following SQL:\n\n$ sudo su - postgres\n$ psql -x -c \"SELECT * FROM pg_shadow\"\n\nIf any password is in plaintext, this is a finding.",
|
|
"description": "The DoD standard for authentication is DoD-approved 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 AO approval.\n\nIn such cases, database passwords stored in clear text, using reversible encryption, or using 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 PostgreSQL.",
|
|
"fixid": "F-15344r361022_fix",
|
|
"fixtext": "Note: The following instructions use the PGDATA and PGVER environment variables. See supplementary content APPENDIX-F for instructions on configuring PGDATA and APPENDIX-H for PGVER.\n\nTo enable password_encryption, as the database administrator, edit postgresql.conf:\u00a0\n\n$ sudo su - postgres\u00a0\n$ vi ${PGDATA?}/postgresql.conf\u00a0\npassword_encryption = on\u00a0\n\nInstitute a policy of not using the \"WITH UNENCRYPTED PASSWORD\" option with the CREATE ROLE/USER and ALTER ROLE/USER commands. (This option overrides the setting of the password_encryption configuration parameter.)\u00a0\n\nAs the system administrator, restart the server with the new configuration:\u00a0\n\n# SYSTEMD SERVER ONLY\u00a0\n$ sudo systemctl restart postgresql-${PGVER?}\n\n# INITD SERVER ONLY\u00a0\n$ sudo service postgresql-${PGVER?} restart",
|
|
"iacontrols": null,
|
|
"id": "V-214130",
|
|
"ruleID": "SV-214130r508027_rule",
|
|
"severity": "medium",
|
|
"title": "If passwords are used for authentication, PostgreSQL must store only hashed, salted representations of passwords.",
|
|
"version": "PGS9-00-009500"
|
|
},
|
|
"V-214131": {
|
|
"checkid": "C-15347r361024_chk",
|
|
"checktext": "To list all the permissions of individual roles, as the database administrator (shown here as \"postgres\"), run the following SQL:\n\n$ sudo su - postgres\n$ psql -c \"\\du\n\nIf any role has SUPERUSER that should not, this is a finding.\n\nNext, list all the permissions of databases and schemas by running the following SQL:\n\n$ sudo su - postgres\n$ psql -c \"\\l\"\n$ psql -c \"\\dn+\"\n\nIf any database or schema has update (\"W\") or create (\"C\") privileges and should not, this is a finding.",
|
|
"description": "Failure to provide logical access restrictions associated with changes to configuration may have significant effects on the overall security of the system.\n\nWhen dealing with access restrictions pertaining to change control, it should be noted that any changes to the hardware, software, and/or firmware components of the information system can potentially have significant effects on the overall security of the system.\n\nAccordingly, only qualified and authorized individuals should be allowed to obtain access to system components for the purposes of initiating changes, including upgrades and modifications.",
|
|
"fixid": "F-15345r361025_fix",
|
|
"fixtext": "Configure PostgreSQL to enforce access restrictions associated with changes to the configuration of PostgreSQL or database(s).\u00a0\n\nUse ALTER ROLE to remove accesses from roles:\u00a0\n\n$ psql -c \"ALTER ROLE <role_name> NOSUPERUSER\"\u00a0\n\nUse REVOKE to remove privileges from databases and schemas:\u00a0\n\n$ psql -c \"REVOKE ALL PRIVILEGES ON <table> FROM <role_name>\"",
|
|
"iacontrols": null,
|
|
"id": "V-214131",
|
|
"ruleID": "SV-214131r508027_rule",
|
|
"severity": "medium",
|
|
"title": "PostgreSQL must enforce access restrictions associated with changes to the configuration of PostgreSQL or database(s).",
|
|
"version": "PGS9-00-009600"
|
|
},
|
|
"V-214132": {
|
|
"checkid": "C-15348r361027_chk",
|
|
"checktext": "First, as the database administrator, review the current log_line_prefix settings by running the following SQL:\u00a0\n\n$ sudo su - postgres\u00a0\n$ psql -c \"SHOW log_line_prefix\"\u00a0\n\nIf log_line_prefix does not contain at least '< %m %a %u %d %r %p %m >', this is a finding.\u00a0\n\nNext, review the current shared_preload_libraries settings by running the following SQL:\u00a0\n\n$ psql -c \"SHOW shared_preload_libraries\"\u00a0\n\nIf shared_preload_libraries does not contain \"pgaudit\", this is a finding.",
|
|
"description": "Non-repudiation of actions taken is required in order to maintain data integrity. Examples of particular actions taken by individuals include creating information, sending a message, approving information (e.g., indicating concurrence or signing a contract), and receiving a message. \n\nNon-repudiation protects against later claims by a user of not having created, modified, or deleted a particular data item or collection of data in the database.\n\nIn designing a database, the organization must define the types of data and the user actions that must be protected from repudiation. The implementation must then include building audit features into the application data tables, and configuring PostgreSQL' audit tools to capture the necessary audit trail. Design and implementation also must ensure that applications pass individual user identification to PostgreSQL, even where the application connects to PostgreSQL with a standard, shared account.",
|
|
"fixid": "F-15346r361028_fix",
|
|
"fixtext": "Note: The following instructions use the PGDATA and PGVER environment variables. See supplementary content APPENDIX-F for instructions on configuring PGDATA and APPENDIX-H for PGVER.\n\nConfigure the database to supply additional auditing information to protect against a user falsely repudiating having performed organization-defined actions.\u00a0\n\nUsing pgaudit PostgreSQL can be configured to audit these requests. See supplementary content APPENDIX-B for documentation on installing pgaudit.\u00a0\n\nTo ensure that logging is enabled, review supplementary content APPENDIX-C for instructions on enabling logging.\u00a0\n\nModify the configuration of audit logs to include details identifying the individual user:\u00a0\n\nFirst, as the database administrator (shown here as \"postgres\"), edit postgresql.conf:\u00a0\n\n$ sudo su - postgres\u00a0\n$ vi ${PGDATA?}/postgresql.conf\u00a0\n\nExtra parameters can be added to the setting log_line_prefix to identify the user:\u00a0\n\nlog_line_prefix = '< %m %a %u %d %r %p %m >'\u00a0\n\nNow, as the system administrator, reload the server with the new configuration:\u00a0\n\n# SYSTEMD SERVER ONLY\u00a0\n$ sudo systemctl reload postgresql-${PGVER?}\n\n# INITD SERVER ONLY\u00a0\n$ sudo service postgresql-${PGVER?} reload\u00a0\n\nUse accounts assigned to individual users. Where the application connects to PostgreSQL using a standard, shared account, ensure that it also captures the individual user identification and passes it to PostgreSQL.",
|
|
"iacontrols": null,
|
|
"id": "V-214132",
|
|
"ruleID": "SV-214132r508027_rule",
|
|
"severity": "medium",
|
|
"title": "PostgreSQL must protect against a user falsely repudiating having performed organization-defined actions.",
|
|
"version": "PGS9-00-009700"
|
|
},
|
|
"V-214133": {
|
|
"checkid": "C-15349r361030_chk",
|
|
"checktext": "Review system configuration.\n\nIf no script/tool is monitoring the partition for the PostgreSQL log directories, this is a finding.\n\nIf appropriate support staff are not notified immediately upon storage volume utilization reaching 75%, this is a finding.",
|
|
"description": "Organizations are required to use a central log management system, so, under normal conditions, the audit space allocated to PostgreSQL on its own server will not be an issue. However, space will still be required on PostgreSQL server for audit records in transit, and, under abnormal conditions, this could fill up. Since a requirement exists to halt processing upon audit failure, a service outage would result.\n\nIf support personnel are not notified immediately upon storage volume utilization reaching 75%, they are unable to plan for storage capacity expansion. \n\nThe appropriate support staff include, at a minimum, the ISSO and the DBA/SA.",
|
|
"fixid": "F-15347r361031_fix",
|
|
"fixtext": "Note: The following instructions use the PGDATA and PGVER environment variables. See supplementary content APPENDIX-F for instructions on configuring PGDATA and APPENDIX-H for PGVER.\n\nConfigure the system to notify appropriate support staff immediately upon storage volume utilization reaching 75%.\u00a0\n\nPostgreSQL does not monitor storage, however, it is possible to monitor storage with a script.\u00a0\n\n##### Example Monitoring Script\u00a0\n\n#!/bin/bash\u00a0\n\nPGDATA=/var/lib/psql/${PGVER?}/data\u00a0\nCURRENT=$(df ${PGDATA?} | grep / | awk '{ print $5}' | sed 's/%//g')\u00a0\nTHRESHOLD=75\u00a0\n\nif [ \"$CURRENT\" -gt \"$THRESHOLD\" ] ; then\u00a0\nmail -s 'Disk Space Alert' mail@support.com << EOF\u00a0\nThe data directory volume is almost full. Used: $CURRENT\u00a0\n%EOF\u00a0\nfi\u00a0\n\nSchedule this script in cron to run around the clock.",
|
|
"iacontrols": null,
|
|
"id": "V-214133",
|
|
"ruleID": "SV-214133r508027_rule",
|
|
"severity": "medium",
|
|
"title": "The system must provide a warning to appropriate support staff when allocated audit record storage volume reaches 75% of maximum audit record storage capacity.",
|
|
"version": "PGS9-00-009900"
|
|
},
|
|
"V-214134": {
|
|
"checkid": "C-15350r361033_chk",
|
|
"checktext": "First, as the database administrator, check if pgaudit is present in shared_preload_libraries:\n\n$ sudo su - postgres\n$ psql -c \"SHOW shared_preload_libraries\"\n\nIf pgaudit is not present in the result from the query, this is a finding.",
|
|
"description": "If authorized individuals do not have the ability to modify auditing parameters in response to a changing threat environment, the organization may not be able to effectively respond, and important forensic information may be lost.\n\nThis requirement enables organizations to extend or limit auditing as necessary to meet organizational requirements. Auditing that is limited to conserve information system resources may be extended to address certain threat situations. In addition, auditing may be limited to a specific set of events to facilitate audit reduction, analysis, and reporting. Organizations can establish time thresholds in which audit actions are changed, for example, near real time, within minutes, or within hours.",
|
|
"fixid": "F-15348r361034_fix",
|
|
"fixtext": "Note: The following instructions use the PGDATA and PGVER environment variables. See supplementary content APPENDIX-F for instructions on configuring PGDATA and APPENDIX-H for PGVER.\n\nTo ensure that logging is enabled, review supplementary content APPENDIX-C for instructions on enabling logging.\u00a0\n\nFor audit logging we suggest using pgaudit. For instructions on how to setup pgaudit, see supplementary content APPENDIX-B.\u00a0\n\nAs a superuser (postgres), any pgaudit parameter can be changed in postgresql.conf. Configurations can only be changed by a superuser.\u00a0\n\n### Example: Change Auditing To Log Any ROLE Statements\u00a0\n\nNote: This will override any setting already configured.\u00a0\n\nAlter the configuration to do role-based logging:\u00a0\n\n$ sudo su - postgres\u00a0\n$ vi ${PGDATA?}/postgresql.conf\u00a0\n\nAdd the following parameters (or edit existing parameters):\u00a0\n\npgaudit.log = 'role'\u00a0\n\nNow, as the system administrator, reload the server with the new configuration:\u00a0\n\n# SYSTEMD SERVER ONLY\u00a0\n$ sudo systemctl reload postgresql-${PGVER?}\n\n# INITD SERVER ONLY\u00a0\n$ sudo service postgresql-${PGVER?} reload\u00a0\n\n### Example: Set An Auditing Role And Grant Privileges\u00a0\n\nAn audit role can be configured and granted privileges to specific tables and columns that need logging.\u00a0\n\n##### Create Test Table\u00a0\n\n$ sudo su - postgres\u00a0\n$ psql -c \"CREATE TABLE public.stig_audit_example(id INT, name TEXT, password TEXT);\"\u00a0\n\n##### Define Auditing Role\u00a0\n\nAs PostgreSQL superuser (such as postgres), add the following to postgresql.conf or any included configuration files.\u00a0\n\n$ sudo su - postgres\u00a0\n$ vi ${PGDATA?}/postgresql.conf\u00a0\n\nAdd the following parameters (or edit existing parameters):\u00a0\n\npgaudit.role = 'auditor'\u00a0\n\nNow, as the system administrator, reload the server with the new configuration:\u00a0\n\n# SYSTEMD SERVER ONLY\u00a0\n$ sudo systemctl reload postgresql-${PGVER?} \n\n# INITD SERVER ONLY\u00a0\n$ sudo service postgresql-${PGVER?} reload\u00a0\n\nNext in PostgreSQL create a new role:\u00a0\n\npostgres=# CREATE ROLE auditor;\u00a0\npostgres=# GRANT select(password) ON public.stig_audit_example TO auditor;\u00a0\n\nNote: This role is created with NOLOGIN privileges by default.\u00a0\n\nNow any SELECT on the column password will be logged:\u00a0\n\n$ sudo su - postgres\u00a0\n$ psql -c \"SELECT password FROM public.stig_audit_example;\"\u00a0\n$ cat ${PGDATA?}/pg_log/<latest_log>\u00a0\n< 2016-01-28 16:46:09.038 UTC bob postgres: >LOG: AUDIT: OBJECT,6,1,READ,SELECT,TABLE,public.stig_audit_example,SELECT password FROM stig_audit_example;,<none>\u00a0\n\n## Change Configurations During A Specific Timeframe\u00a0\n\nDeploy PostgreSQL that allows audit configuration changes to take effect within the timeframe required by the application owner and without involving actions or events that the application owner rules unacceptable.\u00a0\n\nCrontab can be used to do this.\u00a0\n\nFor a specific audit role:\u00a0\n\n# Grant specific audit privileges to an auditing role at 5 PM every day of the week, month, year at the 0 minute mark.\u00a0\n0 5 * * * postgres /usr/bin/psql -c \"GRANT select(password) ON public.stig_audit_example TO auditor;\"\u00a0\n# Revoke specific audit privileges to an auditing role at 5 PM every day of the week, month, year at the 0 minute mark.\u00a0\n0 17 * * * postgres /usr/bin/psql -c \"REVOKE select(password) ON public.stig_audit_example FROM auditor;\"",
|
|
"iacontrols": null,
|
|
"id": "V-214134",
|
|
"ruleID": "SV-214134r508027_rule",
|
|
"severity": "medium",
|
|
"title": "PostgreSQL must provide the means for individuals in authorized roles to change the auditing to be performed on all application components, based on all selectable event criteria within organization-defined time thresholds.",
|
|
"version": "PGS9-00-010000"
|
|
},
|
|
"V-214135": {
|
|
"checkid": "C-15351r361036_chk",
|
|
"checktext": "Determine all situations where a user must re-authenticate. Check if the mechanisms that handle such situations use the following SQL:\n\nTo make a single user re-authenticate, the following must be present:\n\nSELECT pg_terminate_backend(pid) FROM pg_stat_activity WHERE user='<username>'\n\nTo make all users re-authenticate, run the following:\n\nSELECT pg_terminate_backend(pid) FROM pg_stat_activity WHERE user LIKE '%'\n\nIf the provided SQL does not force re-authentication, this is a finding.",
|
|
"description": "The DoD standard for authentication of an interactive user is the presentation of a Common Access Card (CAC) or other physical token bearing a valid, current, DoD-issued Public Key Infrastructure (PKI) certificate, coupled with a Personal Identification Number (PIN) to be entered by the user at the beginning of each session and whenever reauthentication is required.\n\nWithout reauthentication, users may access resources or perform tasks for which they do not have authorization.\n\nWhen applications provide the capability to change security roles or escalate the functional capability of the application, it is critical the user re-authenticate.\n\nIn addition to the reauthentication requirements associated with session locks, organizations may require reauthentication of individuals and/or devices in other situations, including (but not limited to) the following circumstances:\n\n(i) When authenticators change;\n(ii) When roles change;\n(iii) When security categorized information systems change;\n(iv) When the execution of privileged functions occurs;\n(v) After a fixed period of time; or\n(vi) Periodically.\n\nWithin the DoD, the minimum circumstances requiring reauthentication are privilege escalation and role changes.",
|
|
"fixid": "F-15349r361037_fix",
|
|
"fixtext": "Modify and/or configure PostgreSQL and related applications and tools so that users are always required to reauthenticate when changing role or escalating privileges.\n\nTo make a single user re-authenticate, the following must be present:\n\nSELECT pg_terminate_backend(pid) FROM pg_stat_activity WHERE user='<username>'\n\nTo make all users re-authenticate, the following must be present:\n\nSELECT pg_terminate_backend(pid) FROM pg_stat_activity WHERE user LIKE '%'",
|
|
"iacontrols": null,
|
|
"id": "V-214135",
|
|
"ruleID": "SV-214135r508027_rule",
|
|
"severity": "medium",
|
|
"title": "PostgreSQL must require users to reauthenticate when organization-defined circumstances or situations require reauthentication.",
|
|
"version": "PGS9-00-010100"
|
|
},
|
|
"V-214136": {
|
|
"checkid": "C-15352r361039_chk",
|
|
"checktext": "First, as the database administrator (shown here as \"postgres\"), verify the following settings:\n\nNote: If no specific directory given before the filename, the files are stored in PGDATA.\n\n$ sudo su - postgres\n$ psql -c \"SHOW ssl_ca_file\"\n$ psql -c \"SHOW ssl_cert_file\"\n$ psql -c \"SHOW ssl_crl_file\"\n$ psql -c \"SHOW ssl_key_file\"\n\nIf the directory these files are stored in is not protected, this is a finding.",
|
|
"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 the private key is stolen, an attacker can use the private key(s) to impersonate the certificate holder. In cases where PostgreSQL-stored private keys are used to authenticate PostgreSQL to the system\u2019s clients, loss of the corresponding private keys would allow an attacker to successfully perform undetected man-in-the-middle attacks against PostgreSQL system and its clients.\n\nBoth the holder of a digital certificate and the issuing authority must take careful measures to protect the corresponding private key. Private keys should always be generated and protected in FIPS 140-2 validated cryptographic modules.\n\nAll access to the private key(s) of PostgreSQL must be restricted to authorized and authenticated users. If unauthorized users have access to one or more of PostgreSQL's private keys, an attacker could gain access to the key(s) and use them to impersonate the database on the network or otherwise perform unauthorized actions.",
|
|
"fixid": "F-15350r361040_fix",
|
|
"fixtext": "Note: The following instructions use the PGDATA and PGVER environment variables. See supplementary content APPENDIX-F for instructions on configuring PGDATA and APPENDIX-H for PGVER.\n\nStore all PostgreSQL PKI private keys in a FIPS 140-2-validated cryptographic module. \n\nEnsure access to PostgreSQL PKI private keys is restricted to only authenticated and authorized users.\u00a0\n\nPostgreSQL private key(s) can be stored in $PGDATA directory, which is only accessible by the database owner (usually postgres, DBA) user. Do not allow access to this system account to unauthorized users.\u00a0\n\nTo put the keys in a different directory, as the database administrator (shown here as \"postgres\"), set the following settings to a protected directory:\u00a0\n\n$ sudo su - postgres\u00a0\n$ vi ${PGDATA?}/postgresql.conf\u00a0\nssl_ca_file = \"/some/protected/directory/root.crt\"\u00a0\nssl_crl_file = \"/some/protected/directory/root.crl\"\u00a0\nssl_cert_file = \"/some/protected/directory/server.crt\"\u00a0\nssl_key_file = \"/some/protected/directory/server.key\"\u00a0\n\nNow, as the system administrator, restart the server with the new configuration:\u00a0\n\n# SYSTEMD SERVER ONLY\u00a0\n$ sudo systemctl restart postgresql-${PGVER?}\n\n# INITD SERVER ONLY\u00a0\n$ sudo service postgresql-${PGVER?} restart\u00a0\n\nFor more information on configuring PostgreSQL to use SSL, see supplementary content APPENDIX-G.",
|
|
"iacontrols": null,
|
|
"id": "V-214136",
|
|
"ruleID": "SV-214136r508027_rule",
|
|
"severity": "high",
|
|
"title": "PostgreSQL must enforce authorized access to all PKI private keys stored/utilized by PostgreSQL.",
|
|
"version": "PGS9-00-010200"
|
|
},
|
|
"V-214137": {
|
|
"checkid": "C-15353r361042_chk",
|
|
"checktext": "As the database administrator (shown here as \"postgres\"), verify the following setting in postgresql.conf:\n\n$ sudo su - postgres\n$ psql -c \"SHOW ssl_ca_file\"\n$ psql -c \"SHOW ssl_cert_file\"\n\nIf the database is not configured to used approved certificates, this is a finding.",
|
|
"description": "Only DoD-approved external PKIs have been evaluated to ensure that they have security controls and identity vetting procedures in place which are sufficient for DoD systems to rely on the identity asserted in the certificate. PKIs lacking sufficient security controls and identity vetting procedures risk being compromised and issuing certificates that enable adversaries to impersonate legitimate users. \n\nThe authoritative list of DoD-approved PKIs is published at http://iase.disa.mil/pki-pke/interoperability.\n\nThis requirement focuses on communications protection for PostgreSQL session rather than for the network packet.",
|
|
"fixid": "F-15351r361043_fix",
|
|
"fixtext": "Revoke trust in any certificates not issued by a DoD-approved certificate authority.\n\nConfigure PostgreSQL to accept only DoD and DoD-approved PKI end-entity certificates.\n\nTo configure PostgreSQL to accept approved CA's, see the official PostgreSQL documentation: http://www.postgresql.org/docs/current/static/ssl-tcp.html\n\nFor more information on configuring PostgreSQL to use SSL, see supplementary content APPENDIX-G.",
|
|
"iacontrols": null,
|
|
"id": "V-214137",
|
|
"ruleID": "SV-214137r508027_rule",
|
|
"severity": "medium",
|
|
"title": "PostgreSQL must only accept end entity certificates issued by DoD PKI or DoD-approved PKI Certification Authorities (CAs) for the establishment of all encrypted sessions.",
|
|
"version": "PGS9-00-010300"
|
|
},
|
|
"V-214138": {
|
|
"checkid": "C-15354r361045_chk",
|
|
"checktext": "As the database administrator (shown here as \"postgres\"), verify the current log_line_prefix setting in postgresql.conf:\n\n$ sudo su - postgres\n$ psql -c \"SHOW log_line_prefix\"\n\nVerify that the current settings are appropriate for the organization.\n\nThe following is what is possible for logged information:\n\n# %a = application name\n# %u = user name\n# %d = database name\n# %r = remote host and port\n# %h = remote host\n# %p = process ID\n# %t = timestamp without milliseconds\n# %m = timestamp with milliseconds\n# %i = command tag\n# %e = SQL state\n# %c = session ID\n# %l = session line number\n# %s = session start timestamp\n# %v = virtual transaction ID\n# %x = transaction ID (0 if none)\n# %q = stop here in non-session\n# processes\n\nIf the audit record does not log events required by the organization, this is a finding.\n\nNext, verify the current settings of log_connections and log_disconnections by running the following SQL:\n\n$ psql -c \"SHOW log_connections\"\n$ psql -c \"SHOW log_disconnections\"\n\nIf both settings are off, this is a finding.",
|
|
"description": "Information system auditing capability is critical for accurate forensic analysis. Without establishing what type of event occurred, it would be difficult to establish, correlate, and investigate the events relating to an incident or identify those responsible for one. \n\nAudit record content that may be necessary to satisfy the requirement of this policy includes, for example, time stamps, user/process identifiers, event descriptions, success/fail indications, filenames involved, and access control or flow control rules invoked.\n\nAssociating event types with detected events in the application and audit logs provides a means of investigating an attack; recognizing resource utilization or capacity thresholds; or identifying an improperly configured application. \n\nDatabase software is capable of a range of actions on data stored within the database. It is important, for accurate forensic analysis, to know exactly what actions were performed. This requires specific information regarding the event type an audit record is referring to. If event type information is not recorded and stored with the audit record, the record itself is of very limited use.",
|
|
"fixid": "F-15352r361046_fix",
|
|
"fixtext": "Note: The following instructions use the PGDATA and PGVER environment variables. See supplementary content APPENDIX-F for instructions on configuring PGDATA and APPENDIX-H for PGVER.\n\nTo ensure that logging is enabled, review supplementary content APPENDIX-C for instructions on enabling logging.\u00a0\n\nIf logging is enabled the following configurations must be made to log connections, date/time, username and session identifier.\u00a0\n\nFirst, edit the postgresql.conf file as a privileged user:\u00a0\n\n$ sudo su - postgres\u00a0\n$ vi ${PGDATA?}/postgresql.conf\u00a0\n\nEdit the following parameters based on the organization's needs (minimum requirements are as follows):\u00a0\n\nlog_connections = on\u00a0\nlog_disconnections = on\u00a0\nlog_line_prefix = '< %m %u %d %c: >'\u00a0\n\nNow, as the system administrator, reload the server with the new configuration:\u00a0\n\n# SYSTEMD SERVER ONLY\u00a0\n$ sudo systemctl reload postgresql-${PGVER?}\n\n# INITD SERVER ONLY\u00a0\n$ sudo service postgresql-${PGVER?} reload",
|
|
"iacontrols": null,
|
|
"id": "V-214138",
|
|
"ruleID": "SV-214138r508027_rule",
|
|
"severity": "medium",
|
|
"title": "PostgreSQL must produce audit records containing sufficient information to establish what type of events occurred.",
|
|
"version": "PGS9-00-010400"
|
|
},
|
|
"V-214139": {
|
|
"checkid": "C-15355r361048_chk",
|
|
"checktext": "To check if pgcrypto is installed on PostgreSQL, as a database administrator (shown here as \"postgres\"), run the following command:\n\n$ sudo su - postgres\n$ psql -c \"SELECT * FROM pg_available_extensions where name='pgcrypto'\"\n\nIf data in the database requires encryption and pgcrypto is not available, this is a finding.\n\nIf a disk or filesystem requires encryption, ask the system owner, DBA, and SA to demonstrate the use of filesystem and/or disk-level encryption. If this is required and is not found, this is a finding.",
|
|
"description": "PostgreSQLs handling data requiring \"data at rest\" protections must employ cryptographic mechanisms to prevent unauthorized disclosure and modification of the information at rest. These cryptographic mechanisms may be native to PostgreSQL or implemented via additional software or operating system/file system settings, as appropriate to the situation.\n\nSelection of a cryptographic mechanism is based on the need to protect the integrity of organizational information. The strength of the mechanism is commensurate with the security category and/or classification of the information. Organizations have the flexibility to either encrypt all information on storage devices (i.e., full disk encryption) or encrypt specific data structures (e.g., files, records, or fields). \n\nThe decision whether and what to encrypt rests with the data owner and is also influenced by the physical measures taken to secure the equipment and media on which the information resides.",
|
|
"fixid": "F-15353r361049_fix",
|
|
"fixtext": "Configure PostgreSQL, operating system/file system, and additional software as relevant, to provide the required level of cryptographic protection for information requiring cryptographic protection against disclosure.\n\nSecure the premises, equipment, and media to provide the required level of physical protection.\n\nThe pgcrypto module provides cryptographic functions for PostgreSQL. See supplementary content APPENDIX-E for documentation on installing pgcrypto.\n\nWith pgcrypto installed, it is possible to insert encrypted data into the database:\n\nINSERT INTO accounts(username, password) VALUES ('bob', crypt('a_secure_password', gen_salt('md5')));",
|
|
"iacontrols": null,
|
|
"id": "V-214139",
|
|
"ruleID": "SV-214139r508027_rule",
|
|
"severity": "medium",
|
|
"title": "PostgreSQL must implement cryptographic mechanisms preventing the unauthorized disclosure of organization-defined information at rest on organization-defined information system components.",
|
|
"version": "PGS9-00-010500"
|
|
},
|
|
"V-214140": {
|
|
"checkid": "C-15356r361051_chk",
|
|
"checktext": "As the database administrator (shown here as \"postgres\"), run the following SQL:\n\n$ sudo su - postgres\n$ psql -c \"SHOW tcp_keepalives_idle\"\n$ psql -c \"SHOW tcp_keepalives_interval\"\n$ psql -c \"SHOW tcp_keepalives_count\"\n$ psql -c \"SHOW statement_timeout\"\n\nIf these settings are not set, this is a finding.",
|
|
"description": "Captured sessions can be reused in \"replay\" attacks. This requirement limits the ability of adversaries to capture and continue to employ previously valid session IDs.\n\nThis requirement focuses on communications protection for PostgreSQL session rather than for the network packet. The intent of this control is to establish grounds for confidence at each end of a communications session in the ongoing identity of the other party and in the validity of the information being transmitted. \n\nSession IDs are tokens generated by PostgreSQLs to uniquely identify a user's (or process's) session. DBMSs will make access decisions and execute logic based on the session ID.\n\nUnique session IDs help to reduce predictability of said identifiers. Unique session IDs address man-in-the-middle attacks, including session hijacking or insertion of false information into a session. If the attacker is unable to identify or guess the session information related to pending application traffic, they will have more difficulty in hijacking the session or otherwise manipulating valid sessions. \n\nWhen a user logs out, or when any other session termination event occurs, PostgreSQL must terminate the user session(s) to minimize the potential for sessions to be hijacked.",
|
|
"fixid": "F-15354r361052_fix",
|
|
"fixtext": "Note: The following instructions use the PGDATA and PGVER environment variables. See supplementary content APPENDIX-F for instructions on configuring PGDATA and APPENDIX-H for PGVER.\n\nAs the database administrator (shown here as \"postgres\"), edit postgresql.conf:\u00a0\n\n$ sudo su - postgres\u00a0\n$ vi $PGDATA/postgresql.conf\u00a0\n\nSet the following parameters to organizational requirements:\u00a0\n\nstatement_timeout = 10000 #milliseconds\u00a0\ntcp_keepalives_idle = 10 # seconds\u00a0\ntcp_keepalives_interval = 10 # seconds\u00a0\ntcp_keepalives_count = 10\u00a0\n\nNow, as the system administrator, restart the server with the new configuration:\u00a0\n\n# SYSTEMD SERVER ONLY\u00a0\n$ sudo systemctl restart postgresql-${PGVER?}\n\n# INITD SERVER ONLY\u00a0\n$ sudo service postgresql-${PGVER?} restart",
|
|
"iacontrols": null,
|
|
"id": "V-214140",
|
|
"ruleID": "SV-214140r508027_rule",
|
|
"severity": "medium",
|
|
"title": "PostgreSQL must invalidate session identifiers upon user logout or other session termination.",
|
|
"version": "PGS9-00-010600"
|
|
},
|
|
"V-214141": {
|
|
"checkid": "C-15357r361054_chk",
|
|
"checktext": "Note: The following instructions use the PGDATA and PGVER environment variables. See supplementary content APPENDIX-F for instructions on configuring PGDATA and APPENDIX-H for PGVER. Only the database owner and superuser can alter configuration of PostgreSQL.\u00a0\n\nMake sure the pg_log directory are owned by postgres user and group:\u00a0\n\n$ sudo su - postgres\u00a0\n$ ls -la ${PGDATA?}/pg_log\u00a0\n\nIf pg_log is not owned by the database owner, this is a finding.\u00a0\n\nMake sure the data directory are owned by postgres user and group.\u00a0\n\n$ sudo su - postgres\u00a0\n$ ls -la ${PGDATA?}\u00a0\n\nIf PGDATA is not owned by the database owner, this is a finding.\u00a0\n\nMake sure pgaudit installation is owned by root:\u00a0\n\n$ sudo su - postgres\u00a0\n$ ls -la /usr/pgsql-${PGVER?}/share/contrib/pgaudit\u00a0\n\nIf pgaudit installation is not owned by root, this is a finding.\u00a0\n\nNext, as the database administrator (shown here as \"postgres\"), run the following SQL to list all roles and their privileges:\u00a0\n\n$ sudo su - postgres\u00a0\n$ psql -x -c \"\\du\"\u00a0\n\nIf any role has \"superuser\" that should not, this is a finding.",
|
|
"description": "Protecting audit data also includes identifying and protecting the tools used to view and manipulate log data. \n\nDepending upon the log format and application, system and application log tools may provide the only means to manipulate and manage application and system log data. It is, therefore, imperative that access to audit tools be controlled and protected from unauthorized access. \n\nApplications providing tools to interface with audit data will leverage user permissions and roles identifying the user accessing the tools and the corresponding rights the user enjoys in order make access decisions regarding the access to audit tools.\n\nAudit tools include, but are not limited to, OS-provided audit tools, vendor-provided audit tools, and open source audit tools needed to successfully view and manipulate audit information system activity and records. \n\nIf an attacker were to gain access to audit tools, he could analyze audit logs for system weaknesses or weaknesses in the auditing itself. An attacker could also manipulate logs to hide evidence of malicious activity.",
|
|
"fixid": "F-15355r361055_fix",
|
|
"fixtext": "Note: The following instructions use the PGDATA and PGVER environment variables. See supplementary content APPENDIX-F for instructions on configuring PGDATA and APPENDIX-H for PGVER.\n\nIf pg_log or data directory are not owned by postgres user and group, configure them as follows:\u00a0\n\n$ sudo chown -R postgres:postgres ${PGDATA?}\u00a0\n\nIf the pgaudit installation is not owned by root user and group, configure it as follows:\u00a0\n\n$ sudo chown -R root:root /usr/pgsql-${PGVER?}/share/contrib/pgaudit\n\nTo remove superuser from a role, as the database administrator (shown here as \"postgres\"), run the following SQL:\u00a0\n\n$ sudo su - postgres\u00a0\n$ psql -c \"ALTER ROLE <role-name> WITH NOSUPERUSER\"",
|
|
"iacontrols": null,
|
|
"id": "V-214141",
|
|
"ruleID": "SV-214141r508027_rule",
|
|
"severity": "medium",
|
|
"title": "PostgreSQL must protect its audit features from unauthorized access.",
|
|
"version": "PGS9-00-010700"
|
|
},
|
|
"V-214142": {
|
|
"checkid": "C-15358r361057_chk",
|
|
"checktext": "As the database administrator (usually postgres), run the following SQL:\u00a0\n\n$ sudo su - postgres\u00a0\n$ psql -c \"SHOW log_line_prefix\"\u00a0\n\nIf the query result does not contain \"%m\", this is a finding.",
|
|
"description": "Information system auditing capability is critical for accurate forensic analysis. Without establishing when events occurred, it is impossible to establish, correlate, and investigate the events relating to an incident.\n\nIn order to compile an accurate risk assessment and provide forensic analysis, it is essential for security personnel to know the date and time when events occurred.\n\nAssociating the date and time with detected events in the application and audit logs provides a means of investigating an attack; recognizing resource utilization or capacity thresholds; or identifying an improperly configured application. \n\nDatabase software is capable of a range of actions on data stored within the database. It is important, for accurate forensic analysis, to know exactly when specific actions were performed. This requires the date and time an audit record is referring to. If date and time information is not recorded and stored with the audit record, the record itself is of very limited use.",
|
|
"fixid": "F-15356r361058_fix",
|
|
"fixtext": "Note: The following instructions use the PGDATA and PGVER environment variables. See supplementary content APPENDIX-F for instructions on configuring PGDATA and APPENDIX-H for PGVER.\n\nLogging must be enabled in order to capture timestamps. To ensure that logging is enabled, review supplementary content APPENDIX-C for instructions on enabling logging.\u00a0\n\nIf logging is enabled the following configurations must be made to log events with timestamps:\u00a0\n\nFirst, as the database administrator (shown here as \"postgres\"), edit postgresql.conf:\u00a0\n\n$ sudo su - postgres\u00a0\n$ vi ${PGDATA?}/postgresql.conf\u00a0\n\nAdd %m to log_line_prefix to enable timestamps with milliseconds:\u00a0\n\nlog_line_prefix = '< %m >'\u00a0\n\nNow, as the system administrator, reload the server with the new configuration:\u00a0\n\n# SYSTEMD SERVER ONLY\u00a0\n$ sudo systemctl reload postgresql-${PGVER?}\n\n# INITD SERVER ONLY\u00a0\n$ sudo service postgresql-${PGVER?} reload",
|
|
"iacontrols": null,
|
|
"id": "V-214142",
|
|
"ruleID": "SV-214142r508027_rule",
|
|
"severity": "medium",
|
|
"title": "PostgreSQL must produce audit records containing time stamps to establish when the events occurred.",
|
|
"version": "PGS9-00-011100"
|
|
},
|
|
"V-214143": {
|
|
"checkid": "C-15359r361060_chk",
|
|
"checktext": "Note: The following instructions use the PGDATA and PGVER environment variables. See supplementary content APPENDIX-F for instructions on configuring PGDATA and APPENDIX-H for PGVER.\n\nAs the database administrator (shown here as \"postgres\"), verify the permissions of PGDATA: \n\n$ sudo su - postgres \n$ ls -la ${PGDATA?} \n\nIf PGDATA is not owned by postgres:postgres or if files can be accessed by others, this is a finding. \n\nAs the system administrator, verify the permissions of pgsql shared objects and compiled binaries: \n\n$ ls -la /usr/pgsql-${PGVER?}/bin\n$ ls -la /usr/pgsql-${PGVER?}/include\n$ ls -la /usr/pgsql-${PGVER?}/lib\n$ ls -la /usr/pgsql-${PGVER?}/share \n\nIf any of these are not owned by root:root, this is a finding.",
|
|
"description": "Protecting audit data also includes identifying and protecting the tools used to view and manipulate log data. Therefore, protecting audit tools is necessary to prevent unauthorized operation on audit data.\n\nApplications providing tools to interface with audit data will leverage user permissions and roles identifying the user accessing the tools and the corresponding rights the user enjoys in order make access decisions regarding the deletion of audit tools.\n\nAudit tools include, but are not limited to, vendor-provided and open source audit tools needed to successfully view and manipulate audit information system activity and records. Audit tools include custom queries and report generators.",
|
|
"fixid": "F-15357r361061_fix",
|
|
"fixtext": "Note: The following instructions use the PGDATA and PGVER environment variables. See supplementary content APPENDIX-F for instructions on configuring PGDATA and APPENDIX-H for PGVER.\n\nAs the system administrator, change the permissions of PGDATA: \n\n$ sudo chown -R postgres:postgres ${PGDATA?} \n$ sudo chmod 700 ${PGDATA?} \n\nAs the system administrator, change the permissions of pgsql: \n\n$ sudo chown -R root:root /usr/pgsql-${PGVER?}",
|
|
"iacontrols": null,
|
|
"id": "V-214143",
|
|
"ruleID": "SV-214143r508027_rule",
|
|
"severity": "medium",
|
|
"title": "PostgreSQL must protect its audit features from unauthorized removal.",
|
|
"version": "PGS9-00-011200"
|
|
},
|
|
"V-214144": {
|
|
"checkid": "C-15360r361063_chk",
|
|
"checktext": "First, as the database administrator (shown here as \"postgres\"), ensure PostgreSQL uses syslog by running the following SQL:\n\n$ sudo su - postgres\n$ psql -c \"SHOW log_destination\"\n\nIf log_destination is not syslog, this is a finding.\n\nNext, as the database administrator, check which log facility is configured by running the following SQL:\n\n$ psql -c \"SHOW syslog_facility\" \n\nCheck with the organization to see how syslog facilities are defined in their organization.\n\nIf the wrong facility is configured, this is a finding.\n\nIf PostgreSQL does not have a continuous network connection to the centralized log management system, and PostgreSQL audit records are not transferred to the centralized log management system weekly or more often, this is a finding.",
|
|
"description": "Information stored in one location is vulnerable to accidental or incidental deletion or alteration.\n\nOff-loading is a common process in information systems with limited audit storage capacity. \n\nPostgreSQL may write audit records to database tables, to files in the file system, to other kinds of local repository, or directly to a centralized log management system. Whatever the method used, it must be compatible with off-loading the records to the centralized system.",
|
|
"fixid": "F-15358r361064_fix",
|
|
"fixtext": "Note: The following instructions use the PGDATA and PGVER environment variables. See supplementary content APPENDIX-F for instructions on configuring PGDATA and APPENDIX-H for PGVER.\n\nConfigure PostgreSQL or deploy and configure software tools to transfer audit records to a centralized log management system, continuously and in near-real time where a continuous network connection to the log management system exists, or at least weekly in the absence of such a connection.\u00a0\n\nTo ensure that logging is enabled, review supplementary content APPENDIX-C for instructions on enabling logging.\u00a0\n\nWith logging enabled, as the database administrator (shown here as \"postgres\"), configure the follow parameters in postgresql.conf (the example uses the default values - tailor for environment):\u00a0\n\nNote: Consult the organization on how syslog facilities are defined in the syslog daemon configuration.\u00a0\n\n$ sudo su - postgres\u00a0\n$ vi ${PGDATA?}/postgresql.conf\u00a0\nlog_destination = 'syslog'\u00a0\nsyslog_facility = 'LOCAL0'\u00a0\nsyslog_ident = 'postgres'\u00a0\n\nNow, as the system administrator, reload the server with the new configuration:\u00a0\n\n# SYSTEMD SERVER ONLY\u00a0\n$ sudo systemctl reload postgresql-${PGVER?}\n\n# INITD SERVER ONLY\u00a0\n$ sudo service postgresql-${PGVER?} reload",
|
|
"iacontrols": null,
|
|
"id": "V-214144",
|
|
"ruleID": "SV-214144r508027_rule",
|
|
"severity": "medium",
|
|
"title": "PostgreSQL must off-load audit data to a separate log management facility; this must be continuous and in near real time for systems with a network connection to the storage facility and weekly or more often for stand-alone systems.",
|
|
"version": "PGS9-00-011300"
|
|
},
|
|
"V-214145": {
|
|
"checkid": "C-15361r361066_chk",
|
|
"checktext": "To check if PostgreSQL is configured to use ssl, as the database administrator (shown here as \"postgres\"), run the following SQL:\n\n$ sudo su - postgres\n$ psql -c \"SHOW ssl\"\n\nIf this is not set to on, this is a finding.",
|
|
"description": "One class of man-in-the-middle, or session hijacking, attack involves the adversary guessing at valid session identifiers based on patterns in identifiers already known.\n\nThe preferred technique for thwarting guesses at Session IDs is the generation of unique session identifiers using a FIPS 140-2 approved random number generator.\n\nHowever, it is recognized that available PostgreSQL products do not all implement the preferred technique yet may have other protections against session hijacking. Therefore, other techniques are acceptable, provided they are demonstrated to be effective.",
|
|
"fixid": "F-15359r361067_fix",
|
|
"fixtext": "Note: The following instructions use the PGDATA and PGVER environment variables. See supplementary content APPENDIX-F for instructions on configuring PGDATA and APPENDIX-H for PGVER.\n\nTo configure PostgreSQL to use SSL, as a database owner (shown here as \"postgres\"), edit postgresql.conf:\u00a0\n\n$ sudo su - postgres\u00a0\n$ vi ${PGDATA?}/postgresql.conf\u00a0\n\nAdd the following parameter:\u00a0\n\nssl = on\u00a0\n\nNow, as the system administrator, reload the server with the new configuration:\u00a0\n\n# SYSTEMD SERVER ONLY\u00a0\n$ sudo systemctl reload postgresql-${PGVER?}\n\n# INITD SERVER ONLY\u00a0\n$ sudo service postgresql-${PGVER?} reload\u00a0\n\nFor more information on configuring PostgreSQL to use SSL, see supplementary content APPENDIX-G.\u00a0\n\nFor further SSL configurations, see the official documentation: https://www.postgresql.org/docs/current/static/ssl-tcp.html",
|
|
"iacontrols": null,
|
|
"id": "V-214145",
|
|
"ruleID": "SV-214145r508027_rule",
|
|
"severity": "medium",
|
|
"title": "PostgreSQL must maintain the authenticity of communications sessions by guarding against man-in-the-middle attacks that guess at Session ID values.",
|
|
"version": "PGS9-00-011400"
|
|
},
|
|
"V-214146": {
|
|
"checkid": "C-15362r361069_chk",
|
|
"checktext": "Review PostgreSQL settings to determine whether organizational users are uniquely identified and authenticated when logging on/connecting to the system.\n\nTo list all roles in the database, as the database administrator (shown here as \"postgres\"), run the following SQL:\n\n$ sudo su - postgres\n$ psql -c \"\\du\"\n\nIf organizational users are not uniquely identified and authenticated, this is a finding.\n\nNext, as the database administrator (shown here as \"postgres\"), verify the current pg_hba.conf authentication settings:\n\n$ sudo su - postgres\n$ cat ${PGDATA?}/pg_hba.conf\n\nIf every role does not have unique authentication requirements, this is a finding.\n\nIf accounts are determined to be shared, determine if individuals are first individually authenticated. If individuals are not individually authenticated before using the shared account, this is a finding.",
|
|
"description": "To assure accountability and prevent unauthenticated access, organizational users must be identified and authenticated to prevent potential misuse and compromise of the system. \n\nOrganizational users include organizational employees or individuals the organization deems to have equivalent status of employees (e.g., contractors). Organizational users (and any processes acting on behalf of users) must be uniquely identified and authenticated for all accesses, except the following:\n\n(i) Accesses explicitly identified and documented by the organization. Organizations document specific user actions that can be performed on the information system without identification or authentication; and \n(ii) Accesses that occur through authorized use of group authenticators without individual authentication. Organizations may require unique identification of individuals using shared accounts, for detailed accountability of individual activity.",
|
|
"fixid": "F-15360r361070_fix",
|
|
"fixtext": "Note: The following instructions use the PGDATA environment variable. See supplementary content APPENDIX-F for instructions on configuring PGDATA.\n\nConfigure PostgreSQL settings to uniquely identify and authenticate all organizational users who log on/connect to the system.\n\nTo create roles, use the following SQL:\n\nCREATE ROLE <role_name> [OPTIONS]\n\nFor more information on CREATE ROLE, see the official documentation: https://www.postgresql.org/docs/current/static/sql-createrole.html\n\nFor each role created, the database administrator can specify database authentication by editing pg_hba.conf:\n\n$ sudo su - postgres\n$ vi ${PGDATA?}/pg_hba.conf\n\nAn example pg_hba entry looks like this:\n\n# TYPE DATABASE USER ADDRESS METHOD\nhost test_db bob 192.168.0.0/16 md5\n\nFor more information on pg_hba.conf, see the official documentation: https://www.postgresql.org/docs/current/static/auth-pg-hba-conf.html",
|
|
"iacontrols": null,
|
|
"id": "V-214146",
|
|
"ruleID": "SV-214146r508027_rule",
|
|
"severity": "medium",
|
|
"title": "PostgreSQL must uniquely identify and authenticate organizational users (or processes acting on behalf of organizational users).",
|
|
"version": "PGS9-00-011500"
|
|
},
|
|
"V-214147": {
|
|
"checkid": "C-15363r361072_chk",
|
|
"checktext": "Review system documentation to obtain the organization's definition of circumstances requiring automatic session termination. If the documentation explicitly states that such termination is not required or is prohibited, this is not a finding.\n\nIf the documentation requires automatic session termination, but PostgreSQL is not configured accordingly, this is a finding.",
|
|
"description": "This addresses the termination of user-initiated logical sessions in contrast to the termination of network connections that are associated with communications sessions (i.e., network disconnect). A logical session (for local, network, and remote access) is initiated whenever a user (or process acting on behalf of a user) accesses an organizational information system. Such user sessions can be terminated (and thus terminate user access) without terminating network sessions. \n\nSession termination ends all processes associated with a user's logical session except those batch processes/jobs that are specifically created by the user (i.e., session owner) to continue after the session is terminated. \n\nConditions or trigger events requiring automatic session termination can include, for example, organization-defined periods of user inactivity, targeted responses to certain types of incidents, and time-of-day restrictions on information system use.\n\nThis capability is typically reserved for specific cases where the system owner, data owner, or organization requires additional assurance.",
|
|
"fixid": "F-15361r361073_fix",
|
|
"fixtext": "Configure PostgreSQL to automatically terminate a user session after organization-defined conditions or trigger events requiring session termination.\u00a0\n\nExamples follow.\u00a0\n\n### Change a role to nologin and disconnect the user\u00a0\n\nALTER ROLE '<username>' NOLOGIN;\u00a0\nSELECT pg_terminate_backend(pid) FROM pg_stat_activity WHERE usename='<usename>';\u00a0\n\n### Disconnecting users during a specific time range\u00a0\nSee supplementary content APPENDIX-A for a bash script for this example.\u00a0\n\nThe script found in APPENDIX-A using the -l command can disable all users with rolcanlogin=t from logging in. The script keeps track of who it disables in a .restore_login file. After the specified time is over, the same script can be run with the -r command to restore all login connections.\u00a0\u00a0\n\nThis script would be added to a cron job:\u00a0\n\n# lock at 5 am every day of the week, month, year at the 0 minute mark.\u00a0\n0 5 * * * postgres /var/lib/pgsql/no_login.sh -d postgres -l\u00a0\n# restore at 5 pm every day of the week, month, year at the 0 minute mark.\u00a0\n0 17 * * * postgres /var/lib/pgsql/no_login.sh -d postgres -r",
|
|
"iacontrols": null,
|
|
"id": "V-214147",
|
|
"ruleID": "SV-214147r508027_rule",
|
|
"severity": "medium",
|
|
"title": "PostgreSQL must automatically terminate a user session after organization-defined conditions or trigger events requiring session disconnect.",
|
|
"version": "PGS9-00-011600"
|
|
},
|
|
"V-214148": {
|
|
"checkid": "C-15364r361075_chk",
|
|
"checktext": "Review the system documentation to obtain the definition of the PostgreSQL functionality considered privileged in the context of the system in question.\n\nReview the PostgreSQL security configuration and/or other means used to protect privileged functionality from unauthorized use.\n\nIf the configuration does not protect all of the actions defined as privileged, this is a finding.\n\nIf PostgreSQL instance uses procedural languages, such as pl/Python or pl/R, without AO authorization, this is a finding.",
|
|
"description": "Preventing non-privileged users from executing privileged functions mitigates the risk that unauthorized individuals or processes may gain unnecessary access to information or privileges. \n\nSystem documentation should include a definition of the functionality considered privileged.\n\nDepending on circumstances, privileged functions can include, for example, establishing accounts, performing system integrity checks, or administering cryptographic key management activities. Non-privileged users are individuals that do not possess appropriate authorizations. Circumventing intrusion detection and prevention mechanisms or malicious code protection mechanisms are examples of privileged functions that require protection from non-privileged users.\n\nA privileged function in PostgreSQL/database context is any operation that modifies the structure of the database, its built-in logic, or its security settings. This would include all Data Definition Language (DDL) statements and all security-related statements. In an SQL environment, it encompasses, but is not necessarily limited to: \n\nCREATE\nALTER\nDROP\nGRANT\nREVOKE\n\nThere may also be Data Manipulation Language (DML) statements that, subject to context, should be regarded as privileged. Possible examples include:\n\nTRUNCATE TABLE;\nDELETE, or\nDELETE affecting more than n rows, for some n, or\nDELETE without a WHERE clause;\n\nUPDATE or\nUPDATE affecting more than n rows, for some n, or\nUPDATE without a WHERE clause;\n\nany SELECT, INSERT, UPDATE, or DELETE to an application-defined security table executed by other than a security principal.\n\nDepending on the capabilities of PostgreSQL and the design of the database and associated applications, the prevention of unauthorized use of privileged functions may be achieved by means of DBMS security features, database triggers, other mechanisms, or a combination of these.\n\nHowever, the use of procedural languages within PostgreSQL, such as pl/R and pl/Python, introduce security risk. Any user on the PostgreSQL who is granted access to pl/R or pl/Python is able to run UDFs to escalate privileges and perform unintended functions. Procedural languages such as pl/Perl and pl/Java have \"untrusted\" mode of operation, which do not allow a non-privileged PostgreSQL user to escalate privileges or perform actions as a database administrator.",
|
|
"fixid": "F-15362r361076_fix",
|
|
"fixtext": "Configure PostgreSQL security to protect all privileged functionality. \n\nIf pl/R and pl/Python are used, document their intended use, document users that have access to pl/R and pl/Python, as well as their business use case, such as data-analytics or data-mining. Because of the risks associated with using pl/R and pl/Python, their use must have AO risk acceptance.\n\nTo remove unwanted extensions, use:\n\nDROP EXTENSION <extension_name>\n\nTo remove unwanted privileges from a role, use the REVOKE command. \n\nSee the PostgreSQL documentation for more details: http://www.postgresql.org/docs/current/static/sql-revoke.html",
|
|
"iacontrols": null,
|
|
"id": "V-214148",
|
|
"ruleID": "SV-214148r508027_rule",
|
|
"severity": "high",
|
|
"title": "PostgreSQL must prevent non-privileged users from executing privileged functions, to include disabling, circumventing, or altering implemented security safeguards/countermeasures.",
|
|
"version": "PGS9-00-011700"
|
|
},
|
|
"V-214149": {
|
|
"checkid": "C-15365r361078_chk",
|
|
"checktext": "The cn (Common Name) attribute of the certificate will be compared to the requested database user name, and if they match the login will be allowed. \n\nTo check the cn of the certificate, using openssl, do the following:\n\n$ openssl x509 -noout -subject -in client_cert\n\nIf the cn does not match the users listed in PostgreSQL and no user mapping is used, this is a finding.\n\nUser name mapping can be used to allow cn to be different from the database user name. If User Name Maps are used, run the following as the database administrator (shown here as \"postgres\"), to get a list of maps used for authentication:\n\n$ sudo su - postgres\n$ grep \"map\" ${PGDATA?}/pg_hba.conf\n\nWith the names of the maps used, check those maps against the user name mappings in pg_ident.conf:\n\n$ sudo su - postgres\n$ cat ${PGDATA?}/pg_ident.conf\n\nIf user accounts are not being mapped to authenticated identities, this is a finding.\n\nIf the cn and the username mapping do not match, this is a finding.",
|
|
"description": "The DoD standard for authentication is DoD-approved PKI certificates. Once a PKI certificate has been validated, it must be mapped to PostgreSQL user account for the authenticated identity to be meaningful to PostgreSQL and useful for authorization decisions.",
|
|
"fixid": "F-15363r361079_fix",
|
|
"fixtext": "Configure PostgreSQL to map authenticated identities directly to PostgreSQL user accounts.\n\nFor information on configuring PostgreSQL to use SSL, see supplementary content APPENDIX-G.",
|
|
"iacontrols": null,
|
|
"id": "V-214149",
|
|
"ruleID": "SV-214149r508027_rule",
|
|
"severity": "medium",
|
|
"title": "PostgreSQL must map the PKI-authenticated identity to an associated user account.",
|
|
"version": "PGS9-00-011800"
|
|
},
|
|
"V-214150": {
|
|
"checkid": "C-15366r361081_chk",
|
|
"checktext": "Review the procedures for the refreshing of development/test data from production.\n\nReview any scripts or code that exists for the movement of production data to development/test systems, or to any other location or for any other purpose.\n\nVerify that copies of production data are not left in unprotected locations. \n\nIf the code that exists for data movement does not comply with the organization-defined data transfer policy and/or fails to remove any copies of production data from unprotected locations, this is a finding.",
|
|
"description": "Applications, including PostgreSQL, must prevent unauthorized and unintended information transfer via shared system resources.\u00a0\u00a0\n\nData used for the development and testing of applications often involves copying data from production. It is important that specific procedures exist for this process, to include the conditions under which such transfer may take place, where the copies may reside, and the rules for ensuring sensitive data are not exposed.\u00a0\n\nCopies of sensitive data must not be misplaced or left in a temporary location without the proper controls.",
|
|
"fixid": "F-15364r361082_fix",
|
|
"fixtext": "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 copies of production data are not left in unsecured locations.",
|
|
"iacontrols": null,
|
|
"id": "V-214150",
|
|
"ruleID": "SV-214150r508027_rule",
|
|
"severity": "medium",
|
|
"title": "Database contents must be protected from unauthorized and unintended information transfer by enforcement of a data-transfer policy.",
|
|
"version": "PGS9-00-011900"
|
|
},
|
|
"V-214151": {
|
|
"checkid": "C-15367r361084_chk",
|
|
"checktext": "Note: The following instructions use the PGDATA environment variable. See supplementary content APPENDIX-F for instructions on configuring PGDATA.\n\nReview the permissions granted to users by the operating system/file system on the database files, database log files and database backup files. \n\nTo verify that all files are owned by the database administrator and have the correct permissions, run the following as the database administrator (shown here as \"postgres\"):\n\n$ sudo su - postgres\n$ ls -lR ${PGDATA?}\n\nIf any files are not owned by the database administrator or allow anyone but the database administrator to read/write/execute, this is a finding.\n\nIf any user/role who is not an authorized system administrator with a need-to-know or database administrator with a need-to-know, or a system account for running PostgreSQL processes, is permitted to read/view any of these files, this is a finding.",
|
|
"description": "Applications, including PostgreSQL, must prevent unauthorized and unintended information transfer via shared system resources. Permitting only DBMS processes and authorized, administrative users to have access to the files where the database resides helps ensure that those files are not shared inappropriately and are not open to backdoor access and manipulation.",
|
|
"fixid": "F-15365r361085_fix",
|
|
"fixtext": "Note: The following instructions use the PGDATA environment variable. See supplementary content APPENDIX-F for instructions on configuring PGDATA.\n\nConfigure the permissions granted by the operating system/file system on the database files, database log files, and database backup files so that only relevant system accounts and authorized system administrators and database administrators with a need to know are permitted to read/view these files.\n\nAny files (for example: extra configuration files) created in PGDATA must be owned by the database administrator, with only owner permissions to read, write, and execute.",
|
|
"iacontrols": null,
|
|
"id": "V-214151",
|
|
"ruleID": "SV-214151r508027_rule",
|
|
"severity": "medium",
|
|
"title": "Access to database files must be limited to relevant processes and to authorized, administrative users.",
|
|
"version": "PGS9-00-012000"
|
|
},
|
|
"V-214152": {
|
|
"checkid": "C-15368r361087_chk",
|
|
"checktext": "All configurations for auditing and logging can be found in the postgresql.conf configuration file. By default, this file is owned by the database administrator account. \n\nTo check that the permissions of the postgresql.conf are owned by the database administrator with permissions of 0600, run the following as the database administrator (shown here as \"postgres\"):\n\n$ sudo su - postgres\n$ ls -la ${PGDATA?}\n\nIf postgresql.conf is not owned by the database administrator or does not have 0600 permissions, this is a finding.\n\n#### stderr Logging\n\nTo check that logs are created with 0600 permissions, check the postgresql.conf file for the following setting:\n\n$ sudo su - postgres\n$ psql -c \"SHOW log_file_mode\"\n\nIf permissions are not 0600, this is a finding.\n\n#### syslog Logging\n\nIf PostgreSQL is configured to use syslog, verify that the logs are owned by root and have 0600 permissions. If they are not, this is a finding.",
|
|
"description": "Protecting audit data also includes identifying and protecting the tools used to view and manipulate log data. Therefore, protecting audit tools is necessary to prevent unauthorized operation on audit data.\n\nApplications providing tools to interface with audit data will leverage user permissions and roles identifying the user accessing the tools and the corresponding rights the user enjoys in order make access decisions regarding the modification of audit tools.\n\nAudit tools include, but are not limited to, vendor-provided and open source audit tools needed to successfully view and manipulate audit information system activity and records. Audit tools include custom queries and report generators.",
|
|
"fixid": "F-15366r361088_fix",
|
|
"fixtext": "Apply or modify access controls and permissions (both within PostgreSQL and in the file system/operating system) to tools used to view or modify audit log data. Tools must be configurable by authorized personnel only.\n\n$ sudo su - postgres\n$ vi ${PGDATA?}/postgresql.conf\nlog_file_mode = 0600\n\nNext, as the database administrator (shown here as \"postgres\"), change the ownership and permissions of configuration files in PGDATA:\n\n$ sudo su - postgres\n$ chown postgres:postgres ${PGDATA?}/*.conf\n$ chmod 0600 ${PGDATA?}/*.conf",
|
|
"iacontrols": null,
|
|
"id": "V-214152",
|
|
"ruleID": "SV-214152r508027_rule",
|
|
"severity": "medium",
|
|
"title": "PostgreSQL must protect its audit configuration from unauthorized modification.",
|
|
"version": "PGS9-00-012200"
|
|
},
|
|
"V-214153": {
|
|
"checkid": "C-15369r361090_chk",
|
|
"checktext": "As the system administrator, run the following:\n\n$ openssl version\n\nIf \"fips\" is not included in the openssl version, this is a finding.",
|
|
"description": "Use of weak or not validated cryptographic algorithms undermines the purposes of utilizing encryption and digital signatures to protect data. Weak algorithms can be easily broken and not validated 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 DBMS.\n\nApplications, including DBMSs, utilizing cryptography are required to use approved NIST FIPS 140-2 validated cryptographic modules that meet the requirements of applicable federal laws, Executive Orders, directives, policies, regulations, standards, and guidance.\n\nThe security functions validated as part of FIPS 140-2 for cryptographic modules are described in FIPS 140-2 Annex A.\n\nNSA Type-X (where X=1, 2, 3, 4) products are NSA-certified, hardware-based encryption modules.",
|
|
"fixid": "F-15367r361091_fix",
|
|
"fixtext": "Configure OpenSSL to meet FIPS Compliance using the following documentation in section 9.1:\n\nhttp://csrc.nist.gov/groups/STM/cmvp/documents/140-1/140sp/140sp1758.pdf\n\nFor more information on configuring PostgreSQL to use SSL, see supplementary content APPENDIX-G.",
|
|
"iacontrols": null,
|
|
"id": "V-214153",
|
|
"ruleID": "SV-214153r508027_rule",
|
|
"severity": "high",
|
|
"title": "PostgreSQL must use NIST FIPS 140-2 validated cryptographic modules for cryptographic operations.",
|
|
"version": "PGS9-00-012300"
|
|
},
|
|
"V-214154": {
|
|
"checkid": "C-15370r361093_chk",
|
|
"checktext": "As the database administrator, verify pgaudit is enabled by running the following SQL:\n\n$ sudo su - postgres\n$ psql -c \"SHOW shared_preload_libraries\"\n\nIf the output does not contain \"pgaudit\", this is a finding.\n\nVerify that role, read, write, and ddl auditing are enabled:\n\n$ psql -c \"SHOW pgaudit.log\"\n\nIf the output does not contain role, read, write, and ddl, this is a finding.",
|
|
"description": "Changes in categorized information must be tracked. Without an audit trail, unauthorized access to protected data could go undetected.\n\nFor detailed information on categorizing information, refer to FIPS Publication 199, Standards for Security Categorization of Federal Information and Information Systems, and FIPS Publication 200, Minimum Security Requirements for Federal Information and Information Systems.",
|
|
"fixid": "F-15368r361094_fix",
|
|
"fixtext": "Note: The following instructions use the PGDATA and PGVER environment variables. See supplementary content APPENDIX-F for instructions on configuring PGDATA and APPENDIX-H for PGVER.\n\nTo ensure that logging is enabled, review supplementary content APPENDIX-C for instructions on enabling logging.\u00a0\n\nUsing pgaudit PostgreSQL can be configured to audit these requests. See supplementary content APPENDIX-B for documentation on installing pgaudit.\u00a0\n\nWith pgaudit installed the following configurations can be made:\u00a0\n\n$ sudo su - postgres\u00a0\n$ vi ${PGDATA?}/postgresql.conf\u00a0\n\nAdd the following parameters (or edit existing parameters):\u00a0\n\npgaudit.log='ddl, role, read, write'\u00a0\n\nNow, as the system administrator, reload the server with the new configuration:\u00a0\n\n# SYSTEMD SERVER ONLY\u00a0\n$ sudo systemctl reload postgresql-${PGVER?}\n\n# INITD SERVER ONLY\u00a0\n$ sudo service postgresql-${PGVER?} reload",
|
|
"iacontrols": null,
|
|
"id": "V-214154",
|
|
"ruleID": "SV-214154r508027_rule",
|
|
"severity": "medium",
|
|
"title": "Audit records must be generated when categorized information (e.g., classification levels/security levels) is deleted.",
|
|
"version": "PGS9-00-012500"
|
|
},
|
|
"V-214155": {
|
|
"checkid": "C-15371r361096_chk",
|
|
"checktext": "As the database administrator, verify pgaudit is enabled by running the following SQL: \n\n$ sudo su - postgres \n$ psql -c \"SHOW shared_preload_libraries\" \n\nIf the output does not contain \"pgaudit\", this is a finding. \n\nVerify that role, read, write, and ddl auditing are enabled: \n\n$ psql -c \"SHOW pgaudit.log\" \n\nIf the output does not contain role, read, write, and ddl, this is a finding.",
|
|
"description": "Without tracking all or selected types of access to all or selected objects (tables, views, procedures, functions, etc.), it would be difficult to establish, correlate, and investigate the events relating to an incident, or identify those responsible for one.\n\nIn an SQL environment, types of access include, but are not necessarily limited to:\n\nSELECT\nINSERT\nUPDATE\nDELETE\nEXECUTE",
|
|
"fixid": "F-15369r361097_fix",
|
|
"fixtext": "Note: The following instructions use the PGDATA and PGVER environment variables. See supplementary content APPENDIX-F for instructions on configuring PGDATA and APPENDIX-H for PGVER. To ensure that logging is enabled, review supplementary content APPENDIX-C for instructions on enabling logging. \n\nIf logging is enabled, the following configurations must be made to log unsuccessful connections, date/time, username, and session identifier. \n\nAs the database administrator (shown here as \"postgres\"), edit postgresql.conf: \n\n$ sudo su - postgres \n$ vi ${PGDATA?}/postgresql.conf \n\nEdit the following parameters: \n\nlog_connections = on \nlog_line_prefix = '< %m %u %c: >' \npgaudit.log = 'read, write' \n\nWhere: \n* %m is the time and date \n* %u is the username \n* %c is the session ID for the connection \n\nAs the system administrator, reload the server with the new configuration: \n\n# SYSTEMD SERVER ONLY \n$ sudo systemctl reload postgresql-${PGVER?}\n\n# INITD SERVER ONLY \n$ sudo service postgresql-${PGVER?} reload\n",
|
|
"iacontrols": null,
|
|
"id": "V-214155",
|
|
"ruleID": "SV-214155r508027_rule",
|
|
"severity": "medium",
|
|
"title": "PostgreSQL must generate audit records when successful accesses to objects occur.",
|
|
"version": "PGS9-00-012600"
|
|
},
|
|
"V-214156": {
|
|
"checkid": "C-15372r361099_chk",
|
|
"checktext": "As the database administrator, verify pgaudit is enabled by running the following SQL:\n\n$ sudo su - postgres\n$ psql -c \"SHOW shared_preload_libraries\"\n\nIf the output does not contain \"pgaudit\", this is a finding.\n\nVerify that connections and disconnections are being logged by running the following SQL:\n\n$ sudo su - postgres\n$ psql -c \"SHOW log_connections\"\n$ psql -c \"SHOW log_disconnections\"\n\nIf the output does not contain \"on\", this is a finding.",
|
|
"description": "In this context, direct access is any query, command, or call to the DBMS that comes from any source other than the application(s) that it supports. Examples would be the command line or a database management utility program. The intent is to capture all activity from administrative and non-standard sources.",
|
|
"fixid": "F-15370r361100_fix",
|
|
"fixtext": "Note: The following instructions use the PGDATA and PGVER environment variables. See supplementary content APPENDIX-F for instructions on configuring PGDATA and APPENDIX-H for PGVER.\n\nTo ensure that logging is enabled, review supplementary content APPENDIX-C for instructions on enabling logging.\u00a0\n\nUsing pgaudit PostgreSQL can be configured to audit these requests. See supplementary content APPENDIX-B for documentation on installing pgaudit.\u00a0\n\nWith pgaudit installed the following configurations should be made:\u00a0\n\n$ sudo su - postgres\u00a0\n$ vi ${PGDATA?}/postgresql.conf\u00a0\n\nAdd the following parameters (or edit existing parameters):\u00a0\n\npgaudit.log='ddl, role, read, write'\u00a0\nlog_connections='on'\u00a0\nlog_disconnections='on'\u00a0\n\nNow, as the system administrator, reload the server with the new configuration:\u00a0\n\n# SYSTEMD SERVER ONLY\u00a0\n$ sudo systemctl reload postgresql-${PGVER?} \n\n# INITD SERVER ONLY\u00a0\n$ sudo service postgresql-${PGVER?} reload",
|
|
"iacontrols": null,
|
|
"id": "V-214156",
|
|
"ruleID": "SV-214156r508027_rule",
|
|
"severity": "medium",
|
|
"title": "PostgreSQL must generate audit records for all direct access to the database(s).",
|
|
"version": "PGS9-00-012700"
|
|
},
|
|
"V-214157": {
|
|
"checkid": "C-15373r361102_chk",
|
|
"checktext": "If the deployment incorporates a custom build of the operating system and PostgreSQL guaranteeing the use of FIPS 140-2- compliant OpenSSL, this is not a finding. \nGo to the below webpage and click \"show all\":\nhttps://csrc.nist.gov/projects/cryptographic-module-validation-program/validated-modules/search\nNote: Certificates 3130, 3016, and 2441 are the most common.\nIf the OS is not using a FIPS 140-2 certified implementation that is listed, this is a finding.\n\nIf FIPS encryption is not enabled, this is a finding.\n",
|
|
"description": "PostgreSQL uses OpenSSL for the underlying encryption layer. It must be installed on an operating system that contains a certified FIPS 140-2 distribution of OpenSSL. For other operating systems, users must obtain or build their own FIPS 140-2 OpenSSL libraries.",
|
|
"fixid": "F-15371r361103_fix",
|
|
"fixtext": "Install PostgreSQL on an operating system with FIPS-compliant cryptography enabled; or by other means ensure that FIPS 140-2-certified OpenSSL libraries are used by the DBMS.",
|
|
"iacontrols": null,
|
|
"id": "V-214157",
|
|
"ruleID": "SV-214157r508027_rule",
|
|
"severity": "high",
|
|
"title": "The DBMS must be configured on a platform that has a NIST certified FIPS 140-2 installation of OpenSSL.",
|
|
"version": "PGS9-00-012800"
|
|
},
|
|
"V-220321": {
|
|
"checkid": "C-22036r392699_chk",
|
|
"checktext": "If PostgreSQL is deployed in an unclassified environment, this is not applicable (NA).\n\nIf PostgreSQL is not using NSA-approved cryptography to protect classified information in accordance with applicable federal laws, Executive Orders, directives, policies, regulations, and standards, this is a finding.\n\nTo check if PostgreSQL is configured to use SSL, as the database administrator (shown here as \"postgres\"), run the following SQL:\n\n$ sudo su - postgres\n$ psql -c \"SHOW ssl\"\n\nIf SSL is off, this is a finding.\n\nConsult network administration staff to determine whether the server is protected by NSA-approved encrypting devices. If not, this a finding.",
|
|
"description": "Use of weak or untested encryption algorithms undermines the purposes of utilizing encryption to protect data. The application must implement cryptographic modules adhering to the higher standards approved by the federal government since this provides assurance they have been tested and validated.\n\nIt is the responsibility of the data owner to assess the cryptography requirements in light of applicable federal laws, Executive Orders, directives, policies, regulations, and standards.\n\nNSA-approved cryptography for classified networks is hardware based. This requirement addresses the compatibility of PostgreSQL with the encryption devices.",
|
|
"fixid": "F-22026r392700_fix",
|
|
"fixtext": "Note: The following instructions use the PGDATA and PGVER environment variables. See supplementary content APPENDIX-F for instructions on configuring PGDATA and APPENDIX-H for PGVER.\n\nTo configure PostgreSQL to use SSL, as a database administrator (shown here as \"postgres\"), edit postgresql.conf:\u00a0\n\n$ sudo su - postgres\u00a0\n$ vi ${PGDATA?}/postgresql.conf\u00a0\n\nAdd the following parameter:\u00a0\n\nssl = on\u00a0\n\nNow, as the system administrator, reload the server with the new configuration:\u00a0\n\n# SYSTEMD SERVER ONLY\u00a0\n$ sudo systemctl reload postgresql-${PGVER?}\n\n# INITD SERVER ONLY\u00a0\n$ sudo service postgresql-${PGVER?} reload\u00a0\n\nFor more information on configuring PostgreSQL to use SSL, see supplementary content APPENDIX-G.\u00a0\n\nDeploy NSA-approved encrypting devices to protect the server on the network.",
|
|
"iacontrols": null,
|
|
"id": "V-220321",
|
|
"ruleID": "SV-220321r508027_rule",
|
|
"severity": "medium",
|
|
"title": "PostgreSQL must use NSA-approved cryptography to protect classified information in accordance with the data owners requirements.",
|
|
"version": "PGS9-00-008100"
|
|
}
|
|
},
|
|
"profiles": {
|
|
"MAC-1_Classified": {
|
|
"description": "<ProfileDescription></ProfileDescription>",
|
|
"findings": {
|
|
"V-214048": "true",
|
|
"V-214049": "true",
|
|
"V-214050": "true",
|
|
"V-214051": "true",
|
|
"V-214052": "true",
|
|
"V-214053": "true",
|
|
"V-214054": "true",
|
|
"V-214055": "true",
|
|
"V-214056": "true",
|
|
"V-214057": "true",
|
|
"V-214058": "true",
|
|
"V-214059": "true",
|
|
"V-214060": "true",
|
|
"V-214061": "true",
|
|
"V-214062": "true",
|
|
"V-214063": "true",
|
|
"V-214064": "true",
|
|
"V-214065": "true",
|
|
"V-214066": "true",
|
|
"V-214067": "true",
|
|
"V-214068": "true",
|
|
"V-214069": "true",
|
|
"V-214070": "true",
|
|
"V-214071": "true",
|
|
"V-214072": "true",
|
|
"V-214073": "true",
|
|
"V-214074": "true",
|
|
"V-214075": "true",
|
|
"V-214076": "true",
|
|
"V-214077": "true",
|
|
"V-214078": "true",
|
|
"V-214079": "true",
|
|
"V-214080": "true",
|
|
"V-214081": "true",
|
|
"V-214082": "true",
|
|
"V-214083": "true",
|
|
"V-214084": "true",
|
|
"V-214085": "true",
|
|
"V-214086": "true",
|
|
"V-214087": "true",
|
|
"V-214088": "true",
|
|
"V-214089": "true",
|
|
"V-214090": "true",
|
|
"V-214091": "true",
|
|
"V-214092": "true",
|
|
"V-214093": "true",
|
|
"V-214094": "true",
|
|
"V-214095": "true",
|
|
"V-214096": "true",
|
|
"V-214097": "true",
|
|
"V-214098": "true",
|
|
"V-214099": "true",
|
|
"V-214100": "true",
|
|
"V-214101": "true",
|
|
"V-214102": "true",
|
|
"V-214103": "true",
|
|
"V-214104": "true",
|
|
"V-214105": "true",
|
|
"V-214106": "true",
|
|
"V-214107": "true",
|
|
"V-214108": "true",
|
|
"V-214109": "true",
|
|
"V-214110": "true",
|
|
"V-214111": "true",
|
|
"V-214112": "true",
|
|
"V-214113": "true",
|
|
"V-214114": "true",
|
|
"V-214115": "true",
|
|
"V-214116": "true",
|
|
"V-214117": "true",
|
|
"V-214119": "true",
|
|
"V-214120": "true",
|
|
"V-214121": "true",
|
|
"V-214122": "true",
|
|
"V-214123": "true",
|
|
"V-214124": "true",
|
|
"V-214125": "true",
|
|
"V-214126": "true",
|
|
"V-214127": "true",
|
|
"V-214128": "true",
|
|
"V-214129": "true",
|
|
"V-214130": "true",
|
|
"V-214131": "true",
|
|
"V-214132": "true",
|
|
"V-214133": "true",
|
|
"V-214134": "true",
|
|
"V-214135": "true",
|
|
"V-214136": "true",
|
|
"V-214137": "true",
|
|
"V-214138": "true",
|
|
"V-214139": "true",
|
|
"V-214140": "true",
|
|
"V-214141": "true",
|
|
"V-214142": "true",
|
|
"V-214143": "true",
|
|
"V-214144": "true",
|
|
"V-214145": "true",
|
|
"V-214146": "true",
|
|
"V-214147": "true",
|
|
"V-214148": "true",
|
|
"V-214149": "true",
|
|
"V-214150": "true",
|
|
"V-214151": "true",
|
|
"V-214152": "true",
|
|
"V-214153": "true",
|
|
"V-214154": "true",
|
|
"V-214155": "true",
|
|
"V-214156": "true",
|
|
"V-214157": "true",
|
|
"V-220321": "true"
|
|
},
|
|
"id": "MAC-1_Classified",
|
|
"title": "I - Mission Critical Classified"
|
|
},
|
|
"MAC-1_Public": {
|
|
"description": "<ProfileDescription></ProfileDescription>",
|
|
"findings": {
|
|
"V-214048": "true",
|
|
"V-214049": "true",
|
|
"V-214050": "true",
|
|
"V-214051": "true",
|
|
"V-214052": "true",
|
|
"V-214053": "true",
|
|
"V-214054": "true",
|
|
"V-214055": "true",
|
|
"V-214056": "true",
|
|
"V-214057": "true",
|
|
"V-214058": "true",
|
|
"V-214059": "true",
|
|
"V-214060": "true",
|
|
"V-214061": "true",
|
|
"V-214062": "true",
|
|
"V-214063": "true",
|
|
"V-214064": "true",
|
|
"V-214065": "true",
|
|
"V-214066": "true",
|
|
"V-214067": "true",
|
|
"V-214068": "true",
|
|
"V-214069": "true",
|
|
"V-214070": "true",
|
|
"V-214071": "true",
|
|
"V-214072": "true",
|
|
"V-214073": "true",
|
|
"V-214074": "true",
|
|
"V-214075": "true",
|
|
"V-214076": "true",
|
|
"V-214077": "true",
|
|
"V-214078": "true",
|
|
"V-214079": "true",
|
|
"V-214080": "true",
|
|
"V-214081": "true",
|
|
"V-214082": "true",
|
|
"V-214083": "true",
|
|
"V-214084": "true",
|
|
"V-214085": "true",
|
|
"V-214086": "true",
|
|
"V-214087": "true",
|
|
"V-214088": "true",
|
|
"V-214089": "true",
|
|
"V-214090": "true",
|
|
"V-214091": "true",
|
|
"V-214092": "true",
|
|
"V-214093": "true",
|
|
"V-214094": "true",
|
|
"V-214095": "true",
|
|
"V-214096": "true",
|
|
"V-214097": "true",
|
|
"V-214098": "true",
|
|
"V-214099": "true",
|
|
"V-214100": "true",
|
|
"V-214101": "true",
|
|
"V-214102": "true",
|
|
"V-214103": "true",
|
|
"V-214104": "true",
|
|
"V-214105": "true",
|
|
"V-214106": "true",
|
|
"V-214107": "true",
|
|
"V-214108": "true",
|
|
"V-214109": "true",
|
|
"V-214110": "true",
|
|
"V-214111": "true",
|
|
"V-214112": "true",
|
|
"V-214113": "true",
|
|
"V-214114": "true",
|
|
"V-214115": "true",
|
|
"V-214116": "true",
|
|
"V-214117": "true",
|
|
"V-214119": "true",
|
|
"V-214120": "true",
|
|
"V-214121": "true",
|
|
"V-214122": "true",
|
|
"V-214123": "true",
|
|
"V-214124": "true",
|
|
"V-214125": "true",
|
|
"V-214126": "true",
|
|
"V-214127": "true",
|
|
"V-214128": "true",
|
|
"V-214129": "true",
|
|
"V-214130": "true",
|
|
"V-214131": "true",
|
|
"V-214132": "true",
|
|
"V-214133": "true",
|
|
"V-214134": "true",
|
|
"V-214135": "true",
|
|
"V-214136": "true",
|
|
"V-214137": "true",
|
|
"V-214138": "true",
|
|
"V-214139": "true",
|
|
"V-214140": "true",
|
|
"V-214141": "true",
|
|
"V-214142": "true",
|
|
"V-214143": "true",
|
|
"V-214144": "true",
|
|
"V-214145": "true",
|
|
"V-214146": "true",
|
|
"V-214147": "true",
|
|
"V-214148": "true",
|
|
"V-214149": "true",
|
|
"V-214150": "true",
|
|
"V-214151": "true",
|
|
"V-214152": "true",
|
|
"V-214153": "true",
|
|
"V-214154": "true",
|
|
"V-214155": "true",
|
|
"V-214156": "true",
|
|
"V-214157": "true",
|
|
"V-220321": "true"
|
|
},
|
|
"id": "MAC-1_Public",
|
|
"title": "I - Mission Critical Public"
|
|
},
|
|
"MAC-1_Sensitive": {
|
|
"description": "<ProfileDescription></ProfileDescription>",
|
|
"findings": {
|
|
"V-214048": "true",
|
|
"V-214049": "true",
|
|
"V-214050": "true",
|
|
"V-214051": "true",
|
|
"V-214052": "true",
|
|
"V-214053": "true",
|
|
"V-214054": "true",
|
|
"V-214055": "true",
|
|
"V-214056": "true",
|
|
"V-214057": "true",
|
|
"V-214058": "true",
|
|
"V-214059": "true",
|
|
"V-214060": "true",
|
|
"V-214061": "true",
|
|
"V-214062": "true",
|
|
"V-214063": "true",
|
|
"V-214064": "true",
|
|
"V-214065": "true",
|
|
"V-214066": "true",
|
|
"V-214067": "true",
|
|
"V-214068": "true",
|
|
"V-214069": "true",
|
|
"V-214070": "true",
|
|
"V-214071": "true",
|
|
"V-214072": "true",
|
|
"V-214073": "true",
|
|
"V-214074": "true",
|
|
"V-214075": "true",
|
|
"V-214076": "true",
|
|
"V-214077": "true",
|
|
"V-214078": "true",
|
|
"V-214079": "true",
|
|
"V-214080": "true",
|
|
"V-214081": "true",
|
|
"V-214082": "true",
|
|
"V-214083": "true",
|
|
"V-214084": "true",
|
|
"V-214085": "true",
|
|
"V-214086": "true",
|
|
"V-214087": "true",
|
|
"V-214088": "true",
|
|
"V-214089": "true",
|
|
"V-214090": "true",
|
|
"V-214091": "true",
|
|
"V-214092": "true",
|
|
"V-214093": "true",
|
|
"V-214094": "true",
|
|
"V-214095": "true",
|
|
"V-214096": "true",
|
|
"V-214097": "true",
|
|
"V-214098": "true",
|
|
"V-214099": "true",
|
|
"V-214100": "true",
|
|
"V-214101": "true",
|
|
"V-214102": "true",
|
|
"V-214103": "true",
|
|
"V-214104": "true",
|
|
"V-214105": "true",
|
|
"V-214106": "true",
|
|
"V-214107": "true",
|
|
"V-214108": "true",
|
|
"V-214109": "true",
|
|
"V-214110": "true",
|
|
"V-214111": "true",
|
|
"V-214112": "true",
|
|
"V-214113": "true",
|
|
"V-214114": "true",
|
|
"V-214115": "true",
|
|
"V-214116": "true",
|
|
"V-214117": "true",
|
|
"V-214119": "true",
|
|
"V-214120": "true",
|
|
"V-214121": "true",
|
|
"V-214122": "true",
|
|
"V-214123": "true",
|
|
"V-214124": "true",
|
|
"V-214125": "true",
|
|
"V-214126": "true",
|
|
"V-214127": "true",
|
|
"V-214128": "true",
|
|
"V-214129": "true",
|
|
"V-214130": "true",
|
|
"V-214131": "true",
|
|
"V-214132": "true",
|
|
"V-214133": "true",
|
|
"V-214134": "true",
|
|
"V-214135": "true",
|
|
"V-214136": "true",
|
|
"V-214137": "true",
|
|
"V-214138": "true",
|
|
"V-214139": "true",
|
|
"V-214140": "true",
|
|
"V-214141": "true",
|
|
"V-214142": "true",
|
|
"V-214143": "true",
|
|
"V-214144": "true",
|
|
"V-214145": "true",
|
|
"V-214146": "true",
|
|
"V-214147": "true",
|
|
"V-214148": "true",
|
|
"V-214149": "true",
|
|
"V-214150": "true",
|
|
"V-214151": "true",
|
|
"V-214152": "true",
|
|
"V-214153": "true",
|
|
"V-214154": "true",
|
|
"V-214155": "true",
|
|
"V-214156": "true",
|
|
"V-214157": "true",
|
|
"V-220321": "true"
|
|
},
|
|
"id": "MAC-1_Sensitive",
|
|
"title": "I - Mission Critical Sensitive"
|
|
},
|
|
"MAC-2_Classified": {
|
|
"description": "<ProfileDescription></ProfileDescription>",
|
|
"findings": {
|
|
"V-214048": "true",
|
|
"V-214049": "true",
|
|
"V-214050": "true",
|
|
"V-214051": "true",
|
|
"V-214052": "true",
|
|
"V-214053": "true",
|
|
"V-214054": "true",
|
|
"V-214055": "true",
|
|
"V-214056": "true",
|
|
"V-214057": "true",
|
|
"V-214058": "true",
|
|
"V-214059": "true",
|
|
"V-214060": "true",
|
|
"V-214061": "true",
|
|
"V-214062": "true",
|
|
"V-214063": "true",
|
|
"V-214064": "true",
|
|
"V-214065": "true",
|
|
"V-214066": "true",
|
|
"V-214067": "true",
|
|
"V-214068": "true",
|
|
"V-214069": "true",
|
|
"V-214070": "true",
|
|
"V-214071": "true",
|
|
"V-214072": "true",
|
|
"V-214073": "true",
|
|
"V-214074": "true",
|
|
"V-214075": "true",
|
|
"V-214076": "true",
|
|
"V-214077": "true",
|
|
"V-214078": "true",
|
|
"V-214079": "true",
|
|
"V-214080": "true",
|
|
"V-214081": "true",
|
|
"V-214082": "true",
|
|
"V-214083": "true",
|
|
"V-214084": "true",
|
|
"V-214085": "true",
|
|
"V-214086": "true",
|
|
"V-214087": "true",
|
|
"V-214088": "true",
|
|
"V-214089": "true",
|
|
"V-214090": "true",
|
|
"V-214091": "true",
|
|
"V-214092": "true",
|
|
"V-214093": "true",
|
|
"V-214094": "true",
|
|
"V-214095": "true",
|
|
"V-214096": "true",
|
|
"V-214097": "true",
|
|
"V-214098": "true",
|
|
"V-214099": "true",
|
|
"V-214100": "true",
|
|
"V-214101": "true",
|
|
"V-214102": "true",
|
|
"V-214103": "true",
|
|
"V-214104": "true",
|
|
"V-214105": "true",
|
|
"V-214106": "true",
|
|
"V-214107": "true",
|
|
"V-214108": "true",
|
|
"V-214109": "true",
|
|
"V-214110": "true",
|
|
"V-214111": "true",
|
|
"V-214112": "true",
|
|
"V-214113": "true",
|
|
"V-214114": "true",
|
|
"V-214115": "true",
|
|
"V-214116": "true",
|
|
"V-214117": "true",
|
|
"V-214119": "true",
|
|
"V-214120": "true",
|
|
"V-214121": "true",
|
|
"V-214122": "true",
|
|
"V-214123": "true",
|
|
"V-214124": "true",
|
|
"V-214125": "true",
|
|
"V-214126": "true",
|
|
"V-214127": "true",
|
|
"V-214128": "true",
|
|
"V-214129": "true",
|
|
"V-214130": "true",
|
|
"V-214131": "true",
|
|
"V-214132": "true",
|
|
"V-214133": "true",
|
|
"V-214134": "true",
|
|
"V-214135": "true",
|
|
"V-214136": "true",
|
|
"V-214137": "true",
|
|
"V-214138": "true",
|
|
"V-214139": "true",
|
|
"V-214140": "true",
|
|
"V-214141": "true",
|
|
"V-214142": "true",
|
|
"V-214143": "true",
|
|
"V-214144": "true",
|
|
"V-214145": "true",
|
|
"V-214146": "true",
|
|
"V-214147": "true",
|
|
"V-214148": "true",
|
|
"V-214149": "true",
|
|
"V-214150": "true",
|
|
"V-214151": "true",
|
|
"V-214152": "true",
|
|
"V-214153": "true",
|
|
"V-214154": "true",
|
|
"V-214155": "true",
|
|
"V-214156": "true",
|
|
"V-214157": "true",
|
|
"V-220321": "true"
|
|
},
|
|
"id": "MAC-2_Classified",
|
|
"title": "II - Mission Support Classified"
|
|
},
|
|
"MAC-2_Public": {
|
|
"description": "<ProfileDescription></ProfileDescription>",
|
|
"findings": {
|
|
"V-214048": "true",
|
|
"V-214049": "true",
|
|
"V-214050": "true",
|
|
"V-214051": "true",
|
|
"V-214052": "true",
|
|
"V-214053": "true",
|
|
"V-214054": "true",
|
|
"V-214055": "true",
|
|
"V-214056": "true",
|
|
"V-214057": "true",
|
|
"V-214058": "true",
|
|
"V-214059": "true",
|
|
"V-214060": "true",
|
|
"V-214061": "true",
|
|
"V-214062": "true",
|
|
"V-214063": "true",
|
|
"V-214064": "true",
|
|
"V-214065": "true",
|
|
"V-214066": "true",
|
|
"V-214067": "true",
|
|
"V-214068": "true",
|
|
"V-214069": "true",
|
|
"V-214070": "true",
|
|
"V-214071": "true",
|
|
"V-214072": "true",
|
|
"V-214073": "true",
|
|
"V-214074": "true",
|
|
"V-214075": "true",
|
|
"V-214076": "true",
|
|
"V-214077": "true",
|
|
"V-214078": "true",
|
|
"V-214079": "true",
|
|
"V-214080": "true",
|
|
"V-214081": "true",
|
|
"V-214082": "true",
|
|
"V-214083": "true",
|
|
"V-214084": "true",
|
|
"V-214085": "true",
|
|
"V-214086": "true",
|
|
"V-214087": "true",
|
|
"V-214088": "true",
|
|
"V-214089": "true",
|
|
"V-214090": "true",
|
|
"V-214091": "true",
|
|
"V-214092": "true",
|
|
"V-214093": "true",
|
|
"V-214094": "true",
|
|
"V-214095": "true",
|
|
"V-214096": "true",
|
|
"V-214097": "true",
|
|
"V-214098": "true",
|
|
"V-214099": "true",
|
|
"V-214100": "true",
|
|
"V-214101": "true",
|
|
"V-214102": "true",
|
|
"V-214103": "true",
|
|
"V-214104": "true",
|
|
"V-214105": "true",
|
|
"V-214106": "true",
|
|
"V-214107": "true",
|
|
"V-214108": "true",
|
|
"V-214109": "true",
|
|
"V-214110": "true",
|
|
"V-214111": "true",
|
|
"V-214112": "true",
|
|
"V-214113": "true",
|
|
"V-214114": "true",
|
|
"V-214115": "true",
|
|
"V-214116": "true",
|
|
"V-214117": "true",
|
|
"V-214119": "true",
|
|
"V-214120": "true",
|
|
"V-214121": "true",
|
|
"V-214122": "true",
|
|
"V-214123": "true",
|
|
"V-214124": "true",
|
|
"V-214125": "true",
|
|
"V-214126": "true",
|
|
"V-214127": "true",
|
|
"V-214128": "true",
|
|
"V-214129": "true",
|
|
"V-214130": "true",
|
|
"V-214131": "true",
|
|
"V-214132": "true",
|
|
"V-214133": "true",
|
|
"V-214134": "true",
|
|
"V-214135": "true",
|
|
"V-214136": "true",
|
|
"V-214137": "true",
|
|
"V-214138": "true",
|
|
"V-214139": "true",
|
|
"V-214140": "true",
|
|
"V-214141": "true",
|
|
"V-214142": "true",
|
|
"V-214143": "true",
|
|
"V-214144": "true",
|
|
"V-214145": "true",
|
|
"V-214146": "true",
|
|
"V-214147": "true",
|
|
"V-214148": "true",
|
|
"V-214149": "true",
|
|
"V-214150": "true",
|
|
"V-214151": "true",
|
|
"V-214152": "true",
|
|
"V-214153": "true",
|
|
"V-214154": "true",
|
|
"V-214155": "true",
|
|
"V-214156": "true",
|
|
"V-214157": "true",
|
|
"V-220321": "true"
|
|
},
|
|
"id": "MAC-2_Public",
|
|
"title": "II - Mission Support Public"
|
|
},
|
|
"MAC-2_Sensitive": {
|
|
"description": "<ProfileDescription></ProfileDescription>",
|
|
"findings": {
|
|
"V-214048": "true",
|
|
"V-214049": "true",
|
|
"V-214050": "true",
|
|
"V-214051": "true",
|
|
"V-214052": "true",
|
|
"V-214053": "true",
|
|
"V-214054": "true",
|
|
"V-214055": "true",
|
|
"V-214056": "true",
|
|
"V-214057": "true",
|
|
"V-214058": "true",
|
|
"V-214059": "true",
|
|
"V-214060": "true",
|
|
"V-214061": "true",
|
|
"V-214062": "true",
|
|
"V-214063": "true",
|
|
"V-214064": "true",
|
|
"V-214065": "true",
|
|
"V-214066": "true",
|
|
"V-214067": "true",
|
|
"V-214068": "true",
|
|
"V-214069": "true",
|
|
"V-214070": "true",
|
|
"V-214071": "true",
|
|
"V-214072": "true",
|
|
"V-214073": "true",
|
|
"V-214074": "true",
|
|
"V-214075": "true",
|
|
"V-214076": "true",
|
|
"V-214077": "true",
|
|
"V-214078": "true",
|
|
"V-214079": "true",
|
|
"V-214080": "true",
|
|
"V-214081": "true",
|
|
"V-214082": "true",
|
|
"V-214083": "true",
|
|
"V-214084": "true",
|
|
"V-214085": "true",
|
|
"V-214086": "true",
|
|
"V-214087": "true",
|
|
"V-214088": "true",
|
|
"V-214089": "true",
|
|
"V-214090": "true",
|
|
"V-214091": "true",
|
|
"V-214092": "true",
|
|
"V-214093": "true",
|
|
"V-214094": "true",
|
|
"V-214095": "true",
|
|
"V-214096": "true",
|
|
"V-214097": "true",
|
|
"V-214098": "true",
|
|
"V-214099": "true",
|
|
"V-214100": "true",
|
|
"V-214101": "true",
|
|
"V-214102": "true",
|
|
"V-214103": "true",
|
|
"V-214104": "true",
|
|
"V-214105": "true",
|
|
"V-214106": "true",
|
|
"V-214107": "true",
|
|
"V-214108": "true",
|
|
"V-214109": "true",
|
|
"V-214110": "true",
|
|
"V-214111": "true",
|
|
"V-214112": "true",
|
|
"V-214113": "true",
|
|
"V-214114": "true",
|
|
"V-214115": "true",
|
|
"V-214116": "true",
|
|
"V-214117": "true",
|
|
"V-214119": "true",
|
|
"V-214120": "true",
|
|
"V-214121": "true",
|
|
"V-214122": "true",
|
|
"V-214123": "true",
|
|
"V-214124": "true",
|
|
"V-214125": "true",
|
|
"V-214126": "true",
|
|
"V-214127": "true",
|
|
"V-214128": "true",
|
|
"V-214129": "true",
|
|
"V-214130": "true",
|
|
"V-214131": "true",
|
|
"V-214132": "true",
|
|
"V-214133": "true",
|
|
"V-214134": "true",
|
|
"V-214135": "true",
|
|
"V-214136": "true",
|
|
"V-214137": "true",
|
|
"V-214138": "true",
|
|
"V-214139": "true",
|
|
"V-214140": "true",
|
|
"V-214141": "true",
|
|
"V-214142": "true",
|
|
"V-214143": "true",
|
|
"V-214144": "true",
|
|
"V-214145": "true",
|
|
"V-214146": "true",
|
|
"V-214147": "true",
|
|
"V-214148": "true",
|
|
"V-214149": "true",
|
|
"V-214150": "true",
|
|
"V-214151": "true",
|
|
"V-214152": "true",
|
|
"V-214153": "true",
|
|
"V-214154": "true",
|
|
"V-214155": "true",
|
|
"V-214156": "true",
|
|
"V-214157": "true",
|
|
"V-220321": "true"
|
|
},
|
|
"id": "MAC-2_Sensitive",
|
|
"title": "II - Mission Support Sensitive"
|
|
},
|
|
"MAC-3_Classified": {
|
|
"description": "<ProfileDescription></ProfileDescription>",
|
|
"findings": {
|
|
"V-214048": "true",
|
|
"V-214049": "true",
|
|
"V-214050": "true",
|
|
"V-214051": "true",
|
|
"V-214052": "true",
|
|
"V-214053": "true",
|
|
"V-214054": "true",
|
|
"V-214055": "true",
|
|
"V-214056": "true",
|
|
"V-214057": "true",
|
|
"V-214058": "true",
|
|
"V-214059": "true",
|
|
"V-214060": "true",
|
|
"V-214061": "true",
|
|
"V-214062": "true",
|
|
"V-214063": "true",
|
|
"V-214064": "true",
|
|
"V-214065": "true",
|
|
"V-214066": "true",
|
|
"V-214067": "true",
|
|
"V-214068": "true",
|
|
"V-214069": "true",
|
|
"V-214070": "true",
|
|
"V-214071": "true",
|
|
"V-214072": "true",
|
|
"V-214073": "true",
|
|
"V-214074": "true",
|
|
"V-214075": "true",
|
|
"V-214076": "true",
|
|
"V-214077": "true",
|
|
"V-214078": "true",
|
|
"V-214079": "true",
|
|
"V-214080": "true",
|
|
"V-214081": "true",
|
|
"V-214082": "true",
|
|
"V-214083": "true",
|
|
"V-214084": "true",
|
|
"V-214085": "true",
|
|
"V-214086": "true",
|
|
"V-214087": "true",
|
|
"V-214088": "true",
|
|
"V-214089": "true",
|
|
"V-214090": "true",
|
|
"V-214091": "true",
|
|
"V-214092": "true",
|
|
"V-214093": "true",
|
|
"V-214094": "true",
|
|
"V-214095": "true",
|
|
"V-214096": "true",
|
|
"V-214097": "true",
|
|
"V-214098": "true",
|
|
"V-214099": "true",
|
|
"V-214100": "true",
|
|
"V-214101": "true",
|
|
"V-214102": "true",
|
|
"V-214103": "true",
|
|
"V-214104": "true",
|
|
"V-214105": "true",
|
|
"V-214106": "true",
|
|
"V-214107": "true",
|
|
"V-214108": "true",
|
|
"V-214109": "true",
|
|
"V-214110": "true",
|
|
"V-214111": "true",
|
|
"V-214112": "true",
|
|
"V-214113": "true",
|
|
"V-214114": "true",
|
|
"V-214115": "true",
|
|
"V-214116": "true",
|
|
"V-214117": "true",
|
|
"V-214119": "true",
|
|
"V-214120": "true",
|
|
"V-214121": "true",
|
|
"V-214122": "true",
|
|
"V-214123": "true",
|
|
"V-214124": "true",
|
|
"V-214125": "true",
|
|
"V-214126": "true",
|
|
"V-214127": "true",
|
|
"V-214128": "true",
|
|
"V-214129": "true",
|
|
"V-214130": "true",
|
|
"V-214131": "true",
|
|
"V-214132": "true",
|
|
"V-214133": "true",
|
|
"V-214134": "true",
|
|
"V-214135": "true",
|
|
"V-214136": "true",
|
|
"V-214137": "true",
|
|
"V-214138": "true",
|
|
"V-214139": "true",
|
|
"V-214140": "true",
|
|
"V-214141": "true",
|
|
"V-214142": "true",
|
|
"V-214143": "true",
|
|
"V-214144": "true",
|
|
"V-214145": "true",
|
|
"V-214146": "true",
|
|
"V-214147": "true",
|
|
"V-214148": "true",
|
|
"V-214149": "true",
|
|
"V-214150": "true",
|
|
"V-214151": "true",
|
|
"V-214152": "true",
|
|
"V-214153": "true",
|
|
"V-214154": "true",
|
|
"V-214155": "true",
|
|
"V-214156": "true",
|
|
"V-214157": "true",
|
|
"V-220321": "true"
|
|
},
|
|
"id": "MAC-3_Classified",
|
|
"title": "III - Administrative Classified"
|
|
},
|
|
"MAC-3_Public": {
|
|
"description": "<ProfileDescription></ProfileDescription>",
|
|
"findings": {
|
|
"V-214048": "true",
|
|
"V-214049": "true",
|
|
"V-214050": "true",
|
|
"V-214051": "true",
|
|
"V-214052": "true",
|
|
"V-214053": "true",
|
|
"V-214054": "true",
|
|
"V-214055": "true",
|
|
"V-214056": "true",
|
|
"V-214057": "true",
|
|
"V-214058": "true",
|
|
"V-214059": "true",
|
|
"V-214060": "true",
|
|
"V-214061": "true",
|
|
"V-214062": "true",
|
|
"V-214063": "true",
|
|
"V-214064": "true",
|
|
"V-214065": "true",
|
|
"V-214066": "true",
|
|
"V-214067": "true",
|
|
"V-214068": "true",
|
|
"V-214069": "true",
|
|
"V-214070": "true",
|
|
"V-214071": "true",
|
|
"V-214072": "true",
|
|
"V-214073": "true",
|
|
"V-214074": "true",
|
|
"V-214075": "true",
|
|
"V-214076": "true",
|
|
"V-214077": "true",
|
|
"V-214078": "true",
|
|
"V-214079": "true",
|
|
"V-214080": "true",
|
|
"V-214081": "true",
|
|
"V-214082": "true",
|
|
"V-214083": "true",
|
|
"V-214084": "true",
|
|
"V-214085": "true",
|
|
"V-214086": "true",
|
|
"V-214087": "true",
|
|
"V-214088": "true",
|
|
"V-214089": "true",
|
|
"V-214090": "true",
|
|
"V-214091": "true",
|
|
"V-214092": "true",
|
|
"V-214093": "true",
|
|
"V-214094": "true",
|
|
"V-214095": "true",
|
|
"V-214096": "true",
|
|
"V-214097": "true",
|
|
"V-214098": "true",
|
|
"V-214099": "true",
|
|
"V-214100": "true",
|
|
"V-214101": "true",
|
|
"V-214102": "true",
|
|
"V-214103": "true",
|
|
"V-214104": "true",
|
|
"V-214105": "true",
|
|
"V-214106": "true",
|
|
"V-214107": "true",
|
|
"V-214108": "true",
|
|
"V-214109": "true",
|
|
"V-214110": "true",
|
|
"V-214111": "true",
|
|
"V-214112": "true",
|
|
"V-214113": "true",
|
|
"V-214114": "true",
|
|
"V-214115": "true",
|
|
"V-214116": "true",
|
|
"V-214117": "true",
|
|
"V-214119": "true",
|
|
"V-214120": "true",
|
|
"V-214121": "true",
|
|
"V-214122": "true",
|
|
"V-214123": "true",
|
|
"V-214124": "true",
|
|
"V-214125": "true",
|
|
"V-214126": "true",
|
|
"V-214127": "true",
|
|
"V-214128": "true",
|
|
"V-214129": "true",
|
|
"V-214130": "true",
|
|
"V-214131": "true",
|
|
"V-214132": "true",
|
|
"V-214133": "true",
|
|
"V-214134": "true",
|
|
"V-214135": "true",
|
|
"V-214136": "true",
|
|
"V-214137": "true",
|
|
"V-214138": "true",
|
|
"V-214139": "true",
|
|
"V-214140": "true",
|
|
"V-214141": "true",
|
|
"V-214142": "true",
|
|
"V-214143": "true",
|
|
"V-214144": "true",
|
|
"V-214145": "true",
|
|
"V-214146": "true",
|
|
"V-214147": "true",
|
|
"V-214148": "true",
|
|
"V-214149": "true",
|
|
"V-214150": "true",
|
|
"V-214151": "true",
|
|
"V-214152": "true",
|
|
"V-214153": "true",
|
|
"V-214154": "true",
|
|
"V-214155": "true",
|
|
"V-214156": "true",
|
|
"V-214157": "true",
|
|
"V-220321": "true"
|
|
},
|
|
"id": "MAC-3_Public",
|
|
"title": "III - Administrative Public"
|
|
},
|
|
"MAC-3_Sensitive": {
|
|
"description": "<ProfileDescription></ProfileDescription>",
|
|
"findings": {
|
|
"V-214048": "true",
|
|
"V-214049": "true",
|
|
"V-214050": "true",
|
|
"V-214051": "true",
|
|
"V-214052": "true",
|
|
"V-214053": "true",
|
|
"V-214054": "true",
|
|
"V-214055": "true",
|
|
"V-214056": "true",
|
|
"V-214057": "true",
|
|
"V-214058": "true",
|
|
"V-214059": "true",
|
|
"V-214060": "true",
|
|
"V-214061": "true",
|
|
"V-214062": "true",
|
|
"V-214063": "true",
|
|
"V-214064": "true",
|
|
"V-214065": "true",
|
|
"V-214066": "true",
|
|
"V-214067": "true",
|
|
"V-214068": "true",
|
|
"V-214069": "true",
|
|
"V-214070": "true",
|
|
"V-214071": "true",
|
|
"V-214072": "true",
|
|
"V-214073": "true",
|
|
"V-214074": "true",
|
|
"V-214075": "true",
|
|
"V-214076": "true",
|
|
"V-214077": "true",
|
|
"V-214078": "true",
|
|
"V-214079": "true",
|
|
"V-214080": "true",
|
|
"V-214081": "true",
|
|
"V-214082": "true",
|
|
"V-214083": "true",
|
|
"V-214084": "true",
|
|
"V-214085": "true",
|
|
"V-214086": "true",
|
|
"V-214087": "true",
|
|
"V-214088": "true",
|
|
"V-214089": "true",
|
|
"V-214090": "true",
|
|
"V-214091": "true",
|
|
"V-214092": "true",
|
|
"V-214093": "true",
|
|
"V-214094": "true",
|
|
"V-214095": "true",
|
|
"V-214096": "true",
|
|
"V-214097": "true",
|
|
"V-214098": "true",
|
|
"V-214099": "true",
|
|
"V-214100": "true",
|
|
"V-214101": "true",
|
|
"V-214102": "true",
|
|
"V-214103": "true",
|
|
"V-214104": "true",
|
|
"V-214105": "true",
|
|
"V-214106": "true",
|
|
"V-214107": "true",
|
|
"V-214108": "true",
|
|
"V-214109": "true",
|
|
"V-214110": "true",
|
|
"V-214111": "true",
|
|
"V-214112": "true",
|
|
"V-214113": "true",
|
|
"V-214114": "true",
|
|
"V-214115": "true",
|
|
"V-214116": "true",
|
|
"V-214117": "true",
|
|
"V-214119": "true",
|
|
"V-214120": "true",
|
|
"V-214121": "true",
|
|
"V-214122": "true",
|
|
"V-214123": "true",
|
|
"V-214124": "true",
|
|
"V-214125": "true",
|
|
"V-214126": "true",
|
|
"V-214127": "true",
|
|
"V-214128": "true",
|
|
"V-214129": "true",
|
|
"V-214130": "true",
|
|
"V-214131": "true",
|
|
"V-214132": "true",
|
|
"V-214133": "true",
|
|
"V-214134": "true",
|
|
"V-214135": "true",
|
|
"V-214136": "true",
|
|
"V-214137": "true",
|
|
"V-214138": "true",
|
|
"V-214139": "true",
|
|
"V-214140": "true",
|
|
"V-214141": "true",
|
|
"V-214142": "true",
|
|
"V-214143": "true",
|
|
"V-214144": "true",
|
|
"V-214145": "true",
|
|
"V-214146": "true",
|
|
"V-214147": "true",
|
|
"V-214148": "true",
|
|
"V-214149": "true",
|
|
"V-214150": "true",
|
|
"V-214151": "true",
|
|
"V-214152": "true",
|
|
"V-214153": "true",
|
|
"V-214154": "true",
|
|
"V-214155": "true",
|
|
"V-214156": "true",
|
|
"V-214157": "true",
|
|
"V-220321": "true"
|
|
},
|
|
"id": "MAC-3_Sensitive",
|
|
"title": "III - Administrative Sensitive"
|
|
}
|
|
},
|
|
"slug": "postgresql_9.x",
|
|
"title": "PostgreSQL 9.x Security Technical Implementation Guide",
|
|
"version": "2"
|
|
}
|
|
}
|