{"stig":{"title":"EnterpriseDB Postgres Advanced Server (EPAS) Security Technical Implementation Guide","version":"2","release":"1"},"checks":[{"vulnId":"V-259210","ruleId":"SV-259210r960735_rule","severity":"medium","ruleTitle":"The EDB Postgres Advanced Server must limit the number of concurrent sessions to an organization-defined number per user for all accounts and/or account types.","description":"Database management includes the ability to control the number of users and user sessions utilizing a DBMS. Unlimited concurrent connections to the DBMS could allow a successful Denial of Service (DoS) attack by exhausting connection resources; and a system can also fail or be degraded by an overload of legitimate users. Limiting the number of concurrent sessions per user is helpful in reducing these risks.\n\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 the DBMS (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 the DBMS 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.)","checkContent":"Determine whether the system documentation specifies limits on the number of concurrent DBMS sessions per account by type of user. If it does not, assume a limit of 10 for database administrators and 2 for all other users.\n\nExecute the following as the \"enterprisedb\" operating system user:\n\n> psql edb -c \"SELECT rolname, rolconnlimit FROM pg_roles where rolname not like 'pg_%' and rolname not like 'aq_%'\"\n\nIf rolconnlimit is -1 or larger than the system documentation limits for any rolname, this is a finding.","fixText":"For any roles where rolconnlimit is -1 or larger than the system documentation limits, execute the following SQL as the \"enterprisedb\" operating system user:\n\n> psql edb -c \"ALTER USER <username> WITH CONNECTION LIMIT <limit number> \"","ccis":["CCI-000054"]},{"vulnId":"V-259211","ruleId":"SV-259211r960768_rule","severity":"high","ruleTitle":"The EDB Postgres Advanced Server must integrate with an organization-level authentication/access mechanism providing account management and automation for all users, groups, roles, and any other principals.","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 noncentralized 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\nThe DBMS must be configured to automatically use organization-level account management functions, and these functions must immediately enforce the organization's current account policy.\n\nAutomation may comprise differing technologies that when placed together contain an overall mechanism supporting an organization's automated account management requirements.","checkContent":"Verify that pg_hba.conf is not using: \"trust\", \"md5\", or \"password\" as allowable access methods.\n\n> cat <path-to-PGDATA-directory>/pg_hba.conf | egrep -I \"trust|md5|password\"| grep -v \"^\\#\"\nNOTE: A command line text editor such as VIM or EMACS can also be used to search for \"MD5\".\nThe default path for PGDATA is /var/lib/edb/as<version>/data, but this will vary according to local circumstances.\n\nIf any output is produced, verify the users are documented as being authorized to use one of these access methods.\n\nIf the users are not authorized to use these access methods, this is a finding.","fixText":"Identify any user that is using \"trust\", \"md5\", or \"password\" as allowable access methods.\n\n> cat <path-to-PGDATA-directory>/pg_hba.conf | egrep -I \"trust|md5|password\"| grep -v \"^\\#\"\nNOTE: A command line text editor such as VIM or EMACS can also be used such as VIM or EMACS to search for \"MD5\". \nThe default path for PGDATA is /var/lib/edb/as<version>/data, but this will vary according to local circumstances.\n\nDocument any rows that have \"trust\", \"md5\", or \"password\" specified for the \"METHOD\" column and obtain appropriate approval for each user specified in the \"USER\" column (i.e., all DBMS managed accounts).\n\nFor any users that are not documented and approved as DBMS managed accounts, change the \"METHOD\" column to one of the externally managed (not \"trust\", \"md5\", or \"password\") options defined here: https://www.postgresql.org/docs/current/auth-methods.html\n\nUse a command line text editor such as VIM or EMACS to make changes. Example: > vim  <path-to-PGDATA-directory>/pg_hba.conf","ccis":["CCI-000015"]},{"vulnId":"V-259212","ruleId":"SV-259212r960792_rule","severity":"high","ruleTitle":"The EDB Postgres Advanced Server must enforce approved authorizations for logical access to information and system resources in accordance with applicable access control policies.","description":"Authentication with a DOD-approved PKI certificate does not necessarily imply authorization to access the DBMS. 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 the DBMS 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.","checkContent":"Review the system security plan or equivalent documentation to determine the allowed permissions on database objects for each database role or user as well as the database authentication methods that are allowed for each role or user. If this documentation is missing, this is a finding.\n\nReview the permissions in place for the EDB Postgres Advanced Server.\n\nFirst, check the privileges of all users and roles in the database by running the following command as the \"enterprisedb\" user:\n\n  > psql edb -c \"\\du\"\n\nIf any users or roles have privileges that exceed those that are documented, this is a finding.\n\nNext check the privileges that have been granted on the tables, views, and sequences in the database by running the following command as the \"enterprisedb\" operating system user:\n\n> psql edb -c \"\\dp\"\n\nIf the privileges assigned to these objects for any users or roles exceeds those that have been documented, this is a finding.\n\nNext, as the \"enterprisedb\" operating system user, run the following command to view the location of the pg_hba.conf file and review the authentication settings that are configured in that file.\n\n> psql edb -c \"SHOW hba_file\"\n> cat <output-path-to-file-from above>\n\nIf any entries do not match the documented authentication requirements, this is a finding.","fixText":"To determine current user access to database objects, run the following as the \"enterprisedb\" operating system user:\n\n> psql edb -c \"SELECT grantee, privilege_type, table_name FROM information_schema.role_table_grants WHERE grantee='<username>'\"\n\nUse GRANT, REVOKE, and ALTER statements to add and/or remove permissions on server-level securables, bringing them in line with the documented requirements.","ccis":["CCI-000213"]},{"vulnId":"V-259213","ruleId":"SV-259213r960864_rule","severity":"medium","ruleTitle":"The EDB Postgres Advanced Server must protect against a user falsely repudiating having performed organization-defined actions.","description":"Nonrepudiation 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\nNonrepudiation 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 the DBMS' audit tools to capture the necessary audit trail. Design and implementation also must ensure that applications pass individual user identification to the DBMS, even where the application connects to the DBMS with a standard, group account.","checkContent":"Execute the following SQL as the \"enterprisedb\" operating system user:\n\n> psql edb -c \"SHOW edb_audit\"\n \nIf the result is not \"csv\" or \"xml\", this is a finding.","fixText":"Execute the following SQL as the \"enterprisedb\" operating system user:\n\n> psql edb -c \"ALTER SYSTEM SET edb_audit = csv\"\n> psql edb -c \"SELECT pg_reload_conf()\"\n\nor\n\n> psql edb -c \"ALTER SYSTEM SET edb_audit = xml\"\n> psql edb -c \"SELECT pg_reload_conf()\"","ccis":["CCI-000166"]},{"vulnId":"V-259214","ruleId":"SV-259214r960879_rule","severity":"medium","ruleTitle":"The EDB Postgres Advanced Server must provide audit record generation capability for DOD-defined auditable events within all EDB Postgres Advanced Server/database components.","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 the DBMS (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 the DBMS 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\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\n(iii) All account creation, modification, disabling, and termination actions.\n\nOrganizations may define additional events requiring continuous or ad hoc auditing.","checkContent":"Execute the following SQL as the \"enterprisedb\" operating system user:\n\n> psql edb -c \"SHOW edb_audit\"\n \nIf the result is not \"csv\" or \"xml\", this is a finding.","fixText":"Execute the following SQL as the \"enterprisedb\" operating system user:\n\n> psql edb -c \"ALTER SYSTEM SET edb_audit = csv\"\n> psql edb -c \"SELECT pg_reload_conf()\"\n\nor\n\n> psql edb -c \"ALTER SYSTEM SET edb_audit = xml\"\n> psql edb -c \"SELECT pg_reload_conf()\"","ccis":["CCI-000169"]},{"vulnId":"V-259215","ruleId":"SV-259215r960882_rule","severity":"medium","ruleTitle":"The EDB Postgres Advanced Server must allow only the ISSM (or individuals or roles appointed by the ISSM) to select which auditable events are to be audited.","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.","checkContent":"Run the command \"ls -al postgresql*.conf\" to show file permissions. The default path for the postgresql*.conf files is /var/lib/edb/as<version>/data, but this will vary according to local circumstances.\n\nIf the files are not owned by enterprisedb (user)/enterprisedb (group) or do not have RW permission for the user only, this is a finding.","fixText":"Run these commands as the \"root\" user (or user with sudo privileges) from the EDB Postgres Advanced Server data (PGDATA) directory:\n\n> chown enterprisedb postgresql*.conf\n> chgrp enterprisedb postgresql*.conf\n> chmod 600 postgresql*.conf\n\nThe default path for the postgresql*.conf files is /var/lib/edb/as<version>/data (PGDATA), but this will vary according to local circumstances. Run these commands as the \"root\" user (or user with sudo privileges) from the EDB Postgres Advanced Server data (PGDATA) directory:\n\n> chown enterprisedb postgresql*.conf\n> chgrp enterprisedb postgresql*.conf\n> chmod 600 postgresql*.conf\n\nThe default path for the postgresql*.conf files is /var/lib/edb/as<version>/data (PGDATA), but this will vary according to local circumstances.","ccis":["CCI-000171"]},{"vulnId":"V-259216","ruleId":"SV-259216r960885_rule","severity":"medium","ruleTitle":"The EDB Postgres Advanced Server must generate audit records when privileges/permissions are retrieved.","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. DBMSs 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 the DBMS continually performs to determine if any and every action on the database is permitted.","checkContent":"Execute the following SQL as the \"enterprisedb\" operating system user:\n\n> psql edb -c \"SHOW edb_audit_statement\"\n\nIf the result is not \"all\" or if the current setting for this requirement has not been noted and approved by the organization in the system documentation, this is a finding.","fixText":"Execute the following SQL as the \"enterprisedb\" operating system user:\n\n> psql edb -c \"ALTER SYSTEM SET edb_audit_statement = 'all'\"\n> psql edb -c \"SELECT pg_reload_conf()\"\n\nor\n\nUpdate the system documentation to note the organizationally approved setting and corresponding justification of the setting for this requirement.","ccis":["CCI-000172"]},{"vulnId":"V-259217","ruleId":"SV-259217r960885_rule","severity":"medium","ruleTitle":"The EDB Postgres Advanced Server must generate audit records when unsuccessful attempts to retrieve privileges/permissions occur.","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. DBMSs 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 the DBMS 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.","checkContent":"Execute the following SQL as the \"enterprisedb\" operating system user:\n\n> psql edb -c \"SHOW edb_audit_statement\"\n\nIf the result is not \"all\" or if the current setting for this requirement has not been noted and approved by the organization in the system documentation, this is a finding.","fixText":"Execute the following SQL as the \"enterprisedb\" operating system user:\n\npsql edb -c \"ALTER SYSTEM SET edb_audit_statement = 'all'\"\npsql edb -c \"SELECT pg_reload_conf()\"\n\nor\n\nUpdate the system documentation to note the organizationally approved setting and corresponding justification of the setting for this requirement.","ccis":["CCI-000172"]},{"vulnId":"V-259218","ruleId":"SV-259218r960888_rule","severity":"medium","ruleTitle":"The EDB Postgres Advanced Server must initiate support of session auditing upon startup.","description":"Session auditing is for use when a user's activities are under investigation.\n\nTypically, this DBMS capability would be used in conjunction with comparable monitoring of a user's online session, involving other software components such as operating systems, web servers, and front-end user applications. The current requirement, however, deals specifically with the DBMS.\n\nTo be sure of capturing all activity during those periods when session auditing is in use, database auditing needs to be in operation for the whole time the DBMS is running.","checkContent":"Execute the following SQL as the \"enterprisedb\" operating system user:\n\n> psql edb -c \"SHOW edb_audit_statement\"\n\nIf the result is not \"all\" or if the current setting for this requirement has not been noted and approved by the organization in the system documentation, this is a finding.","fixText":"Execute the following SQL as the \"enterprisedb\" operating system user:\n\npsql edb -c \"ALTER SYSTEM SET edb_audit_statement = 'all'\"\npsql edb -c \"SELECT pg_reload_conf()\"\n\nor\n\nUpdate the system documentation to note the organizationally approved setting and corresponding justification of the setting for this requirement.","ccis":["CCI-001464"]},{"vulnId":"V-259219","ruleId":"SV-259219r960891_rule","severity":"medium","ruleTitle":"The EDB Postgres Advanced Server must produce audit records containing sufficient information to establish what type of events occurred.","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.","checkContent":"Execute the following SQL as the \"enterprisedb\" operating system user:\n\n> psql edb -c \"SHOW edb_audit_statement\"\n\nIf the result is not \"all\" or if the current setting for this requirement has not been noted and approved by the organization in the system documentation, this is a finding.","fixText":"Execute the following SQL as the \"enterprisedb\" operating system user:\n\n> psql edb -c \"ALTER SYSTEM SET edb_audit_statement = 'all'\"\n> psql edb -c \"SELECT pg_reload_conf()\"\n\nor\n\nUpdate the system documentation to note the organizationally approved setting and corresponding justification of the setting for this requirement.","ccis":["CCI-000130"]},{"vulnId":"V-259220","ruleId":"SV-259220r960894_rule","severity":"medium","ruleTitle":"The EDB Postgres Advanced Server must produce audit records containing time stamps to establish when the events occurred.","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.","checkContent":"Execute the following SQL as the \"enterprisedb\" operating system user:\n\n> psql edb -c \"SHOW edb_audit_statement\"\n\nIf the result is not \"all\" or if the current setting for this requirement has not been noted and approved by the organization in the system documentation, this is a finding.","fixText":"Execute the following SQL as the \"enterprisedb\" operating system user:\n\n> psql edb -c \"ALTER SYSTEM SET edb_audit_statement = 'all'\"\n> psql edb -c \"SELECT pg_reload_conf()\"\n\nor\n\nUpdate the system documentation to note the organizationally approved setting and corresponding justification of the setting for this requirement.","ccis":["CCI-000131"]},{"vulnId":"V-259221","ruleId":"SV-259221r960897_rule","severity":"medium","ruleTitle":"The EDB Postgres Advanced Server must produce audit records containing sufficient information to establish where the events occurred.","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.","checkContent":"Execute the following SQL as the \"enterprisedb\" operating system user:\n\n> psql edb -c \"SHOW edb_audit_statement\"\n\nIf the result is not \"all\" or if the current setting for this requirement has not been noted and approved by the organization in the system documentation, this is a finding.","fixText":"Execute the following SQL as the \"enterprisedb\" operating system user:\n\n> psql edb -c \"ALTER SYSTEM SET edb_audit_statement = 'all'\"\n> psql edb -c \"SELECT pg_reload_conf()\"\n\nor\n\nUpdate the system documentation to note the organizationally approved setting and corresponding justification of the setting for this requirement.","ccis":["CCI-000132"]},{"vulnId":"V-259222","ruleId":"SV-259222r960900_rule","severity":"medium","ruleTitle":"The EDB Postgres Advanced Server must produce audit records containing sufficient information to establish the sources (origins) of the events.","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.","checkContent":"Execute the following SQL as the \"enterprisedb\" operating system user:\n\n> psql edb -c \"SHOW edb_audit_statement\"\n\nIf the result is not \"all\" or if the current setting for this requirement has not been noted and approved by the organization in the system documentation, this is a finding.","fixText":"Execute the following SQL as the \"enterprisedb\" operating system user:\n\n> psql edb -c \"ALTER SYSTEM SET edb_audit_statement = 'all'\"\n> psql edb -c \"SELECT pg_reload_conf()\"\n\nor\n\nUpdate the system documentation to note the organizationally approved setting and corresponding justification of the setting for this requirement.","ccis":["CCI-000133"]},{"vulnId":"V-259223","ruleId":"SV-259223r960903_rule","severity":"medium","ruleTitle":"The EDB Postgres Advanced Server must produce audit records containing sufficient information to establish the outcome (success or failure) of the events.","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.","checkContent":"Execute the following SQL as the \"enterprisedb\" operating system user:\n\n> psql edb -c \"SHOW edb_audit_statement\"\n\nIf the result is not \"all\" or if the current setting for this requirement has not been noted and approved by the organization in the system documentation, this is a finding.","fixText":"Execute the following SQL as the \"enterprisedb\" operating system user:\n\n> psql edb -c \"ALTER SYSTEM SET edb_audit_statement = 'all'\"\n> psql edb -c \"SELECT pg_reload_conf()\"\n\nor\n\nUpdate the system documentation to note the organizationally approved setting and corresponding justification of the setting for this requirement.","ccis":["CCI-000134"]},{"vulnId":"V-259224","ruleId":"SV-259224r960906_rule","severity":"medium","ruleTitle":"The EDB Postgres Advanced Server must produce audit records containing sufficient information to establish the identity of any user/subject or process associated with the event.","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.","checkContent":"Execute the following SQL as the \"enterprisedb\" operating system user:\n\n> psql edb -c \"SHOW edb_audit_statement\"\n\nIf the result is not \"all\" or if the current setting for this requirement has not been noted and approved by the organization in the system documentation, this is a finding.","fixText":"Execute the following SQL as the \"enterprisedb\" operating system user:\n\n> psql edb -c \"ALTER SYSTEM SET edb_audit_statement = 'all'\"\n> psql edb -c \"SELECT pg_reload_conf()\"\n\nor\n\nUpdate the system documentation to note the organizationally approved setting and corresponding justification of the setting for this requirement.","ccis":["CCI-001487"]},{"vulnId":"V-259225","ruleId":"SV-259225r960909_rule","severity":"medium","ruleTitle":"The EDB Postgres Advanced Server must include additional, more detailed, organization-defined information in the audit records for audit events identified by type, location, or subject.","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 group users, 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 group account users.\n\nIn EnterpriseDB Postgres Advanced Server, the edb_audit_tag can be used to record additional information. This tag can be set to different values by different sessions (connections), and can be set to new values any number of times. How to recognize the conditions for producing such audit data has to be determined and coded for as part of application and database design.","checkContent":"Review the system documentation to identify what additional information the organization has determined necessary.\n\nCheck application and database design, 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 included in the audit records, this is a finding.","fixText":"Execute the following SQL to set additional detailed information for the audit records in the session:\n\nset edb_audit_tag = '<information>';\n\nReplace <information> with a character string holding the additional data that must be captured.\n\nTo set this in a trigger, an example is included below. Keep in mind that the edb_audit_tag is set for the life of the session, not just the life of the insert command:\n\nCREATE OR REPLACE FUNCTION add_audit_info()\n  RETURNS trigger AS\n$BODY\n$BEGIN\n  SET edb_audit_tag = '<information>'; \n  RETURN NEW;\nEND;\n$BODY\n$LANGUAGE plpgsql;\n\nCREATE TRIGGER add_audit_info_trigger\n  BEFORE INSERT\n  ON <table>\n  FOR EACH ROW\n  EXECUTE PROCEDURE add_audit_info();","ccis":["CCI-000135"]},{"vulnId":"V-259226","ruleId":"SV-259226r960915_rule","severity":"medium","ruleTitle":"The EDB Postgres Advanced Server must, by default, shut down upon audit failure, to include the unavailability of space for more audit log records; or must be configurable to shut down upon audit failure.","description":"It is critical that when the DBMS is at risk of failing to process audit logs as required, it take action to mitigate the failure. Audit processing failures include: software/hardware errors; failures in the audit capturing mechanisms; and audit storage capacity being reached or exceeded. Responses to audit failure depend upon the nature of the failure mode.\n\nWhen the need for system availability does not outweigh the need for a complete audit trail, the DBMS should shut down immediately, rolling back all in-flight transactions.\n\nSystems where audit trail completeness is paramount will most likely be at a lower MAC level than MAC I; the final determination is the prerogative of the application owner, subject to Authorizing Official concurrence. In any case, sufficient auditing resources must be allocated to avoid a shutdown in all but the most extreme situations.","checkContent":"If the application owner has determined that the need for system availability outweighs the need for a complete audit trail, this is not applicable.\n\nIf Postgres Enterprise Manager (PEM) is installed and configured to shut down the database when the audit log is full, this is not a finding.\n\nOtherwise, review the procedures, manual and/or automated, for monitoring the space used by audit trail(s) and for off-loading audit records to a centralized log management system.\n\nIf the procedures do not exist, this is a finding.\n\nIf the procedures exist, request evidence that they are followed. If the evidence indicates that the procedures are not followed, this is a finding.\n\nIf the procedures exist, inquire if the system has ever run out of audit trail space in the last two years or since the last system upgrade, whichever is more recent. If it has run out of space in this period, and the procedures have not been updated to compensate, this is a finding.","fixText":"Modify DBMS, OS, or third-party logging application settings to alert appropriate personnel when a specific percentage of log storage capacity is reached.\n\nIf PEM is in use, it may be configured to issue an alert, send an email to designated personnel, and shut down the EDB Postgres Advanced Server instance when the audit log mount point is at 99 percent full. Refer to the Supplemental Procedures document supplied with this STIG for guidance on configuring PEM alerts.","ccis":["CCI-000140"]},{"vulnId":"V-259227","ruleId":"SV-259227r960915_rule","severity":"medium","ruleTitle":"The EDB Postgres Advanced Server must be configurable to overwrite audit log records, oldest first (First-In-First-Out [FIFO]), in the event of unavailability of space for more audit log records.","description":"It is critical that when the DBMS is at risk of failing to process audit logs as required, it take action to mitigate the failure. Audit processing failures include: software/hardware errors; failures in the audit capturing mechanisms; and audit storage capacity being reached or exceeded. Responses to audit failure depend upon the nature of the failure mode.\n\nWhen availability is an overriding concern, approved actions in response to an audit failure are as follows:\n\n(i) If the failure was caused by the lack of audit record storage capacity, the DBMS must continue generating audit records, if possible (automatically restarting the audit service if necessary), overwriting the oldest audit records in a first-in-first-out manner.\n\n(ii) If audit records are sent to a centralized collection server and communication with this server is lost or the server fails, the DBMS must queue audit records locally until communication is restored or until the audit records are retrieved manually. Upon restoration of the connection to the centralized collection server, action should be taken to synchronize the local audit data with the collection server.\n\nSystems where availability is paramount will most likely be MAC I; the final determination is the prerogative of the application owner, subject to Authorizing Official concurrence. In any case, sufficient auditing resources must be allocated to avoid audit data loss in all but the most extreme situations.","checkContent":"If an externally managed and monitored partition or logical volume that can be grown dynamically is being used for logging, this is not a finding.\n\nIf EDB Postgres Advanced Server is auditing to a directory that is not being actively checked for availability of disk space, and if logrotate is not configured to rotate logs based on the size of the audit log directory with oldest logs being replaced by newest logs, this is a finding.","fixText":"Determine the max size of the audit log directory. This fix assumes that the audit log directory has a max size of 100MB. Divide the max size of the directory by 10 to determine the size of the log files for rotation. Perform the following steps to ensure that the audit log directory is never more than 90 percent full and new logs always replace the oldest logs:\n\n1. Add the following to the bottom of the /etc/logrotate.conf file:\n\n<path-to-PGDATA-directory>/edb_audit/audit.csv {\nsize 10M\ndateext\ndateformat .%Y-%m-%d.%s\ncopytruncate\nrotate 8\n}\n\nThe default path for the EDB Postgres Advanced Server data directory [PGDATA] is /var/lib/edb/as<version>/data, but this will vary according to local circumstances.\n\n2. Create the file /etc/cron.hourly/logrotate with these contents:\n\n#!/bin/sh\n/usr/sbin/logrotate /etc/logrotate.conf\nEXITVALUE=$?\nif [ $EXITVALUE != 0 ]; then\n/usr/bin/logger -t logrotate \"ALERT exited abnormally with [$EXITVALUE]\"\nfi\nexit 0\n\n3. Issue these SQL statements:\n\nALTER SYSTEM SET edb_audit_filename = 'audit';\nSELECT pg_reload_conf();","ccis":["CCI-000140"]},{"vulnId":"V-259228","ruleId":"SV-259228r960930_rule","severity":"medium","ruleTitle":"The audit information produced by the EDB Postgres Advanced Server must be protected from unauthorized read access.","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.","checkContent":"Verify User ownership, Group ownership, and permissions on the \"edb_audit\" directory:\n\n> ls -ld <path-to-data-directory>/edb_audit\n\nIf the User owner is not \"enterprisedb\", this is a finding.\nIf the Group owner is not \"enterprisedb\", this is a finding.\nIf the directory is more permissive than 700, this is a finding.\n\nThe default path for the edb_audit directory is /var/lib/edb/as<version>/data (PGDATA), but this will vary according to local circumstances.","fixText":"Run these commands as the \"root\" user (or user with sudo privileges) from the EDB Postgres Advanced Server data (PGDATA) directory:\n\n> chown enterprisedb edb_audit\n> chgrp enterprisedb edb_audit\n> chmod 700 edb_audit\n\nThe default path for the edb_audit directory is /var/lib/edb/as<version>/data (PGDATA), but this will vary according to local circumstances.","ccis":["CCI-000162"]},{"vulnId":"V-259229","ruleId":"SV-259229r960933_rule","severity":"medium","ruleTitle":"The audit information produced by the EDB Postgres Advanced Server must be protected from unauthorized modification.","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.","checkContent":"Verify User ownership, Group ownership, and permissions on the \"edb_audit\" directory:\n\n> ls -ld <path-to-data-directory>/edb_audit\n\nIf the User owner is not \"enterprisedb\", this is a finding.\nIf the Group owner is not \"enterprisedb\", this is a finding.\nIf the directory is more permissive than 700, this is a finding.\n\nThe default path for the edb_audit directory is /var/lib/edb/as<version>/data (PGDATA), but this will vary according to local circumstances.","fixText":"Run these commands as the \"root\" user (or user with sudo privileges) from the EDB Postgres Advanced Server data (PGDATA) directory:\n\n> chown enterprisedb edb_audit\n> chgrp enterprisedb edb_audit\n> chmod 700 edb_audit\n\nThe default path for the edb_audit directory is /var/lib/edb/as<version>/data (PGDATA), but this will vary according to local circumstances.","ccis":["CCI-000163"]},{"vulnId":"V-259230","ruleId":"SV-259230r960936_rule","severity":"medium","ruleTitle":"The audit information produced by the EDB Postgres Advanced Server must be protected from unauthorized deletion.","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.","checkContent":"Verify User ownership, Group ownership, and permissions on the \"edb_audit\" directory:\n\n> ls -ld <path-to-data-directory>/edb_audit\n\nIf the User owner is not \"enterprisedb\", this is a finding.\nIf the Group owner is not \"enterprisedb\", this is a finding.\nIf the directory is more permissive than 700, this is a finding.\n\nThe default path for the edb_audit directory is /var/lib/edb/as<version>/data (PGDATA), but this will vary according to local circumstances.","fixText":"Run these commands as the \"root\" user (or user with sudo privileges) from the EDB Postgres Advanced Server data (PGDATA) directory:\n\n> chown enterprisedb edb_audit\n> chgrp enterprisedb edb_audit\n> chmod 700 edb_audit\n\nThe default path for the edb_audit directory is /var/lib/edb/as<version>/data (PGDATA), but this will vary according to local circumstances.","ccis":["CCI-000164"]},{"vulnId":"V-259231","ruleId":"SV-259231r960939_rule","severity":"medium","ruleTitle":"The EDB Postgres Advanced Server must protect its audit features from unauthorized access.","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, they 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.","checkContent":"Verify User ownership, Group ownership, and permissions on the \"edb_audit\" directory:\n\n> ls -ld <path-to-data-directory>/edb_audit\n\nIf the User owner is not \"enterprisedb\", this is a finding.\nIf the Group owner is not \"enterprisedb\", this is a finding.\nIf the directory is more permissive than 700, this is a finding.\n\nThe default path for the edb_audit directory is /var/lib/edb/as<version>/data (PGDATA), but this will vary according to local circumstances.","fixText":"Run these commands as the \"root\" user (or user with sudo privileges) from the EDB Postgres Advanced Server data (PGDATA) directory:\n\n> chown enterprisedb edb_audit\n> chgrp enterprisedb edb_audit\n> chmod 700 edb_audit\n\nThe default path for the edb_audit directory is /var/lib/edb/as<version>/data (PGDATA), but this will vary according to local circumstances.","ccis":["CCI-001493"]},{"vulnId":"V-259232","ruleId":"SV-259232r960942_rule","severity":"medium","ruleTitle":"The EDB Postgres Advanced Server must protect its audit configuration from unauthorized modification.","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.","checkContent":"Verify User ownership, Group ownership, and permissions on the \"edb_audit\" directory:\n\n> ls -ld <path-to-data-directory>/edb_audit\n\nIf the User owner is not \"enterprisedb\", this is a finding\nIf the Group owner is not \"enterprisedb\", this is a finding.\nIf the directory is more permissive than 700, this is a finding.\n\nThe default path for the edb_audit directory is /var/lib/edb/as<version>/data (PGDATA), but this will vary according to local circumstances.","fixText":"Run these commands as the \"root\" user (or user with sudo privileges) from the EDB Postgres Advanced Server data (PGDATA) directory:\n\n> chown enterprisedb edb_audit\n> chgrp enterprisedb edb_audit\n> chmod 700 edb_audit\n\nThe default path for the edb_audit directory is /var/lib/edb/as<version>/data (PGDATA), but this will vary according to local circumstances.","ccis":["CCI-001494"]},{"vulnId":"V-259233","ruleId":"SV-259233r960945_rule","severity":"medium","ruleTitle":"The EDB Postgres Advanced Server must protect its audit features from unauthorized removal.","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.","checkContent":"Verify User ownership, Group ownership, and permissions on the \"edb_audit\" directory:\n\n> ls -ld <path-to-data-directory>/edb_audit\n\nIf the User owner is not \"enterprisedb\", this is a finding.\nIf the Group owner is not \"enterprisedb\", this is a finding.\nIf the directory is more permissive than 700, this is a finding.\n\nThe default path for the edb_audit directory is /var/lib/edb/as<version>/data (PGDATA), but this will vary according to local circumstances.","fixText":"Run these commands as the \"root\" user (or user with sudo privileges) from the EDB Postgres Advanced Server data (PGDATA) directory:\n\n> chown enterprisedb edb_audit\n> chgrp enterprisedb edb_audit\n> chmod 700 edb_audit\n\nThe default path for the edb_audit directory is /var/lib/edb/as<version>/data (PGDATA), but this will vary according to local circumstances.","ccis":["CCI-001495"]},{"vulnId":"V-259234","ruleId":"SV-259234r960960_rule","severity":"medium","ruleTitle":"Software, applications, and configuration files that are part of, or related to, the EDB Postgres Advanced Server installation must be monitored to discover unauthorized changes.","description":"If the system were to allow any user to make changes to software libraries, then 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. Monitoring is required for assurance that the protections are effective.\n\nUnmanaged changes that occur to the database software libraries or configuration can lead to unauthorized or compromised installations.","checkContent":"Review monitoring procedures and implementation evidence to verify monitoring of changes to database software libraries, related applications, and configuration files is done.\n\nVerify the list of files and directories being monitored is complete.\n\nIf monitoring does not occur or is not complete, this is a finding.","fixText":"Implement procedures to monitor for unauthorized changes to DBMS software libraries, related software application libraries, and configuration files. If a third-party automated tool is not employed, an automated job that reports file information on the directories and files of interest (including file permissions and sizes) and compares them to the baseline report for the same will meet the requirement.\n\nUse file hashes or checksums for comparisons, as file dates may be manipulated by malicious users.","ccis":["CCI-001499"]},{"vulnId":"V-259235","ruleId":"SV-259235r960960_rule","severity":"medium","ruleTitle":"EDB Postgres Advanced Server software modules, to include stored procedures, functions, and triggers must be monitored to discover unauthorized changes.","description":"If the system were to allow any user to make changes to software libraries, then 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. Monitoring is required for assurance that the protections are effective.\n\nUnmanaged changes that occur to the logic modules within the database can lead to unauthorized or compromised installations.","checkContent":"Check the EDB Postgres configuration for a timed job that automatically checks all system and user-defined procedures, functions, and triggers for being modified by running the following EDB Postgres query:\n\nselect job, what from ALL_JOBS;\n\nAdditionally, in Postgres Enterprise Manager, navigate to the \"Jobs\" node of the database and examine the job from there.\n\nIf a timed job or the relation \"ALL_JOBS\" does not exist, check if the EDB Audit utility has been enabled to capture these changes. As the \"enterprisedb\" operating system user, run the following command:\n\n> psql edb -c \"SHOW edb_audit_statement\"\n\nThe output should return \"all\".\n\nIf neither a timed job or some other method is not implemented to check for procedures, functions, and triggers being modified such as enabling EDB auditing, this is a finding.","fixText":"Configure an EDB Postgres timed job that automatically checks all system and user-defined procedures, functions, and triggers for being modified, and in the event of such changes informs the proper personnel for evaluation and possible action. Refer to the EDB documentation for further information on how to configure a job using the DBMS_JOB package: https://www.enterprisedb.com/docs/epas/latest/reference/oracle_compatibility_reference/epas_compat_bip_guide/03_built-in_packages/05_dbms_job/\n\nAlternatively, the EDB audit utility can capture these changes by enabling as follows: Execute the following SQL as the \"enterprisedb\" operating system user:\n\n> psql edb -c \"ALTER SYSTEM SET edb_audit_statement = 'all'\"\n> psql edb -c \"SELECT pg_reload_conf()\"","ccis":["CCI-001499"]},{"vulnId":"V-259236","ruleId":"SV-259236r960960_rule","severity":"high","ruleTitle":"The EDB Postgres Advanced Server software installation account must be restricted to authorized users.","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, then 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.","checkContent":"Review procedures for controlling, granting access to, and tracking use of the DBMS software installation account.\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.","fixText":"Develop, document, and implement procedures to restrict and track use of the DBMS software installation account.","ccis":["CCI-001499"]},{"vulnId":"V-259237","ruleId":"SV-259237r960960_rule","severity":"medium","ruleTitle":"Database software, including EDB Postgres Advanced Server configuration files, must be stored in dedicated directories, separate from the host OS and other applications.","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.","checkContent":"Review the DBMS software library directory and note other root directories located on the same disk directory or any subdirectories.\n\nIf any non-DBMS 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 DBMS, this is a finding.\n\nOnly applications that are required for the functioning and administration, not use, of the DBMS should be located in the same disk directory as the DBMS software libraries.\n\nIf other applications are located in the same directory as the DBMS, this is a finding.","fixText":"Install all applications on directories separate from the DBMS software library directory. Relocate any directories or reinstall other application software that currently shares the DBMS software library directory.","ccis":["CCI-001499"]},{"vulnId":"V-259238","ruleId":"SV-259238r960960_rule","severity":"medium","ruleTitle":"Database objects must be owned by database/EDB Postgres Advanced Server principals authorized for ownership.","description":"Database objects include but are not limited to tables, indexes, storage, stored procedures, functions, triggers, and links to software external to the EDB Postgres Advanced Server, etc.\n\nWithin 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 as 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.","checkContent":"Review system documentation to identify accounts authorized to own database objects. Review accounts that own objects in the database(s) by running the following SQL command as the \"enterprisedb\" user:\n\npsql edb -c \"SELECT * FROM sys.all_objects;\"\n\nIf any database objects are found to be owned by users not authorized to own database objects, this is a finding.","fixText":"Assign ownership of authorized objects to authorized object owner accounts by running the following SQL command for each object to be changed:\n\nALTER <type> <object name> OWNER TO <new owner>;\n\nFor example: ALTER TABLE my_table OWNER TO APP_USER;","ccis":["CCI-001499"]},{"vulnId":"V-259239","ruleId":"SV-259239r960960_rule","severity":"medium","ruleTitle":"The role(s)/group(s) used to modify database structure and logic modules must be restricted to authorized users.","description":"Database structures include but are not necessarily limited to tables, indexes, storage, etc.\n\nLogic modules are objects such as stored procedures, functions, triggers, and links to software external to the DBMS, etc.\n\nIf the DBMS were to allow any user to make changes to database structure or logic modules, then 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.","checkContent":"Use psql to connect to the database as enterprisedb and run this command:\n\n\\dp *.*\n\nIf any unauthorized roles have unauthorized accesses, this is a finding.\n\nDefinitions of the access privileges are defined here: \n\nhttp://www.postgresql.org/docs/current/static/sql-grant.html","fixText":"Revoke unauthorized privileges. The syntax is:\nREVOKE <privilege> ON <object> FROM <role>.\n\nExample: REVOKE INSERT ON mytable FROM PUBLIC;\n\nRefer to PostgreSQL documentation for details: https://www.postgresql.org/docs/current/sql-revoke.html","ccis":["CCI-001499"]},{"vulnId":"V-259240","ruleId":"SV-259240r960963_rule","severity":"medium","ruleTitle":"Default, demonstration and sample databases, database objects, and applications must be removed.","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 software products to provide, or install by default, functionality exceeding requirements or mission objectives. Examples include, but are not limited to, installing advertising software, demonstrations, or browser plugins not related to requirements or providing a wide array of functionality, not required for every mission, that cannot be disabled.\n\nDBMSs must adhere to the principles of least functionality by providing only essential capabilities.\n\nDemonstration and sample database objects and applications present publicly known attack points for malicious users. These demonstration and sample objects are meant to provide simple examples of coding specific functions and are not developed to prevent vulnerabilities from being introduced to the DBMS and host system.","checkContent":"Review vendor documentation and vendor websites for vendor-provided demonstration or sample databases, database applications, objects, and files.\n\nReview the DBMS to determine if any of the demonstration and sample databases, database applications, or files are installed in the database or are included with the DBMS application.\n\nIf any are present in the database or are included with the DBMS application, this is a finding.\n\nCheck for the existence of EDB Postgres sample databases: postgres and edb. Execute the following SQL as the \"enterprisedb\" operating system user:\n\npsql edb -c \"SELECT datname FROM pg_database WHERE datistemplate = false\"\n\nIf any databases are listed here that are not used by the application, this is a finding.\n\nNote: the \"postgres\" and \"edb\" databases are internal databases that are part of the EDB Postgres Advanced Server.","fixText":"Remove any unused databases from the DBMS. \n\nTo remove a database, execute the follow SQL as the enterprised user:\n\n> psql edb -c \"DROP DATABASE <database>\"\n\nor \n\n> dropdb <database_name>","ccis":["CCI-000381"]},{"vulnId":"V-259241","ruleId":"SV-259241r960963_rule","severity":"medium","ruleTitle":"Unused database components, EDB Postgres Advanced Server software, and database objects must be removed.","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 software products to provide, or install by default, functionality exceeding requirements or mission objectives.\n\nDBMSs must adhere to the principles of least functionality by providing only essential capabilities.","checkContent":"Review the list of components and features installed with the database.\n\nIf unused components are installed and are not documented and authorized, this is a finding.\n\nRPM can also be used to check what is installed:\n\n> yum list installed | grep edb-\n\nThis returns EDB database packages that have been installed. If any packages displayed by this command are not being used, this is a finding.","fixText":"Review the EDB Postgres Advanced Server packages available in the installation guide here: https://www.enterprisedb.com/docs/epas/<version number>/\n\nUninstall all packages that are not required by running the following as the \"root\" user:\n\n> yum erase -y <package-name>\n\nAt a minimum, the edb-as<version>-server-* packages are required. Additionally, other packages such as pem, jdbc, postgis, pgpool, and others may be required by applications that need the functionality provided in these additional packages.","ccis":["CCI-000381"]},{"vulnId":"V-259242","ruleId":"SV-259242r960963_rule","severity":"medium","ruleTitle":"Unused database components which are integrated in the EDB Postgres Advanced Server and cannot be uninstalled must be disabled.","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 software products to provide, or install by default, functionality exceeding requirements or mission objectives.\n\nDBMSs must adhere to the principles of least functionality by providing only essential capabilities.\n\nUnused, unnecessary DBMS components increase the attack vector for the DBMS 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/group permissions.","checkContent":"Run the following command as the \"root\" user:\n\n> yum list installed | grep edb-\n\nIf any packages are installed that are not required, this is a finding.","fixText":"Review the EDB Postgres Advanced Server packages available in the installation guide here: https://www.enterprisedb.com/docs/epas/<version number>/\n\nUninstall all packages that are not required by running the following as the \"root\" user:\n\n> yum erase -y <package-name>\n\nAt a minimum, the edb-as<version>-server-* packages are required. Additionally, other packages such as pem, jdbc, postgis, pgpool, and others may be required by applications that need the functionality provided in these additional packages.","ccis":["CCI-000381"]},{"vulnId":"V-259243","ruleId":"SV-259243r960963_rule","severity":"medium","ruleTitle":"Access to external executables must be disabled or restricted.","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\nDBMSs may spawn additional external processes to execute procedures that are defined in the DBMS 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 the DBMS and provide unauthorized access to the host system.","checkContent":"Run the following command as the \"root\" user:\n\n> yum list installed | grep edb-\n\nIf any packages are installed that are not required, this is a finding.","fixText":"Review the EDB Postgres Advanced Server packages available in the installation guide here: https://www.enterprisedb.com/docs/epas/<version number>/\n\nUninstall all packages that are not required by running the following as the \"root\" user:\n\n> yum erase -y <package-name>\n\nAt a minimum, the edb-as<version>-server-* packages are required. Additionally, other packages such as pem, jdbc, postgis, pgpool, and others may be required by applications that need the functionality provided in these additional packages.","ccis":["CCI-000381"]},{"vulnId":"V-259244","ruleId":"SV-259244r960966_rule","severity":"medium","ruleTitle":"The EDB Postgres Advanced Server 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.","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.","checkContent":"Execute the following SQL as the \"enterprisedb\" operating system user:\n\n> psql edb -c \"SHOW port\"\n> psql edb -c \"SHOW listen_addresses\"\n\nIf the port or addresses are not approved, this is a finding.","fixText":"Execute the following SQL as the \"enterprisedb\" operating system user:\n\n> psql edb -c \"ALTER SYSTEM SET port = <port number>\"\n> psql edb -c \"ALTER SYSTEM SET listen_addresses = '<addresses>'\"\n\nExecute the following operating system command as the \"root\" user:\n\n> systemctl restart edb-as-<version>\n\nNote: <version> is the major version of the EDB Postgres Advanced Server instance (e.g., 15).","ccis":["CCI-000382"]},{"vulnId":"V-259245","ruleId":"SV-259245r960969_rule","severity":"medium","ruleTitle":"The EDB Postgres Advanced Server must uniquely identify and authenticate organizational users (or processes acting on behalf of organizational users).","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\n(ii) Accesses that occur through authorized use of group authenticators without individual authentication. Organizations may require unique identification of individuals in group accounts (e.g., shared privilege accounts) or for detailed accountability of individual activity.","checkContent":"Open the \"pg_hba.conf\" file in a viewer or editor. The default path for the pg_hba.conf file is /var/lib/edb/as<version>/data (PGDATA), but this will vary according to local circumstances.\n\nIf any rows have \"trust\" specified for the \"METHOD\" column, this is a finding.","fixText":"Open the \"pg_hba.conf\" file in an editor. The default path for the pg_hba.conf file is /var/lib/edb/as<version>/data (PGDATA), but this will vary according to local circumstances.\n\nIf any rows have \"trust\" specified for the \"METHOD\" column, delete the rows or change them to other authentication methods.\n\nPermitted methods in preferred order are: peer (local only), cert, ldap, sspi, pam, and scram-sha-256.","ccis":["CCI-000764"]},{"vulnId":"V-259246","ruleId":"SV-259246r998212_rule","severity":"high","ruleTitle":"If DBMS authentication, using passwords, is employed, EDB Postgres Advanced Server must enforce the DOD standards for password complexity and lifetime.","description":"OS/enterprise authentication and identification must be used (SRG-APP-000023-DB-000001). Native DBMS authentication may be used only when circumstances make it unavoidable, and must be documented and Authorizing Official (AO)-approved.\n\nThe DOD standard for authentication is DOD-approved PKI certificates. Authentication 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, the DOD standards for password complexity and lifetime must be implemented. DBMS products that can inherit the rules for these from the operating system or access control program (e.g., Microsoft Active Directory) must be configured to do so. For other DBMSs, the rules must be enforced using available configuration parameters or custom code.","checkContent":"If DBMS authentication, using passwords, is not employed, this is not a finding.\n\nIn a SQL window, run this command:\n\nselect * from dba_profiles;\n\nIf there are UNLIMITED or NULL values in the \"limit\" column, this is a finding.\n\nReview the password verification functions specified for the PASSWORD_VERIFY_FUNCTION settings for each profile. Determine whether the following rules are enforced by the code in those functions. If any are not, this is a finding.\na. minimum of 15 characters, including at least one of each of the following character sets:\n- Uppercase\n- Lowercase\n- Numeric\n- Special characters (e.g., ~ ! @ # $ % ^ & * ( ) _ + = - ' [ ] / ? > <)\nb. Minimum number of characters changed from previous password: 50 percent of the minimum password length; that is, eight.\n\nReview the DBMS settings relating to password lifetime. Determine whether the following rules are enforced. If any are not, this is a finding.\na. Password lifetime limits for interactive accounts: minimum 24 hours, maximum 60 days.\nb. Password lifetime limits for noninteractive accounts: minimum 24 hours, maximum 365 days.\nc. Number of password changes before an old one may be reused: minimum of five.","fixText":"After creating a password verification function, configure the default profile to use it and the other required password related settings.\n\nTo facilitate checking that a new password is sufficiently different from a previously used one, the dod_verify_password function uses the Levenshtein function, which is available as part of the PostgreSQL fuzzystrmatch extension.\n\nBefore creating the password verification function, check whether the fuzzystrmatch extension is installed by executing the following SQL query as enterprisedb:\n\n SELECT extname FROM pg_extension;\n\nIf \"fuzzystrmatch\" is not listed, execute the following SQL to install the extension as enterprisedb:\n\n CREATE EXTENSION fuzzystrmatch;\n\nWith the fuzzystrmatch extension installed, execute the following SQL statements as enterprisedb:\n\n CREATE OR REPLACE FUNCTION sys.dod_verify_password(user_name varchar2, new_password varchar2, old_password varchar2) \n RETURN boolean IMMUTABLE \n IS \n pwd_length integer := NVL( length(new_password), 0 );\n\n min_length integer := 15;\n min_lower integer := 1;\n min_upper integer := 1;\n min_numeric integer := 1;\n min_special integer := 1;\n min_diff integer := ceil(min_length::numeric / 2);\n\n cnt_lower integer := 0;\n cnt_upper integer := 0;\n cnt_numeric integer := 0;\n cnt_special integer := 0;\n\n cnt_diff integer := 0;\n\n i integer ;\n curr_char CHAR(1);\n\n BEGIN\n\n --\n -- Check Length of new password\n --\n IF ( pwd_length < min_length ) \n THEN \n raise_application_error(-20001, 'Password is too short. Password must be at least '||min_length||' characters long.'); \n END IF;\n\n --\n -- Get count of each character type in new password.\n --\n FOR i in 1..pwd_length LOOP\n curr_char := substr(new_password, i, 1);\n\n IF ( curr_char SIMILAR TO '[a-z]' ) THEN\n cnt_lower := cnt_lower + 1;\n ELSIF ( curr_char SIMILAR TO '[A-Z]' ) THEN\n cnt_upper := cnt_upper + 1;\n ELSIF ( curr_char SIMILAR TO '[0-9]' ) THEN\n cnt_numeric := cnt_numeric + 1;\n ELSE\n cnt_special := cnt_special + 1;\n END IF;\n END LOOP;\n\n --\n -- Calculate Levenshtein difference between old and new password\n --\n cnt_diff := levenshtein( old_password, new_password );\n\n -- Check if new password has minimum number of lowercase characters\n IF cnt_lower < min_lower THEN\n raise_application_error(-20004, 'Password must contain at least '||min_lower||' lowercase character(s)'); \n END IF;\n\n -- Check if new password has minimum number of uppercase characters\n IF cnt_upper < min_upper THEN\n raise_application_error(-20003, 'Password must contain at least '||min_upper||' uppercase character(s)'); \n END IF;\n\n -- Check if new password has minimum number of numeric characters\n IF cnt_numeric < min_numeric THEN\n raise_application_error(-20005, 'Password must contain at least '||min_numeric||' numeric character(s)'); \n END IF;\n\n -- Check if new password has minimum number of special characters\n IF cnt_special < min_special THEN\n raise_application_error(-20006, 'Password must contain at least '||min_special||' special character(s)'); \n END IF;\n\n -- Check if new password differs from old password by minimum number of required characters\n IF cnt_diff < min_diff THEN\n raise_application_error(-20007, 'Password must differ from old password by at least '||min_diff||' character(s)'); \n END IF;\n\n\n RETURN true; \n END; \n\n ALTER FUNCTION sys.dod_verify_password(varchar2, varchar2, varchar2) OWNER TO enterprisedb;\n\nNext, execute the following statement (or a variant of this) to set the default profile for DOD standards:\n\n ALTER PROFILE DEFAULT LIMIT\n FAILED_LOGIN_ATTEMPTS 3 \n PASSWORD_LOCK_TIME 1\n PASSWORD_LIFE_TIME 60\n PASSWORD_GRACE_TIME 3\n PASSWORD_REUSE_TIME 180\n PASSWORD_REUSE_MAX 5\n PASSWORD_VERIFY_FUNCTION dod_verify_password;\n\nNote that the above statement assumes that the password verification function is named \"dod_verify_password\". If the function was created with a different name, update the ALTER PROFILE statement above as appropriate.","ccis":["CCI-004066"]},{"vulnId":"V-259247","ruleId":"SV-259247r998215_rule","severity":"high","ruleTitle":"If passwords are used for authentication, the EDB Postgres Advanced Server must store only hashed, salted representations of passwords.","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 Authorizing Official ( 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 the DBMS.","checkContent":"Execute the following SQL as the \"enterprisedb\" user:\n\nSHOW password_encryption;\n\nIf the value is not \"scram-sha-256\", this is a finding.","fixText":"Execute the following SQL as the \"enterprisedb\" user:\n\nALTER SYSTEM SET password_encryption = 'scram-sha-256';\nSELECT pg_reload_conf();","ccis":["CCI-004062"]},{"vulnId":"V-259248","ruleId":"SV-259248r961029_rule","severity":"high","ruleTitle":"If passwords are used for authentication, the EDB Postgres Advanced Server must transmit only encrypted representations of passwords.","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\nDBMS 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.","checkContent":"Open the \"pg_hba.conf\" file in a viewer or editor. The default path for the pg_hba.conf file is /var/lib/edb/as<version>/data (PGDATA), but this will vary according to local circumstances.\n\nIf any rows have TYPE of \"hostssl\" but do not include \"clientcert=1\" in the OPTIONS column at the end of the line, this is a finding.","fixText":"Open the \"pg_hba.conf\" file in an editor. The default path for the pg_hba.conf file is /var/lib/edb/as<version>/data (PGDATA), but this will vary according to local circumstances.\n\nFor any rows that have TYPE of \"hostssl\", append \"clientcert=1\" in the OPTIONS column at the end of the line.","ccis":["CCI-000197"]},{"vulnId":"V-259249","ruleId":"SV-259249r961038_rule","severity":"medium","ruleTitle":"The EDB Postgres Advanced Server, when utilizing PKI-based authentication, must validate certificates by performing RFC 5280-compliant certification path validation.","description":"The DOD standard for authentication is DOD-approved PKI certificates.\n\nA certificate's 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.","checkContent":"Open \"<postgresql data directory>/pg_hba.conf\" in a viewer or editor. The default path for the postgresql data directory is /var/lib/edb/as<version>/data (PGDATA), but this will vary according to local circumstances.\n\nIf any rows have TYPE of \"hostssl\" but do not include \"clientcert=1\" in the OPTIONS column at the end of the line, this is a finding.","fixText":"Open \"<postgresql data directory>/pg_hba.conf\" in an editor. The default path for the postgresql data directory is /var/lib/edb/as<version>/data (PGDATA), but this will vary according to local circumstances.\n\nFor any rows that have TYPE of \"hostssl\", append \"clientcert=1\" in the OPTIONS column at the end of the line.","ccis":["CCI-000185"]},{"vulnId":"V-259250","ruleId":"SV-259250r961041_rule","severity":"high","ruleTitle":"The EDB Postgres Advanced Server must enforce authorized access to all PKI private keys stored/used by the EDB Postgres Advanced Server.","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 the DBMS-stored private keys are used to authenticate the DBMS to the system's clients, loss of the corresponding private keys would allow an attacker to successfully perform undetected man-in-the-middle attacks against the DBMS system and its clients.\n\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 or 140-3 validated cryptographic modules.\n\nAll access to the private key(s) of the DBMS must be restricted to authorized and authenticated users. If unauthorized users have access to one or more of the DBMS'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.","checkContent":"Verify User ownership, Group ownership, and permissions on the \"server.key\" file:\n\n> ls -alL <postgresql data directory>/server.key\n\nIf the User owner is not \"enterprisedb\", this is a finding.\nIf the Group owner is not \"enterprisedb\", this is a finding.\nIf the file is more permissive than 600, this is a finding.\n\nThe default path for the postgresql data directory is /var/lib/edb/as<version>/data (PGDATA), but this will vary according to local circumstances.","fixText":"Run these commands:\n\n> chown enterprisedb <postgresql data directory>/server.key\"\n\n> chgrp enterprisedb <postgresql data directory>/server.key\n\n> chmod 600 <postgresql data directory>/server.key\n\nThe default path for the postgresql data directory is /var/lib/edb/as<version>/data (PGDATA), but this will vary according to local circumstances.","ccis":["CCI-000186"]},{"vulnId":"V-259251","ruleId":"SV-259251r961044_rule","severity":"medium","ruleTitle":"The DBMS must map the PKI-authenticated identity to an associated user account.","description":"The DOD standard for authentication is DOD-approved PKI certificates. Once a PKI certificate has been validated, it must be mapped to a DBMS user account for the authenticated identity to be meaningful to the DBMS and useful for authorization decisions.","checkContent":"The Common Name (cn) 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 \"enterprisedb\"), to get a list of maps used for authentication:\n\n$ sudo su - enterprisedb\n$ grep \"map\" $<data directory>/pg_hba.conf\n\nThe default path for the postgresql data directory is /var/lib/edb/as<version>/data (PGDATA), but this will vary according to local circumstances.\n\nWith the names of the maps used, check those maps against the user name mappings in pg_ident.conf:\n\n$ sudo su - enterprisedb\n$ cat <data directory>/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.","fixText":"Configure PostgreSQL to map authenticated identities directly to PostgreSQL user accounts.","ccis":["CCI-000187"]},{"vulnId":"V-259252","ruleId":"SV-259252r961047_rule","severity":"high","ruleTitle":"When using command-line tools such as psql, users must use a logon method that does not expose the password.","description":"To prevent the compromise of authentication information, such as passwords and PINs, during the authentication process, the feedback from the information system must not provide any information that would allow an unauthorized user to compromise the authentication mechanism.\n\nObfuscation of user-provided information when typed into the system is a method used in addressing this risk.\n\nFor example, displaying asterisks when a user types in a password or PIN, is an example of obscuring feedback of authentication information.\n\nThis requirement is applicable when mixed-mode authentication is enabled. When this is the case, password-authenticated accounts can be created in and authenticated by SQL Server. Other STIG requirements prohibit the use of mixed-mode authentication except when justified and approved. This deals with the exceptions.\n\nPsql is part of any PostgreSQL installation. Other command-line tools may also exist. These tools can accept a plain-text password, but do offer alternative techniques. Since the typical user of these tools is a database administrator, the consequences of password compromise are particularly serious. Therefore, the use of plain-text passwords must be prohibited, as a matter of practice and procedure.","checkContent":"For psql, which cannot be configured not to accept a plain-text password, and any other essential tool with the same limitation, verify that the system documentation explains the need for the tool, who uses it, and any relevant mitigations and that AO approval has been obtained. If not, this is a finding.\n\nRequest evidence that all users of the tool are trained in the importance of using the \"-w\" option and not using the plain-text password option and in how to keep the password hidden and that they adhere to this practice. If not, this is a finding.","fixText":"For psql, which can accept a plain-text password, and any other essential tool with the same limitation:\n\n1. Document the need for it, who uses it, and any relevant mitigations, and obtain AO approval.\n\n2. Train all users of the tool in the importance of not using the plain-text password option and in how to keep the password hidden by using the \"-w\" option.","ccis":["CCI-000206"]},{"vulnId":"V-259253","ruleId":"SV-259253r961047_rule","severity":"high","ruleTitle":"Applications must obscure feedback of authentication information during the authentication process to protect the information from possible exploitation/use by unauthorized individuals.","description":"To prevent the compromise of authentication information, such as passwords and PINs, during the authentication process, the feedback from the information system must not provide any information that would allow an unauthorized user to compromise the authentication mechanism.\n\nObfuscation of user-provided information when typed into the system is a method used in addressing this risk.\n\nFor example, displaying asterisks when a user types in a password or PIN, is an example of obscuring feedback of authentication information.\n\nDatabase applications may allow for entry of the account name and password as a visible parameter of the application execution command. This practice must be prohibited and disabled to prevent shoulder surfing.\n\nThis calls for review of applications, 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.","checkContent":"Determine whether any applications that access the database allow for entry of the account name and password or PIN.\n\nIf any do, determine whether these applications obfuscate authentication data. If they do not, this is a finding.","fixText":"Configure or modify applications to prohibit display of passwords in clear text.","ccis":["CCI-000206"]},{"vulnId":"V-259254","ruleId":"SV-259254r961050_rule","severity":"high","ruleTitle":"The EDB Postgres Advanced Server must use NIST FIPS 140-2 or 140-3 validated cryptographic modules for cryptographic operations.","description":"Use of weak or not validated cryptographic algorithms undermines the purposes of using 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) using cryptography are required to use approved NIST FIPS 140-2 or 140-3 validated cryptographic modules that meet the requirements of applicable federal laws, Executive Orders, directives, policies, regulations, standards, and guidance.\n\nNSA Type-X (where X=1, 2, 3, 4) products are NSA-certified, hardware-based encryption modules.\n\nThe standard for validating cryptographic modules will transition to the NIST FIPS 140-3 publication.\n\nFIPS 140-2 modules can remain active for up to five years after validation or until September 21, 2026, when the FIPS 140-2 validations will be moved to the historical list. Even on the historical list, CMVP supports the purchase and use of these modules for existing systems. While Federal Agencies decide when they move to FIPS 140-3 only modules, purchasers are reminded that for several years there may be a limited selection of FIPS 140-3 modules from which to choose. CMVP recommends purchasers consider all modules that appear on the Validated Modules Search Page: https://csrc.nist.gov/projects/cryptographic-module-validation-program/validated-modules\n\nMore information on the FIPS 140-3 transition can be found here: https://csrc.nist.gov/Projects/fips-140-3-transition-effort/","checkContent":"If a FIPS-certified OpenSSL library is not installed, this is a finding.\n\nRun the command \"cat /proc/sys/crypto/fips_enabled\".\n\nIf the output is not \"1\", this is a finding.\n\nFor RedHat 8 or higher, run \"fips-mode-setup --check\".\n\nIf the output is not \"FIPS mode is enabled\", this is a finding.","fixText":"If fips_enabled = 0 or FIPS mode is not enabled, configure OpenSSL to be FIPS compliant.\n\nConfigure per operating system documentation:\nRedHat7: https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/7/html/security_guide/chap-federal_standards_and_regulations\n\nRedHat8: https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/8/html/security_hardening/assembly_installing-a-rhel-8-system-with-fips-mode-enabled_security-hardening","ccis":["CCI-000803"]},{"vulnId":"V-259255","ruleId":"SV-259255r961050_rule","severity":"high","ruleTitle":"The EDB Postgres Advanced Server must be configured on a platform that has a NIST-certified FIPS 140-2 or 140-3 installation of OpenSSL.","description":"PostgreSQL uses OpenSSL for the underlying encryption layer. It must be installed on an operating system that contains a certified FIPS 140-2 or 140-3 distribution of OpenSSL. For other operating systems, users must obtain or build their own FIPS 140 OpenSSL libraries.","checkContent":"If the deployment incorporates a custom build of the operating system and PostgreSQL guaranteeing the use of FIPS 140-2 or 140-3 compliant OpenSSL, this is not a finding.\n\nIf PostgreSQL is not installed on an OS found in the CMVP (https://csrc.nist.gov/projects/cryptographic-module-validation-program/validated-modules), this is a finding.\n\nIf FIPS encryption is not enabled, this is a finding.","fixText":"Install PostgreSQL with FIPS-compliant cryptography enabled on an OS found in the CMVP (https://csrc.nist.gov/projects/cryptographic-module-validation-program/validated-modules) or by other means, ensure that FIPS 140-2 or 140-3 certified OpenSSL libraries are used by the DBMS.","ccis":["CCI-000803"]},{"vulnId":"V-259256","ruleId":"SV-259256r961053_rule","severity":"medium","ruleTitle":"The EDB Postgres Advanced Server must uniquely identify and authenticate nonorganizational users (or processes acting on behalf of nonorganizational users).","description":"Nonorganizational users include all information system users other than organizational users, which include organizational employees or individuals the organization deems to have equivalent status of employees (e.g., contractors, guest researchers, individuals from allied nations).\n\nNonorganizational 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.","checkContent":"Open the \"pg_hba.conf\" file in a viewer or editor. The default path for the pg_hba.conf file is /var/lib/edb/as<version>/data (PGDATA), but this will vary according to local circumstances.\n\nIf any rows have \"trust\" specified for the \"METHOD\" column, this is a finding.","fixText":"Open the \"pg_hba.conf\" file in an editor. The default path for the pg_hba.conf file is /var/lib/edb/as<version>/data (PGDATA), but this will vary according to local circumstances.\n\nIf any rows have \"trust\" specified for the \"METHOD\" column, delete the rows or change them to other authentication methods.\n\nPermitted methods in preferred order are: peer (local only), cert, ldap, sspi, pam, and scram-sha-256.","ccis":["CCI-000804"]},{"vulnId":"V-259257","ruleId":"SV-259257r961095_rule","severity":"medium","ruleTitle":"The EDB Postgres Advanced Server must separate user functionality (including user interface services) from database management functionality.","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 DBMS management is presented on an interface available for users, information on DBMS settings may be inadvertently made available to the user.","checkContent":"As the \"enterprisedb\" user, run the following from the command line:\n\n> psql edb\n\nFrom the psql prompt run:\n\n\\du\n\nIf a user listed in the output is not approved for SUPERUSER access, this is a finding.","fixText":"Execute the following SQL as the \"enterprisedb\" operating system user for all database users not approved for SUPERUSER privileges:\n\n> psql edb -c \"ALTER USER <username> NOSUPERUSER\"","ccis":["CCI-001082"]},{"vulnId":"V-259258","ruleId":"SV-259258r961113_rule","severity":"medium","ruleTitle":"The EDB Postgres Advanced Server must invalidate session identifiers upon user logout or other session termination.","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 the DBMS 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 DBMSs 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, the DBMS must terminate the user session(s) to minimize the potential for sessions to be hijacked.","checkContent":"As the \"enterprisedb\" user, run the following from the command line:\n\n> psql edb\n\nFrom the psql prompt run the following commands:\n\nSHOW statement_timeout;\nSHOW tcp_keepalives_idle;\nSHOW tcp_keepalives_interval;\nSHOW tcp_keepalives_count;\n\nIf any of the above parameters has a value of \"0\", this is a finding.","fixText":"As the \"enterprisedb\" user, run the following from the command line for all of the previously noted parameters with a value of \"0\" :\n\npsql edb\n\nALTER SYSTEM SET statement_timeout = 10000;\nALTER SYSTEM SET tcp_keepalives_idle = 10;\nALTER SYSTEM SET tcp_keepalives_interval = 10;\nALTER SYSTEM SET tcp_keepalives_count = 10;\n\nNote: The above values can be configured per organization requirements. Refer to documentation : https://www.enterprisedb.com/docs/epas/latest/reference/database_administrator_reference/02_summary_of_configuration_parameters/\n\nFrom the operating system command line run the following as the \"enterprisedb\" user:\n\nsystemctl restart edb-as-<version>","ccis":["CCI-001185"]},{"vulnId":"V-259259","ruleId":"SV-259259r961128_rule","severity":"high","ruleTitle":"The EDB Postgres Advanced Server must protect the confidentiality and integrity of all information at rest.","description":"This control is intended to address the confidentiality and integrity of information at rest in nonmobile 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-generated data, 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.","checkContent":"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 the DBMS, 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.","fixText":"Create an encrypted partition to host the PGDATA directory. The default path for the PGDATA directory is /var/lib/edb/as<version>/data, but this will vary according to local circumstances.\n\nThis can be done at the OS level with encryption technologies provided by third-party tools.\n\nIf only certain columns need encryption, use the pgcrypto module to encrypt those columns as documented here: https://www.postgresql.org/docs/current/pgcrypto.html\n\nNote: Starting in Version 15, EDB Postgres Advanced Server natively supports Transparent Data Encryption (TDE): https://www.enterprisedb.com/docs/epas/latest/epas_security_guide/tde_feature/","ccis":["CCI-001199"]},{"vulnId":"V-259260","ruleId":"SV-259260r961131_rule","severity":"medium","ruleTitle":"The EDB Postgres Advanced Server must isolate security functions from nonsecurity functions.","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 nonsecurity functionality via separate databases or schemas. Database objects or code implementing security functionality should not be commingled with objects or code implementing application logic. When security and nonsecurity functionality are commingled, users who have access to nonsecurity functionality may be able to access security functionality.","checkContent":"All EDB Postgres Advanced Server built-in security packages are in the sys, pg_catalog, information_schema, and dbo schemas.\n\nIf any application-specific packages have been added to these schemas, this is a finding.","fixText":"Remove all application-specific packages that were added to the sys, pg_catalog, information_schema, and dbo schemas.","ccis":["CCI-001084"]},{"vulnId":"V-259261","ruleId":"SV-259261r961149_rule","severity":"medium","ruleTitle":"Database contents must be protected from unauthorized and unintended information transfer by enforcement of a data transfer policy.","description":"Applications, including DBMSs, must prevent unauthorized and unintended information transfer via shared system resources.\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.\n\nCopies of sensitive data must not be misplaced or left in a temporary location without the proper controls.","checkContent":"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.","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.","ccis":["CCI-001090"]},{"vulnId":"V-259262","ruleId":"SV-259262r961149_rule","severity":"medium","ruleTitle":"Access to database files must be limited to relevant processes and to authorized, administrative users.","description":"Applications, including DBMSs, 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.","checkContent":"Verify User ownership, Group ownership, and permissions on the <postgresql data directory> directory:\n> ls -ald <PostgreSQL data directory>\n\nIf the User owner is not \"enterprisedb\", this is a finding.\nIf the Group owner is not \"enterprisedb\", this is a finding.\nIf the directory is more permissive than 700, this is a finding.\n\nThe default path for the postgresql data directory is /var/lib/edb/as<version>/data (PGDATA), but this will vary according to local circumstances.","fixText":"Run these commands:\n\n> chown enterprisedb <PostgreSQL data directory>\n\n> chgrp enterprisedb <PostgreSQL data directory>\n\n> chmod 700 <PostgreSQL data directory>\n\nThe default path for the postgresql data directory is /var/lib/edb/as<version>/data (PGDATA), but this will vary according to local circumstances.","ccis":["CCI-001090"]},{"vulnId":"V-259263","ruleId":"SV-259263r961158_rule","severity":"medium","ruleTitle":"The EDB Postgres Advanced Server must check the validity of all data inputs except those specifically identified by the organization.","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.","checkContent":"Review DBMS 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 the EDB Postgres Advanced Server database for the use of prepared statements. If prepared statements are not used, this is a finding.\n\nExecute the following SQL as the \"enterprisedb\" user:\n\nSELECT * FROM sqlprotect.list_protected_users;\n\nIf the database and user that handles user input is not listed or if sqlprotect.list_protected_users does not exist (meaning SQL/Protect is not installed), and an alternative means of reviewing for vulnerable code is not in use, this is a finding.","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 column/field definitions for each column/field in 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 for user supplied inputs.\n\nDo not allow general users direct console access to the EDB Postgres Advanced Server database.\n\nIf EDB SQL/Protect is being used to monitor and protect the EDB Postgres Advanced Server database from possible SQL injection attacks, install and configure SQL/Protect as documented here: https://www.enterprisedb.com/docs/epas/latest/epas_security_guide/02_protecting_against_sql_injection_attacks/02_configuring_sql_protect/\n\nAlternatively, implement, document, and maintain another method of checking for the validity of inputs.","ccis":["CCI-001310"]},{"vulnId":"V-259264","ruleId":"SV-259264r961158_rule","severity":"medium","ruleTitle":"The EDB Postgres Advanced Server and associated applications must reserve the use of dynamic code execution for situations that require it.","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, precompiled stored procedures, 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.","checkContent":"Execute the following SQL as the \"enterprisedb\" operating system user:\n\n> psql edb -c \"SELECT * FROM sqlprotect.list_protected_users\"\n\nIf the database and user that handles user input is not listed or if sqlprotect.list_protected_users does not exist (meaning SQL/Protect is not installed), and an alternative means of reviewing for vulnerable code is not in use, this is a finding.","fixText":"Install and configure SQL/Protect as documented here for the specific version being used: https://www.enterprisedb.com/docs/epas/latest/epas_security_guide/02_protecting_against_sql_injection_attacks/02_configuring_sql_protect/\n\nAlternatively, implement, document, and maintain another method of checking for the validity of inputs.","ccis":["CCI-001310"]},{"vulnId":"V-259265","ruleId":"SV-259265r961158_rule","severity":"medium","ruleTitle":"The EDB Postgres Advanced Server and associated applications, when making use of dynamic code execution, must scan input data for invalid values that may indicate a code injection attack.","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, precompiled stored procedures, 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, or REVOKE 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.\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.","checkContent":"Execute the following SQL as the \"enterprisedb\" operating system user:\n\n> psql edb -c \"SELECT * FROM sqlprotect.list_protected_users\"\n\nIf the database and user that handles user input is not listed or if sqlprotect.list_protected_users does not exist (meaning SQL/Protect is not installed), and an alternative means of reviewing for vulnerable code is not in use, this is a finding.","fixText":"Install and configure SQL/Protect as documented here for the specific version being used: https://www.enterprisedb.com/docs/epas/latest/epas_security_guide/02_protecting_against_sql_injection_attacks/02_configuring_sql_protect/\n\nAlternatively, implement, document, and maintain another method of checking for the validity of inputs.","ccis":["CCI-001310"]},{"vulnId":"V-259266","ruleId":"SV-259266r961167_rule","severity":"medium","ruleTitle":"The EDB Postgres Advanced Server must provide nonprivileged users with error messages that provide information necessary for corrective actions without revealing information that could be exploited by adversaries.","description":"Any DBMS or associated application providing too much information in error messages on the screen or printout risks compromising the data and security of the system. The structure and content of error messages 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 and 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.\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.","checkContent":"Check custom database code to verify that error messages do not contain information beyond what is needed for troubleshooting the issue.\n\nIf custom database errors contain PII data, sensitive business data, or information useful for identifying the host system or database structure, this is a finding.","fixText":"Configure custom database code and associated application code not to divulge sensitive information or information useful for system identification in error messages.","ccis":["CCI-001312"]},{"vulnId":"V-259267","ruleId":"SV-259267r961170_rule","severity":"medium","ruleTitle":"The EDB Postgres Advanced Server must reveal detailed error messages only to the ISSO, ISSM, SA, and DBA.","description":"If the DBMS 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 DBMS error messages can contain information that could aid an attacker in, among other 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, contact the 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 appropriate approval.\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.","checkContent":"Check the EDB Postgres Advanced Server settings and custom database code to determine if detailed error messages are ever displayed to unauthorized individuals.\n\nTo check the level of detail for errors exposed to clients, run the following as the \"enterprisedb\" operating system user:\n\n> psql edb -c \"SHOW client_min_messages\"\n\nIf client_min_messages is not set to ERROR, this is a finding.\n\nIf detailed error messages for any custom code are displayed to users not authorized to view them, this is a finding.\n\nAdditionally, logs may contain detailed information and should only be accessible by the database owner.\n\nAs the \"enterprisedb\" operating system user, verify that the log_file_mode parameter is set to 0600:\n\n> psql edb -c \"SHOW log_file_mode\"\n\nIf log_file_mode is not set to 0600, this is a finding.\n\nIf the EDB Postgres Advanced Server 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.","fixText":"Set the client_min_messages parameter to \"ERROR\". As the \"enterprisedb\" operating system user:\n\n> psql edb -c \"ALTER SYSTEM SET client_min_messages='ERROR'\"\n> psql edb -c \"SELECT pg_reload_conf()\"\n> psql edb -c \"SHOW client_min_messages\"\n\nSet the log_file_mode to 0600. As the \"enterprisedb\" operating system user:\n\n> psql edb -c \"ALTER SYSTEM SET log_file_mode='0600'\"\n> psql edb -c \"SELECT pg_reload_conf()\"\n> psql edb -c \"SHOW log_file_mode\"","ccis":["CCI-001314"]},{"vulnId":"V-259268","ruleId":"SV-259268r961221_rule","severity":"medium","ruleTitle":"The EDB Postgres Advanced Server must automatically terminate a user session after organization-defined conditions or trigger events requiring session disconnect.","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.","checkContent":"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 the DBMS is not configured via triggers, scripts, or other organization-defined manners to terminate sessions when required, this is a finding.","fixText":"Execute this SQL command in the places where the documentation requires automatic session termination:\n\nSELECT pg_terminate_backend(pid)\n  FROM pg_stat_activity\n WHERE usename = '<username>'","ccis":["CCI-002361"]},{"vulnId":"V-259269","ruleId":"SV-259269r961269_rule","severity":"medium","ruleTitle":"The EDB Postgres Advanced Server must associate organization-defined types of security labels having organization-defined security label values with information in storage.","description":"Without the association of security labels to information, there is no basis for the 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 CUI. These security labels may be assigned manually or during data processing; 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 a feature of the DBMS product, a third-party product, or custom application code.","checkContent":"If security labeling is not required, this is not applicable.\n\nIf security labeling requirements have been specified, execute the following SQL as the \"enterprisedb\" operating system user:\n\n> psql edb -c \"SELECT * from ALL_POLICIES where OBJECT_NAME = '<object_name>'\"\n\nIf a policy is not enabled for the table requiring security labeling, this is a finding.","fixText":"For information on creating row-level policies for all required tables with the DBMS_RLS package, refer to the documentation: https://www.enterprisedb.com/docs/epas/latest/reference/oracle_compatibility_reference/epas_compat_bip_guide/03_built-in_packages/14_dbms_rls/","ccis":["CCI-002262"]},{"vulnId":"V-259270","ruleId":"SV-259270r961272_rule","severity":"medium","ruleTitle":"The EDB Postgres Advanced Server must associate organization-defined types of security labels having organization-defined security label values with information in process.","description":"Without the association of security labels to information, there is no basis for the DBMS 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 CUI. These security labels may be assigned manually or during data processing; 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 a feature of the DBMS product, a third-party product, or custom application code.","checkContent":"If security labeling is not required, this is not applicable.\n\nIf security labeling requirements have been specified, execute the following SQL as the \"enterprisedb\" operating system user:\n\n> psql edb -c \"SELECT * from ALL_POLICIES where OBJECT_NAME = '<object_name>'\"\n\nIf a policy is not enabled for the table requiring security labeling, this is a finding.","fixText":"For more information on creating row-level policies for all required tables with the DBMS_RLS package, refer to the documentation: https://www.enterprisedb.com/docs/epas/latest/reference/oracle_compatibility_reference/epas_compat_bip_guide/03_built-in_packages/14_dbms_rls/","ccis":["CCI-002263"]},{"vulnId":"V-259271","ruleId":"SV-259271r961275_rule","severity":"medium","ruleTitle":"The EDB Postgres Advanced Server must associate organization-defined types of security labels having organization-defined security label values with information in transmission.","description":"Without the association of security labels to information, there is no basis for the DBMS 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 CUI. 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 a feature of the DBMS product, a third-party product, or custom application code.","checkContent":"If security labeling is not required, this is not applicable.\n\nIf security labeling requirements have been specified, execute the following SQL as the \"enterprisedb\" operating system user:\n\n> psql edb -c \"SELECT * from ALL_POLICIES where OBJECT_NAME = '<object_name>'\"\n\nIf a policy is not enabled for the table requiring security labeling, this is a finding.","fixText":"For more information on creating row-level policies for all required tables with the DBMS_RLS package, refer to the documentation: https://www.enterprisedb.com/docs/epas/latest/reference/oracle_compatibility_reference/epas_compat_bip_guide/03_built-in_packages/14_dbms_rls/","ccis":["CCI-002264"]},{"vulnId":"V-259272","ruleId":"SV-259272r961317_rule","severity":"medium","ruleTitle":"The EDB Postgres Advanced Server must enforce discretionary access control policies, as defined by the data owner, over defined subjects and objects.","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 (MAC) policies is still able to operate under the less rigorous constraints of this requirement. Thus, while MAC 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.","checkContent":"Review system documentation to identify the required DAC for the database.\n\nReview the security configuration of the database and the EDB Postgres Advanced Server. If applicable, review the security configuration of the application(s) using the database.\n\nIf the DAC 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 \"enterprisedb\" user, run the following the operating system command line:\n\npsql <database_name>\n\nFrom the psql prompt:\n\n\\dn *.*\n\\dt *.*\n\\ds *.*\n\\dv *.*\n\\x (turns on expanded view for easier viewing)\n\\df+ *.*\n\nIf any role or user is granted privileges to unauthorized objects, this is a finding.","fixText":"Revoke any unauthorized user/role object privileges found.\n\nExample:\n\n> psql -c \"REVOKE SELECT ON TABLE <schema.table_name> from <user or role name>\"","ccis":["CCI-002165"]},{"vulnId":"V-259273","ruleId":"SV-259273r961353_rule","severity":"medium","ruleTitle":"The EDB Postgres Advanced Server must prevent nonprivileged users from executing privileged functions to include disabling, circumventing, or altering implemented security safeguards/countermeasures.","description":"Preventing nonprivileged 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. Nonprivileged 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 nonprivileged users.\n\nA privileged function in the DBMS/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 the DBMS 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.","checkContent":"Review the system documentation to obtain the definition of the database/DBMS functionality considered privileged in the context of the system in question.\n\nTo determine nonprivileged user access to database objects use the following SQL command: \"SELECT grantee, privilege_type, table_name FROM information_schema.role_table_grants WHERE grantee='<username>';\"\n\nIf any functionality considered privileged has access privileges granted to nonprivileged users, this is a finding.","fixText":"Revoke any privileges to privileged functionality by executing the REVOKE command as documented here:\n\nhttp://www.postgresql.org/docs/current/static/sql-revoke.html","ccis":["CCI-002235"]},{"vulnId":"V-259274","ruleId":"SV-259274r961359_rule","severity":"medium","ruleTitle":"Execution of software modules (to include stored procedures, functions, and triggers) with elevated privileges must be restricted to necessary cases only.","description":"In certain situations, to provide required functionality, a DBMS 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.","checkContent":"Review the system documentation and source code of the application(s) using the database.\n\nIf elevation of DBMS privileges is used but not documented, this is a finding.\n\nIf elevation of DBMS privileges is documented but not implemented as described in the documentation, this is a finding.\n\nIf the privilege-elevation logic can be invoked in ways other than intended, in contexts other than intended, or by subjects/principals other than intended, this is a finding.\n\nExecute the following SQL as the \"enterprisedb\" operating system user to find any SECURITY DEFINER functions (meaning they are executed as owner rather than invoker):\n\npsql edb -c \"SELECT proname FROM pg_proc WHERE prosecdef = true\"\n\nIf any of these functions should not be SECURITY DEFINER, this is a finding.","fixText":"Determine where, when, how, and by what principals/subjects elevated privilege is needed.\n\nModify the system and the application(s) using the database to ensure privilege elevation is used only as required.\n\nTo alter a function to use SECURITY INVOKER instead of SECURITY DEFINER, execute the following SQL as the \"enterprisedb\" user:\n\nALTER FUNCTION <function()> SECURITY INVOKER;","ccis":["CCI-002233"]},{"vulnId":"V-259275","ruleId":"SV-259275r961359_rule","severity":"medium","ruleTitle":"Execution of software modules (to include stored procedures, functions, and triggers) with elevated privileges must be restricted to necessary cases only.","description":"In certain situations, to provide required functionality, a DBMS 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.","checkContent":"Review the system documentation and source code of the application(s) using the database.\n\nIf elevation of DBMS privileges is used but not documented, this is a finding.\n\nIf elevation of DBMS privileges is documented but not implemented as described in the documentation, this is a finding.\n\nIf the privilege-elevation logic can be invoked in ways other than intended, in contexts other than intended, or by subjects/principals other than intended, this is a finding.\n\nExecute the following SQL to find any users with BYPASS RLS permissions:\n\nselect rolname from pg_roles where rolbypassrls = true;\n\nIf any of these users are not superusers that should bypass RLS, this is a finding.","fixText":"Determine where, when, how, and by what principals/subjects elevated privilege is needed.\n\nModify the system and the application(s) using the database to ensure privilege elevation is used only as required.\n\nTo alter a user to not allow bypassing RLS, execute the following SQL:\n\nALTER USER <user>  NOBYPASSRLS;","ccis":["CCI-002233"]},{"vulnId":"V-259278","ruleId":"SV-259278r961392_rule","severity":"medium","ruleTitle":"The EDB Postgres Advanced Server must allocate audit record storage capacity in accordance with organization-defined audit record storage requirements.","description":"In order to ensure sufficient storage capacity for the audit logs, the DBMS 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 the DBMS 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 factors such 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 the DBMS's ability to reuse the space formerly occupied by off-loaded records.","checkContent":"Investigate whether there have been any incidents where the EDB Postgres Advanced Server 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, this is a finding.","fixText":"Allocate sufficient audit file space to \"<PostgreSQL data directory>/edb_audit\" to support peak demand.","ccis":["CCI-001849"]},{"vulnId":"V-259279","ruleId":"SV-259279r961398_rule","severity":"medium","ruleTitle":"The EDB Postgres Advanced Server must provide a warning to appropriate support staff when allocated audit record storage volume reaches 75 percent of maximum audit record storage capacity.","description":"Organizations are required to use a central log management system, so under normal conditions, the audit space allocated to the DBMS on its own server will not cause an issue. However, space will still be required on the DBMS 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 percent, they are unable to plan for storage capacity expansion.\n\nThe appropriate support staff include, at a minimum, the ISSO and the DBA/SA.","checkContent":"If Postgres Enterprise Manager (PEM) or another similar monitoring capability is not installed and configured to probe storage volume utilization of the PGDATA directory and notify appropriate support staff upon storage volume utilization reaching 75 percent, this is a finding.\n\nThe default path for the PostgreSQL data directory (PGDATA) is /var/lib/edb/as<version>/data, but this will vary according to local circumstances.","fixText":"Install PEM and configure a probe to monitor and notify appropriate support staff upon storage volume utilization reaching 75 percent.\n\nInstructions to create a custom probe can be found at: https://www.enterprisedb.com/docs/pem/latest/monitoring_performance/probes/#creating-a-custom-probe\n\nExample steps for creating a probe are below, using the thin client (browser) PEM interface. Refer also to the Supplemental Procedures document supplied with this STIG.\n\nOpen the PEM web console in a browser.\n\n- Log in.\n- Click on the agent for the machine to be monitored.\n- Select \"Management | Probe Configuration\".\n- Select \"Disk Space\" and set the check interval as warranted.\n- Select \"Management | Alerting\".\n- Name the definition \"Audit Log Full\".\n- Select Template \"Disk Consumption Percentage\".\n- Set Frequency, Comparison Operator, and Thresholds (1 minute, >, 95/96/97 for example).\n- Enter the Mount Point for where the audit log is.\n- Click Notification tab.\n- Click Email all alerts.\n- Click \"Execute Script\" on Monitored Server.\n- Enter script to shut down postgres, generally \"systemctl stop edb-as-<version>\".\n- Click Add/Change to save, click OK to exit dialog box.","ccis":["CCI-001855"]},{"vulnId":"V-259280","ruleId":"SV-259280r961401_rule","severity":"medium","ruleTitle":"The EDB Postgres Advanced Server must provide an immediate real-time alert to appropriate support staff of all audit log failures.","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).","checkContent":"Review Postgres Enterprise Manager (PEM) alert settings, 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.","fixText":"Install PEM and configure audit failure event alerting as documented here: https://www.enterprisedb.com/docs/pem/latest/\n\nAn example for creating an alert that ensure the audit directory does not fill up is included below, using the thin client (browser) PEM interface. Refer also to the Supplemental Procedures document supplied with this STIG.\n\nOpen the PEM web console in a browser.\n\n- Log in.\n- Click on the agent for the machine to be monitored.\n - Select \"Management | Probe Configuration\".\n - Select \"Disk Space\" and set the check interval as warranted.\n - Select \"Management | Alerting\".\n - Name the definition \"Audit Log Full\".\n - Select Template \"Disk Consumption Percentage\".\n - Set Frequency, Comparison Operator, and Thresholds (1 minute, >, 95/96/97 for example).\n - Enter the Mount Point for where the audit log is.\n - Click Notification tab.\n - Click Email all alerts.\n - Click \"Execute Script\" on Monitored Server.","ccis":["CCI-001858"]},{"vulnId":"V-259281","ruleId":"SV-259281r961443_rule","severity":"medium","ruleTitle":"The EDB Postgres Advanced Server must record time stamps in audit records and application data that can be mapped to Coordinated Universal Time (UTC, formerly GMT).","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 the DBMS 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.","checkContent":"As the \"enterprisedb\" operating system user, run the following to show the current log_timezone setting:\n\n> psql -d edb -c \"SHOW log_timezone\"\n\nIf anything other than \"UTC\" is returned, this is a finding.","fixText":"As the \"enterprisedb\" operating system user, run the following to set the log_timezone parameter:\n\n> psql edb -c \"ALTER SYSTEM SET log_timezone = 'UTC'\"\n\nNext, reload the parameter file: \n\npsql edb -c \"SELECT pg_reload_conf()\"\n\nConfirm the new value:\n\npsql edb -c \"SHOW log_timezone\"","ccis":["CCI-001890"]},{"vulnId":"V-259282","ruleId":"SV-259282r961446_rule","severity":"medium","ruleTitle":"The EDB Postgres Advanced Server must generate time stamps for audit records and application data, with a minimum granularity of one second.","description":"Without sufficient granularity of time stamps, it is not possible to adequately determine the chronological order of records.\n\nTime stamps generated by the DBMS 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.\n\nSome DBMS products offer a data type called TIMESTAMP that is not a representation of date and time. Rather, it is a database state counter and does not correspond to calendar and clock time. This requirement does not refer to that meaning of TIMESTAMP.","checkContent":"As the \"enterprisedb\" operating system user, run the following to verify the log_line_prefix parameter setting:\n\n> psql edb -c \"SHOW log_line_prefix\"\n\nIf log_line_prefix is not set to \"%m\" (Timestamp in milliseconds) , this is a finding.","fixText":"As the \"enterprisedb\" operating system user, run the following to set the log_line_prefix parameter to \"%m\" (Timestamps in milliseconds)\n\n> psql edb -c \"ALTER SYSTEM SET log_line_prefix = '%m'\"\n\nNext, reload the parameter file:\n\n> psql edb -c \"SELECT pg_reload_conf()\"\n\nConfirm the new value:\n\n> psql edb -c \"SHOW log_line_prefix\"","ccis":["CCI-001889"]},{"vulnId":"V-259283","ruleId":"SV-259283r998216_rule","severity":"medium","ruleTitle":"The EDB Postgres Advanced Server must prohibit user installation of logic modules (stored procedures, functions, triggers, views, etc.) without explicit privileged status.","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\nDBMS 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\nThe DBMS 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.","checkContent":"If EDB Postgres 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 the EDB Postgres security settings with respect to nonadministrative users' ability to create, alter, or replace logic modules, to include but not necessarily only stored procedures, functions, triggers, and views. These psql commands can help with showing existing permissions of databases and schemas:\n\n\\l\n\\dn+\n\nIf any such permissions exist and are not documented and approved, this is a finding.","fixText":"Document and obtain approval for any nonadministrative users who require the ability to create, alter, or replace logic modules. \n\nImplement the approved permissions. Revoke (or deny) any unapproved permissions and remove any unauthorized role memberships.","ccis":["CCI-003980"]},{"vulnId":"V-259284","ruleId":"SV-259284r961461_rule","severity":"medium","ruleTitle":"The EDB Postgres Advanced Server must enforce access restrictions associated with changes to the configuration of the EDB Postgres Advanced Server or database(s).","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.","checkContent":"Review the security configuration of the EDB Postgres database(s).\n\nIf EDB Postgres does not enforce access restrictions associated with changes to the configuration of the database(s), this is a finding.\n\nTo assist in conducting reviews of permissions, the following psql commands describe permissions of databases, schemas, and users:\n\n\\l\n\\dn+\n\\du\n\nPermissions of concern in this respect include the following, and possibly others:\n\n- any user with SUPERUSER privileges.\n- any database or schema with \"C\" (create) or \"w\" (update) privileges that are not necessary.","fixText":"Configure EDB Postgres Advanced Server to enforce access restrictions associated with changes to the configuration of the EDB Postgres database(s). Other third-party monitoring tools may be used to satisfy this requirement.\n\nUse the ALTER ROLE to remove accesses from roles. As the \"enterprisedb\" operating system user, run the following:\n\n> psql edb -c \"ALTER ROLE <rolename> NOSUPERUSER\" \n\nUse REVOKE to remove privileges from databases and schemas: \n\n> psql edb -c \"REVOKE ALL PRIVILEGES ON <objectname> FROM <username>\"","ccis":["CCI-001813"]},{"vulnId":"V-259285","ruleId":"SV-259285r998218_rule","severity":"medium","ruleTitle":"The EDB Postgres Advanced Server must produce audit records of its enforcement of access restrictions associated with changes to the configuration of the EDB Postgres Advanced Server or database(s).","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.","checkContent":"Execute the following SQL as \"enterprisedb\" operating system user:\n\n> psql edb -c \"SHOW edb_audit_statement\"\n\nIf the result is not \"all\" or if the current setting for this requirement has not been noted and approved by the organization in the system documentation, this is a finding.","fixText":"Execute the following SQL as \"enterprisedb\" operating system user:\n\n> psql edb -c \"ALTER SYSTEM SET edb_audit_statement = 'all'\"\n> psql edb -c \"SELECT pg_reload_conf()\"\n\nor\n\nUpdate the system documentation to note the organizationally approved setting and corresponding justification of the setting for this requirement.","ccis":["CCI-003938"]},{"vulnId":"V-259286","ruleId":"SV-259286r961470_rule","severity":"medium","ruleTitle":"The EDB Postgres Advanced Server must disable network functions, ports, protocols, and services deemed by the organization to be nonsecure, in accord with the Ports, Protocols, and Services Management (PPSM) guidance.","description":"Use of nonsecure network functions, ports, protocols, and services exposes the system to avoidable threats. A database cluster listens on a single port (usually 5444 for EDB Postgres Advanced Server).\n\nThe Postgres Enterprise Manager (PEM) agents do not listen on ports; they only act as clients to the PEM server. The PEM server has two components, a repository (which is a Postgres database) and a web application. The web application listens on a port configured in Apache HTTP Server, generally 8080 or 8443. The ports to check are: the primary Postgres cluster port, the PEM HTTPD port, and the PEM Repository DB port. Generally, the PEM HTTPD port and the PEM Repository DB port should be installed on an isolated management machine with administrator access only.","checkContent":"Review the network functions, ports, protocols, and services supported by the EDB Postgres Advanced Server.\n\nIf any protocol is prohibited by the PPSM guidance and is enabled, this is a finding.\n\nOpen \"<PostgreSQL data directory>/pg_hba.conf\" in a viewer. The default path for the postgresql data directory is /var/lib/edb/as<version>/data (PGDATA), but this will vary according to local circumstances. If any rows have a TYPE that is \"host\" or \"hostnossl\", this is a finding.\n\nExecute the following SQL as \"enterprisedb\" operating system user:\n\n> psql edb -c \"SHOW port\"\n \nIf the displayed port is not allowed, this is a finding.","fixText":"Disable each prohibited network function, port, protocol, or service prohibited by the PPSM guidance.\n\nOpen \"pg_hba.conf\" in an editor. The default path for the pg_hba.conf file is /var/lib/edb/as<version>/data (PGDATA), but this will vary according to local circumstances.\n\nChange the TYPE of any rows not starting with a \"#\" to be either \"local\" or \"hostssl\". The METHOD for the local rows should be \"peer\", which will authenticate based on the operating system name. The METHOD for the hostssl rows should be one of these (in preferred order): cert, ldap, sspi, pam, or scram-sha-256.\n\nExecute the following SQL as \"enterprisedb\" operating system user:\n\n> psql edb -c \"ALTER SYSTEM SET port = <port>\"\n\nExecute the following operating system command as the \"root\" user (or user with sudo privileges) to restart the postgres instance:\n\n> systemctl restart edb-as-<version>\n\nWhere <version> is the major version of the EDB Postgres Advanced Server instance [e.g., 15].","ccis":["CCI-001762"]},{"vulnId":"V-259287","ruleId":"SV-259287r998219_rule","severity":"medium","ruleTitle":"The EDB Postgres Advanced Server must require users to reauthenticate when organization-defined circumstances or situations require reauthentication.","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 reauthenticate.\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 categories of 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.","checkContent":"Determine all situations where a user must reauthenticate. Check if the mechanisms that handle such situations use the following SQL.\n\nTo make a single user reauthenticate, the following must be present:\n\n SELECT pg_terminate_backend(pid) FROM pg_stat_activity WHERE user='<username>'\n\nTo make all users reauthenticate, run the following:\n\n SELECT pg_terminate_backend(pid) FROM pg_stat_activity WHERE user LIKE '%'\n\nIf the provided SQL does not force reauthentication, this is a finding.","fixText":"Determine the organization-defined circumstances or situations that require reauthentication and ensure the following SQL is executed in those situations.\n\nTo require a single user to reauthenticate, use this SQL: \n\n SELECT pg_terminate_backend(pid) FROM pg_stat_activity WHERE user = '<username>';\n\nTo require all users to reauthenticate, use this SQL: \n\n SELECT pg_terminate_backend(pid) FROM pg_stat_activity WHERE user LIKE '%';","ccis":["CCI-004895"]},{"vulnId":"V-259288","ruleId":"SV-259288r962034_rule","severity":"medium","ruleTitle":"The DBMS must use NSA-approved cryptography to protect classified information in accordance with the requirements of the data owner.","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 a DBMS with the encryption devices.","checkContent":"If the EDB Postgres Advanced Server is deployed in an unclassified environment, this is not applicable.\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 \"enterprisedb\" operating system user, run the following:\n\n> psql edb -c \"SHOW ssl\"\n\nIf Secure Socket Layer (SSL) is set to \"off\", this is a finding (Refer to below).\n\nConsult network administration staff to determine whether the server is protected by NSA-approved encrypting devices. If not, then this a finding.","fixText":"As the \"enterprisedb\" operating system user, run the following to set the ssl parameter to \"on\":\n\n> psql edb -c \"ALTER SYSTEM SET ssl = 'on'\"\n\nNext, reload the parameter file: \n\npsql edb -c \"SELECT pg_reload_conf()\"\n\nNow confirm the new value:\n\npsql edb -c \"SHOW ssl\"","ccis":["CCI-002450"]},{"vulnId":"V-259289","ruleId":"SV-259289r961596_rule","severity":"medium","ruleTitle":"The EDB Postgres Advanced Server must only accept end entity certificates issued by DOD PKI or DOD-approved PKI Certification Authorities (CAs) for the establishment of all encrypted sessions.","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 the DBMS session rather than for the network packet.","checkContent":"Verify that the root.crt certificate was issued by a valid DOD entity.\n\n> openssl x509 -in /<PGDATA directory>/root.crt -text | grep -i \"issuer\". The default path for the PostgreSQL data directory (PGDATA) is /var/lib/edb/as<version>/data, but this will vary according to local circumstances.\n\nExample:\n> openssl x509 -in /var/lib/edb/as15/data/root.crt -text | grep -i \"issuer\"\n\nIf any issuers are listed that are not approved DOD certificate authorities, this is a finding.","fixText":"Revoke trust in any certificates not issued by a DOD-approved certificate authority.\n\nContact the organization's certificate issuer and request a new certificate that is issued by a DOD-approved certificate authority.","ccis":["CCI-002470"]},{"vulnId":"V-259290","ruleId":"SV-259290r961599_rule","severity":"medium","ruleTitle":"The EDB Postgres Advanced Server 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.","description":"DBMSs 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 the DBMS 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.","checkContent":"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 the EDB Postgres Advanced Server, 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.","fixText":"Create an encrypted partition to host the \"<PostgreSQL data directory>\" directory. This can be done at the OS level with a technology such as db-crypt or other encryption technologies provided by third-party tools.\n\nIf only certain columns require encryption, use pgcrypt to encrypt those columns as documented here: http://www.postgresql.org/docs/current/static/pgcrypto.html\n\nNote: Starting in Version 15, EDB Postgres Advanced Server natively supports Transparent Data Encryption (TDE): https://www.enterprisedb.com/docs/epas/latest/epas_security_guide/tde_feature/","ccis":["CCI-002475"]},{"vulnId":"V-259291","ruleId":"SV-259291r961602_rule","severity":"medium","ruleTitle":"The EDB Postgres Advanced Server must implement cryptographic mechanisms preventing the unauthorized disclosure of organization-defined information at rest on organization-defined information system components.","description":"DBMSs 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 the DBMS 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.","checkContent":"Review the system documentation to determine whether the organization has defined the information at rest 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 the EDB Postgres Advanced Server, 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.","fixText":"Create an encrypted partition to host the \"<PostgreSQL data directory>\" directory. This can be done at the OS level with a technology such as db-crypt or other encryption technologies provided by third-party tools.\n\nIf only certain columns need encryption, use pgcrypt to encrypt those columns as documented here: \nhttp://www.postgresql.org/docs/current/static/pgcrypto.html\n\nNote: Starting in Version 15, EDB Postgres Advanced Server natively supports Transparent Data Encryption (TDE): https://www.enterprisedb.com/docs/epas/latest/epas_security_guide/tde_feature/","ccis":["CCI-002476"]},{"vulnId":"V-259292","ruleId":"SV-259292r961638_rule","severity":"medium","ruleTitle":"The EDB Postgres Advanced Server must maintain the confidentiality and integrity of information during preparation for transmission.","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, the DBMS, associated applications, and infrastructure must leverage transmission protection mechanisms.\n\nEDB Postgres Advanced Server provides native support for using SSL connections to encrypt client/server communications. To enable the use of SSL, the postgres \"ssl\" configuration parameter must be set to \"on\", 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 nonlocal 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.","checkContent":"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.\n\nOpen the \"pg_hba.conf\" in a viewer or editor. The default path for the pg_hba.conf file is /var/lib/edb/as<version>/data (PGDATA), but this will vary according to local circumstances.\n\nIf any rows do not have TYPE of \"hostssl\" as well as a METHOD of \"cert\", this is a finding.","fixText":"To configure EDB Postgres Advanced Server to use SSL, open the \"postgresql.conf\" file in an editor. Note that the default location for the postgresql.conf file is in the postgresql data directory (PGDATA). The location of the postgresql.conf for a running EDB Postgres instance can be found using the following command run from a command prompt:\n\n> psql -d <database-name> -U <username> -c \"SHOW config_file\"\n\nWhere <database-name> is any database in the EDB postgres instance and <username> is a database superuser. By default, a database named \"edb\" and a superuser named \"enterprisedb\" are installed with EDB Postgres Advanced Server (EPAS).\n\nIn the postgresql.conf file, set the \"ssl\" parameter as follows:\n\nssl = on\n\nEnsure the parameter is uncommented.\n\nIn order to start an EDB Postgres Advanced Server instance in SSL mode, files containing the server certificate and private key must exist. By default, these files are expected to exist in the Postgres data directory and are expected to be named server.crt and server.key, respectively. Update the ssl_cert_file and ssl_cert_key parameters in the postgresql.conf file if the files are placed in a different location or are named differently. Note that changes to the SSL parameter setting and any of the other SSL-related parameters require a database server restart to be put the changes into effect.\n\nTo restart the database on a systemd server, issue the following command as the root user or a user with sudo access:\n\n> systemctl restart edb-as-<version>\n\nWhere <version> is the major version of the EDB Postgres Advanced Server instance (e.g., 15).\n\nTo restart the database on an initd server, issue the following command as the root user or a user with sudo access:\n\n> systemctl restart edb-as-<version>\n\nWhere <version> is the major version of the EDB Postgres Advanced Server instance (e.g., 15).\n\nAfter verifying SSL is enabled for the database, open the pg_hba.conf file in an editor to configure the host-based authentication settings. The default location for the pg_hba.conf file is in the postgresql data directory (PGDATA). The location of the pg_hba.conf file for a running EDB postgres instance can be found using the following command run from a command prompt:\n\n> psql -d <database-name> -U <username> -c \"SHOW hba_file\"\n\nWhere <database-name> is any database in the EDB postgres instance and <username> is a database superuser. By default, a database named \"edb\" and a superuser named \"enterprisedb\" are installed with EDB Postgres Advanced Server (EPAS).\n\nObtain approval and document any uncommented entries with corresponding justification that are not of type hostssl and do not include the \"clientcert=1\" option.\n\nFor any entries that are not of type hostssl authentication with the \"clientcert=1\" option and not documented and approved, change the \"TYPE\" column to \"hostssl\" and add the \"clientcert=1\" authentication method option.\n\nNote that changes to the host-based authentication settings require a database reload in order to apply the updated settings.\n\nTo reload the database on a systemd server, issue the following command as the root user or a user with sudo access:\n\n> systemctl reload edb-as-<version> \n\nWhere <version> is the major version of the EDB Postgres Advanced Server instance (e.g., 15).\n\nTo reload the database on an initd server, issue the following command as the root user or a user with sudo access:\n\n> systemctl reload edb-as-<version>\n\nWhere <version> is the major version of the EDB Postgres Advanced Server instance (e.g., 15).\n\nFor more information on configuring PostgreSQL to use SSL, consult the following documentation: https://www.postgresql.org/docs/current/ssl-tcp.html","ccis":["CCI-002420"]},{"vulnId":"V-259293","ruleId":"SV-259293r961641_rule","severity":"medium","ruleTitle":"The EDB Postgres Advanced Server must maintain the confidentiality and integrity of information during reception.","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, the DBMS, associated applications, and infrastructure must leverage protection mechanisms.\n\nEDB Postgres Advanced Server provides native support for using SSL connections to encrypt client/server communications. To enable the use of SSL, the postgres \"ssl\" configuration parameter must be set to \"on\", 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 nonlocal 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.","checkContent":"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.\n\nFirst, check if SSL is enabled for the database instance by executing the following command from a command prompt:\n\n> psql -d <database-name> -U <username> -c \"SHOW ssl\"\n\nWhere <database-name> is any database in the EDB Postgres instance and <username> is a database superuser. By default, a database named \"edb\" and a superuser named \"enterprisedb\" are installed with EDB Postgres Advanced Server (EPAS).\n\nIf the result is not \"on\", this is a finding.\n\nNext, open the pg_hba.conf file in a viewer or editor and review the authentication settings that are configured in that file.\n\nThe default location for the pg_hba.conf file is in the postgresql data directory. The location of the pg_hba.conf file for a running EDB postgres instance can be found using the following command run from a command prompt:\n\n> psql -d <database-name> -U <username> -c \"SHOW hba_file\"\n\nWhere <database-name> is any database in the EDB postgres instance and <username> is a database superuser. By default, a database named \"edb\" and a superuser named \"enterprisedb\" are installed with EDB Postgres Advanced Server (EPAS).\n\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.","fixText":"To configure EDB Postgres Advanced Server to use SSL, open the \"postgresql.conf\" file in an editor. The default location for the postgresql.conf file is in the postgresql data directory (PGDATA). The location of the postgresql.conf for a running EDB Postgres instance can be found using the following command run from a command prompt:\n\n> psql -d <database-name> -U <username> -c \"SHOW config_file\"\n\nWhere <database-name> is any database in the EDB postgres instance and <username> is a database superuser. By default, a database named \"edb\" and a superuser named \"enterprisedb\" are installed \nwith EDB Postgres Advanced Server (EPAS).\n\nIn the postgresql.conf file, set the \"ssl\" parameter as follows:\n\nssl = on\n\nEnsure the parameter is uncommented.\n\nIn order to start an EDB Postgres Advanced Server instance in SSL mode, files containing the server certificate and private key must exist. By default, these files are expected to exist in the Postgres data directory and are expected to be named server.crt and server.key, respectively. Update the ssl_cert_file and ssl_cert_key parameters in the postgresql.conf file if the files are placed in a different location or are named differently.\n\nNote that changes to the SSL parameter setting and any of the other SSL- related parameters require a database server restart to be put the changes into effect.\n\nTo restart the database on a systemd server, issue the following command as the root user or a user with sudo access:\n\n> systemctl restart edb-as-<version>\n\nWhere <version> is the major version of the EDB Postgres Advanced Server instance (e.g., 15).\n\nTo restart the database, issue the following command as the root user or a user with sudo access:\n\n> systemctl restart edb-as-<version>\n\nWhere <version> is the major version of the EDB Postgres Advanced Server instance (e.g., 14).\n\nAfter verifying that SSL is enabled for the database, open the pg_hba.conf file in an editor to configure the host-based authentication settings. Note that the default location for the pg_hba.conf file is in the postgresql data directory (PGDATA). The location of the pg_hba.conf file for a running EDB postgres instance can be found using the following command run from a command prompt:\n\n> psql -d <database-name> -U <username> -c \"SHOW hba_file\"\n\nWhere <database-name> is any database in the EDB postgres instance and <username> is a database superuser. By default, a database named \"edb\" and a superuser named \"enterprisedb\" are installed with EDB Postgres Advanced Server (EPAS).\n\nObtain approval and document any uncommented entries with corresponding justification that are not of type hostssl and do not include the \"clientcert=1\" option.\n\nFor any entries that are not of type hostssl authentication with the \"clientcert=1\" option and not documented and approved, change the \"TYPE\" column to \"hostssl\" and add the \"clientcert=1\" authentication method option.\n\nNote that changes to the host-based authentication settings require a database reload in order to apply the updated settings.","ccis":["CCI-002422"]},{"vulnId":"V-259294","ruleId":"SV-259294r961656_rule","severity":"medium","ruleTitle":"When invalid inputs are received, the EDB Postgres Advanced Server must behave in a predictable and documented manner that reflects organizational and system objectives.","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.\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.","checkContent":"Execute the following SQL as \"enterprisedb\" operating system user:\n\n> psql edb -c \"SELECT * FROM sqlprotect.list_protected_users\"\n\nIf the database and user that handles user input is not listed or if sqlprotect.list_protected_users does not exist (meaning SQL/Protect is not installed), and an alternative means of reviewing for vulnerable code is not in use, this is a finding.","fixText":"Install and configure SQL/Protect as documented here for the specific version being used: https://www.enterprisedb.com/docs/epas/latest/epas_security_guide/02_protecting_against_sql_injection_attacks/02_configuring_sql_protect/\n\nAlternatively, implement, document, and maintain another method of checking for the validity of inputs.","ccis":["CCI-002754"]},{"vulnId":"V-259295","ruleId":"SV-259295r961683_rule","severity":"medium","ruleTitle":"Security-relevant software updates to the EDB Postgres Advanced Server must be installed within the time period directed by an authoritative source (e.g., IAVM, CTOs, DTMs, and STIGs).","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. Timeframes 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).","checkContent":"Obtain evidence that software patches are obtained from EnterpriseDB and are consistently applied to the DBMS within the timeframe defined for each patch. Verify the current EDB Postgres Advanced Server version by running the following command as the enterprisedb user:\n\n> /usr/edb/as15/bin/edb-postgres --version\n\nIf such evidence cannot be obtained, or the evidence that is obtained indicates a pattern of noncompliance, this is a finding.\n\nIf an administrator is not registered on the EDB Support Portal with an email address for monitoring technical alerts, this is a finding.","fixText":"Institute and adhere to policies and procedures to ensure that patches are consistently obtained from EnterpriseDB and applied to the DBMS within the time allowed.\n\nEnsure that a monitored email address is registered as a user on the EDB support portal and is receiving technical alerts.","ccis":["CCI-002605"]},{"vulnId":"V-259296","ruleId":"SV-259296r961791_rule","severity":"medium","ruleTitle":"The EDB Postgres Advanced Server must generate audit records when security objects are accessed.","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","checkContent":"Execute the following SQL the \"enterprisedb\" operating system user:\n\n> psql edb -c \"SHOW edb_audit_statement\"\n\nIf the result is not \"all\" or if the current setting for this requirement has not been noted and approved by the organization in the system documentation, this is a finding.","fixText":"Execute the following SQL as the \"enterprisedb\" operating system user:\n\n> psql edb -c \"ALTER SYSTEM SET edb_audit_statement = 'all'\"\n> psql edb -c \"SELECT pg_reload_conf()\"\n\nor\n\nUpdate the system documentation to note the organizationally approved setting and corresponding justification of the setting for this requirement.","ccis":["CCI-000172"]},{"vulnId":"V-259297","ruleId":"SV-259297r961791_rule","severity":"medium","ruleTitle":"The EDB Postgres Advanced Server must generate audit records when unsuccessful attempts to access security objects occur.","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.","checkContent":"Execute the following SQL the \"enterprisedb\" operating system user:\n\n> psql edb -c \"SHOW edb_audit_statement\"\n\nIf the result is not \"all\" or if the current setting for this requirement has not been noted and approved by the organization in the system documentation, this is a finding.","fixText":"Execute the following SQL as the \"enterprisedb\" operating system user:\n\n> psql edb -c \"ALTER SYSTEM SET edb_audit_statement = 'all'\"\n> psql edb -c \"SELECT pg_reload_conf()\"\n\nor\n\nUpdate the system documentation to note the organizationally approved setting and corresponding justification of the setting for this requirement.","ccis":["CCI-000172"]},{"vulnId":"V-259298","ruleId":"SV-259298r961797_rule","severity":"medium","ruleTitle":"The EDB Postgres Advanced Server must generate audit records when categories of information (e.g., classification levels/security levels) are accessed.","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.","checkContent":"Review the system documentation to determine whether it is required to track categorized information, such as classification or sensitivity level. If it is not, this is not applicable.\n\nExecute the following SQL the \"enterprisedb\" operating system user:\n\n> psql edb -c \"SHOW edb_audit_statement\"\n\nIf the result is not \"all\" or if the current setting for this requirement has not been noted and approved by the organization in the system documentation, this is a finding.","fixText":"Execute the following SQL as the \"enterprisedb\" operating system user:\n\n> psql edb -c \"ALTER SYSTEM SET edb_audit_statement = 'all'\"\n> psql edb -c \"SELECT pg_reload_conf()\"\n\nor\n\nUpdate the system documentation to note the organizationally approved setting and corresponding justification of the setting for this requirement.","ccis":["CCI-000172"]},{"vulnId":"V-259299","ruleId":"SV-259299r961797_rule","severity":"medium","ruleTitle":"Audit records must be generated when unsuccessful attempts to access categorized information (e.g., classification levels/security levels) occur.","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.","checkContent":"Review the system documentation to determine whether it is required to track categorized information, such as classification or sensitivity level. If it is not, this is not applicable.\n\nExecute the following SQL the \"enterprisedb\" operating system user:\n\n> psql edb -c \"SHOW edb_audit_statement\"\n\nIf the result is not \"all\" or if the current setting for this requirement has not been noted and approved by the organization in the system documentation, this is a finding.","fixText":"Execute the following SQL as the \"enterprisedb\" operating system user:\n\n> psql edb -c \"ALTER SYSTEM SET edb_audit_statement = 'all'\"\n> psql edb -c \"SELECT pg_reload_conf()\"\n\nor\n\nUpdate the system documentation to note the organizationally approved setting and corresponding justification of the setting for this requirement.","ccis":["CCI-000172"]},{"vulnId":"V-259300","ruleId":"SV-259300r961800_rule","severity":"medium","ruleTitle":"The EDB Postgres Advanced Server must generate audit records when privileges/permissions are added.","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 individuals' and groups' 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.","checkContent":"Execute the following SQL the \"enterprisedb\" operating system user:\n\n> psql edb -c \"SHOW edb_audit_statement\"\n\nIf the result is not \"all\" or if the current setting for this requirement has not been noted and approved by the organization in the system documentation, this is a finding.","fixText":"Execute the following SQL as the \"enterprisedb\" operating system user:\n\n> psql edb -c \"ALTER SYSTEM SET edb_audit_statement = 'all'\"\n> psql edb -c \"SELECT pg_reload_conf()\"\n\nor\n\nUpdate the system documentation to note the organizationally approved setting and corresponding justification of the setting for this requirement.","ccis":["CCI-000172"]},{"vulnId":"V-259301","ruleId":"SV-259301r961800_rule","severity":"medium","ruleTitle":"The EDB Postgres Advanced Server must generate audit records when unsuccessful attempts to add privileges/permissions occur.","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 individuals' and groups' 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.","checkContent":"Execute the following SQL the \"enterprisedb\" operating system user:\n\n> psql edb -c \"SHOW edb_audit_statement\"\n\nIf the result is not \"all\" or if the current setting for this requirement has not been noted and approved by the organization in the system documentation, this is a finding.","fixText":"Execute the following SQL as the \"enterprisedb\" operating system user:\n\n> psql edb -c \"ALTER SYSTEM SET edb_audit_statement = 'all'\"\n> psql edb -c \"SELECT pg_reload_conf()\"\n\nor\n\nUpdate the system documentation to note the organizationally approved setting and corresponding justification of the setting for this requirement.","ccis":["CCI-000172"]},{"vulnId":"V-259302","ruleId":"SV-259302r961800_rule","severity":"medium","ruleTitle":"The EDB Postgres Advanced Server must generate audit records when privileges/permissions are modified.","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 individuals' and groups' 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.","checkContent":"Execute the following SQL the \"enterprisedb\" operating system user:\n\n> psql edb -c \"SHOW edb_audit_statement\"\n\nIf the result is not \"all\" or if the current setting for this requirement has not been noted and approved by the organization in the system documentation, this is a finding.","fixText":"Execute the following SQL as the \"enterprisedb\" operating system user:\n\n> psql edb -c \"ALTER SYSTEM SET edb_audit_statement = 'all'\"\n> psql edb -c \"SELECT pg_reload_conf()\"\n\nor\n\nUpdate the system documentation to note the organizationally approved setting and corresponding justification of the setting for this requirement.","ccis":["CCI-000172"]},{"vulnId":"V-259303","ruleId":"SV-259303r961800_rule","severity":"medium","ruleTitle":"The EDB Postgres Advanced Server must generate audit records when unsuccessful attempts to modify privileges/permissions occur.","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 individuals' and groups' privileges could go undetected.\n\nIn an SQL environment, modifying permissions is typically 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.","checkContent":"Execute the following SQL the \"enterprisedb\" operating system user:\n\n> psql edb -c \"SHOW edb_audit_statement\"\n\nIf the result is not \"all\" or if the current setting for this requirement has not been noted and approved by the organization in the system documentation, this is a finding.","fixText":"Execute the following SQL as the \"enterprisedb\" operating system user:\n\n> psql edb -c \"ALTER SYSTEM SET edb_audit_statement = 'all'\"\n> psql edb -c \"SELECT pg_reload_conf()\"\n\nor\n\nUpdate the system documentation to note the organizationally approved setting and corresponding justification of the setting for this requirement.","ccis":["CCI-000172"]},{"vulnId":"V-259304","ruleId":"SV-259304r961803_rule","severity":"medium","ruleTitle":"The EDB Postgres Advanced Server must generate audit records when security objects are modified.","description":"Changes in the database objects (tables, views, procedures, and 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.","checkContent":"Execute the following SQL the \"enterprisedb\" operating system user:\n\n> psql edb -c \"SHOW edb_audit_statement\"\n\nIf the result is not \"all\" or if the current setting for this requirement has not been noted and approved by the organization in the system documentation, this is a finding.","fixText":"Execute the following SQL as the \"enterprisedb\" operating system user:\n\n> psql edb -c \"ALTER SYSTEM SET edb_audit_statement = 'all'\"\n> psql edb -c \"SELECT pg_reload_conf()\"\n\nor\n\nUpdate the system documentation to note the organizationally approved setting and corresponding justification of the setting for this requirement.","ccis":["CCI-000172"]},{"vulnId":"V-259305","ruleId":"SV-259305r961803_rule","severity":"medium","ruleTitle":"The EDB Postgres Advanced Server must generate audit records when unsuccessful attempts to modify security objects occur.","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.","checkContent":"Execute the following SQL the \"enterprisedb\" operating system user:\n\n> psql edb -c \"SHOW edb_audit_statement\"\n\nIf the result is not \"all\" or if the current setting for this requirement has not been noted and approved by the organization in the system documentation, this is a finding.","fixText":"Execute the following SQL as the \"enterprisedb\" operating system user:\n\n> psql edb -c \"ALTER SYSTEM SET edb_audit_statement = 'all'\"\n> psql edb -c \"SELECT pg_reload_conf()\"\n\nor\n\nUpdate the system documentation to note the organizationally approved setting and corresponding justification of the setting for this requirement.","ccis":["CCI-000172"]},{"vulnId":"V-259306","ruleId":"SV-259306r961809_rule","severity":"medium","ruleTitle":"Audit records must be generated when categorized information (e.g., classification levels/security levels) is created.","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.","checkContent":"Review the system documentation to determine whether it is required to track categorized information, such as classification or sensitivity level. If it is not, this is not applicable.\n\nExecute the following SQL the \"enterprisedb\" operating system user:\n\n> psql edb -c \"SHOW edb_audit_statement\"\n\nIf the result is not \"all\" or if the current setting for this requirement has not been noted and approved by the organization in the system documentation, this is a finding.","fixText":"Execute the following SQL as the \"enterprisedb\" operating system user:\n\n> psql edb -c \"ALTER SYSTEM SET edb_audit_statement = 'all'\"\n> psql edb -c \"SELECT pg_reload_conf()\"\n\nor\n\nUpdate the system documentation to note the organizationally approved setting and corresponding justification of the setting for this requirement.","ccis":["CCI-000172"]},{"vulnId":"V-259307","ruleId":"SV-259307r961809_rule","severity":"medium","ruleTitle":"Audit records must be generated when categorized information (e.g., classification levels/security levels) is modified.","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.","checkContent":"Review the system documentation to determine whether it is required to track categorized information, such as classification or sensitivity level. If it is not, this is not applicable.\n\nExecute the following SQL the \"enterprisedb\" operating system user:\n\n> psql edb -c \"SHOW edb_audit_statement\"\n\nIf the result is not \"all\" or if the current setting for this requirement has not been noted and approved by the organization in the system documentation, this is a finding.","fixText":"Execute the following SQL as the \"enterprisedb\" operating system user:\n\n> psql edb -c \"ALTER SYSTEM SET edb_audit_statement = 'all'\"\n> psql edb -c \"SELECT pg_reload_conf()\"\n\nor\n\nUpdate the system documentation to note the organizationally approved setting and corresponding justification of the setting for this requirement.","ccis":["CCI-000172"]},{"vulnId":"V-259308","ruleId":"SV-259308r961809_rule","severity":"medium","ruleTitle":"Audit records must be generated when unsuccessful attempts to create categorized information (e.g., classification levels/security levels) occur.","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.","checkContent":"Review the system documentation to determine whether it is required to track categorized information, such as classification or sensitivity level. If it is not, this is not applicable.\n\nExecute the following SQL the \"enterprisedb\" operating system user:\n\n> psql edb -c \"SHOW edb_audit_statement\"\n\nIf the result is not \"all\" or if the current setting for this requirement has not been noted and approved by the organization in the system documentation, this is a finding.","fixText":"Execute the following SQL as the \"enterprisedb\" operating system user:\n\n> psql edb -c \"ALTER SYSTEM SET edb_audit_statement = 'all'\"\n> psql edb -c \"SELECT pg_reload_conf()\"\n\nor\n\nUpdate the system documentation to note the organizationally approved setting and corresponding justification of the setting for this requirement.","ccis":["CCI-000172"]},{"vulnId":"V-259309","ruleId":"SV-259309r961809_rule","severity":"medium","ruleTitle":"Audit records must be generated when unsuccessful attempts to modify categorized information (e.g., classification levels/security levels) occur.","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.","checkContent":"Review the system documentation to determine whether it is required to track categorized information, such as classification or sensitivity level. If it is not, this is not applicable.\n\nExecute the following SQL the \"enterprisedb\" operating system user:\n\n> psql edb -c \"SHOW edb_audit_statement\"\n\nIf the result is not \"all\" or if the current setting for this requirement has not been noted and approved by the organization in the system documentation, this is a finding.","fixText":"Execute the following SQL as the \"enterprisedb\" operating system user:\n\n> psql edb -c \"ALTER SYSTEM SET edb_audit_statement = 'all'\"\n> psql edb -c \"SELECT pg_reload_conf()\"\n\nor\n\nUpdate the system documentation to note the organizationally approved setting and corresponding justification of the setting for this requirement.","ccis":["CCI-000172"]},{"vulnId":"V-259310","ruleId":"SV-259310r961812_rule","severity":"medium","ruleTitle":"The EDB Postgres Advanced Server must generate audit records when privileges/permissions are deleted.","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 individuals' and groups' 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.","checkContent":"Execute the following SQL the \"enterprisedb\" operating system user:\n\n> psql edb -c \"SHOW edb_audit_statement\"\n\nIf the result is not \"all\" or if the current setting for this requirement has not been noted and approved by the organization in the system documentation, this is a finding.","fixText":"Execute the following SQL as the \"enterprisedb\" operating system user:\n\n> psql edb -c \"ALTER SYSTEM SET edb_audit_statement = 'all'\"\n> psql edb -c \"SELECT pg_reload_conf()\"\n\nor\n\nUpdate the system documentation to note the organizationally approved setting and corresponding justification of the setting for this requirement.","ccis":["CCI-000172"]},{"vulnId":"V-259311","ruleId":"SV-259311r961812_rule","severity":"medium","ruleTitle":"The EDB Postgres Advanced Server must generate audit records when unsuccessful attempts to delete privileges/permissions occur.","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 individuals' and groups' 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.","checkContent":"Execute the following SQL the \"enterprisedb\" operating system user:\n\n> psql edb -c \"SHOW edb_audit_statement\"\n\nIf the result is not \"all\" or if the current setting for this requirement has not been noted and approved by the organization in the system documentation, this is a finding.","fixText":"Execute the following SQL as the \"enterprisedb\" operating system user:\n\n> psql edb -c \"ALTER SYSTEM SET edb_audit_statement = 'all'\"\n> psql edb -c \"SELECT pg_reload_conf()\"\n\nor\n\nUpdate the system documentation to note the organizationally approved setting and corresponding justification of the setting for this requirement.","ccis":["CCI-000172"]},{"vulnId":"V-259312","ruleId":"SV-259312r961818_rule","severity":"medium","ruleTitle":"The EDB Postgres Advanced Server must generate audit records when security objects are deleted.","description":"The removal of security objects from the database/DBMS would seriously degrade a system's information assurance posture. If such an event occurs, it must be logged.","checkContent":"Execute the following SQL the \"enterprisedb\" operating system user:\n\n> psql edb -c \"SHOW edb_audit_statement\"\n\nIf the result is not \"all\" or if the current setting for this requirement has not been noted and approved by the organization in the system documentation, this is a finding.","fixText":"Execute the following SQL as the \"enterprisedb\" operating system user:\n\n> psql edb -c \"ALTER SYSTEM SET edb_audit_statement = 'all'\"\n> psql edb -c \"SELECT pg_reload_conf()\"\n\nor\n\nUpdate the system documentation to note the organizationally approved setting and corresponding justification of the setting for this requirement.","ccis":["CCI-000172"]},{"vulnId":"V-259313","ruleId":"SV-259313r961818_rule","severity":"medium","ruleTitle":"The EDB Postgres Advanced Server must generate audit records when unsuccessful attempts to delete security objects occur.","description":"The removal of security objects from the database/DBMS 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.","checkContent":"Execute the following SQL as the \"enterprisedb\" operating system user:\n\n> psql edb -c \"SHOW edb_audit_statement\"\n\nIf the result is not \"all\" or if the current setting for this requirement has not been noted and approved by the organization in the system documentation, this is a finding.","fixText":"Execute the following SQL as the \"enterprisedb\" operating system user:\n\n> psql edb -c \"ALTER SYSTEM SET edb_audit_statement = 'all'\"\n> psql edb -c \"SELECT pg_reload_conf()\"\n\nor\n\nUpdate the system documentation to note the organizationally approved setting and corresponding justification of the setting for this requirement.","ccis":["CCI-000172"]},{"vulnId":"V-259314","ruleId":"SV-259314r961821_rule","severity":"medium","ruleTitle":"Audit records must be generated when categorized information (e.g., classification levels/security levels) is deleted.","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.","checkContent":"Review the system documentation to determine whether it is required to track categorized information such as classification or sensitivity level. If it is not, this is not applicable.\n\nExecute the following SQL the \"enterprisedb\" operating system user:\n\n> psql edb -c \"SHOW edb_audit_statement\"\n\nIf the result is not \"all\" or if the current setting for this requirement has not been noted and approved by the organization in the system documentation, this is a finding.","fixText":"Execute the following SQL as the \"enterprisedb\" operating system user:\n\n> psql edb -c \"ALTER SYSTEM SET edb_audit_statement = 'all'\"\n> psql edb -c \"SELECT pg_reload_conf()\"\n\nor\n\nUpdate the system documentation to note the organizationally approved setting and corresponding justification of the setting for this requirement.","ccis":["CCI-000172"]},{"vulnId":"V-259315","ruleId":"SV-259315r961821_rule","severity":"medium","ruleTitle":"Audit records must be generated when unsuccessful attempts to delete categorized information (e.g., classification levels/security levels) occur.","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.","checkContent":"Review the system documentation to determine whether it is required to track categorized information, such as classification or sensitivity level. If it is not, this is not applicable.\n\nExecute the following SQL the \"enterprisedb\" operating system user:\n\n> psql edb -c \"SHOW edb_audit_statement\"\n\nIf the result is not \"all\" or if the current setting for this requirement has not been noted and approved by the organization in the system documentation, this is a finding.","fixText":"Execute the following SQL as the \"enterprisedb\" operating system user:\n\n> psql edb -c \"ALTER SYSTEM SET edb_audit_statement = 'all'\"\n> psql edb -c \"SELECT pg_reload_conf()\"\n\nor\n\nUpdate the system documentation to note the organizationally approved setting and corresponding justification of the setting for this requirement.","ccis":["CCI-000172"]},{"vulnId":"V-259316","ruleId":"SV-259316r961824_rule","severity":"medium","ruleTitle":"The EDB Postgres Advanced Server must generate audit records when successful logons or connections occur.","description":"For completeness of forensic analysis, it is necessary to track who/what (a user or other principal) logs on to the DBMS.","checkContent":"Execute the following SQL as the \"enterprisedb\" operating system user:\n\n> psql edb -c \"SHOW edb_audit_connect\"\n\nIf the result is not \"all\" or if the current setting for this requirement has not been noted and approved by the organization in the system documentation, this is a finding.","fixText":"Execute the following SQL as the \"enterprisedb\" operating system user:\n\n> psql edb -c \"ALTER SYSTEM SET edb_audit_connect = 'all'\"\n> psql edb -c \"ALTER SYSTEM SET edb_audit_disconnect = 'all'\"\n>psql edb -c \"SELECT pg_reload_conf()\"\n\nor\n\nUpdate the system documentation to note the organizationally approved setting and corresponding justification of the setting for this requirement.","ccis":["CCI-000172"]},{"vulnId":"V-259317","ruleId":"SV-259317r961824_rule","severity":"medium","ruleTitle":"The EDB Postgres Advanced Server must generate audit records when unsuccessful logons or connection attempts occur.","description":"For completeness of forensic analysis, it is necessary to track failed attempts to log on to the DBMS. While positive identification may not be possible in a case of failed authentication, as much information as possible about the incident must be captured.","checkContent":"Execute the following SQL as the \"enterprisedb\" operating system user:\n\n> psql edb -c \"SHOW edb_audit_connect\"\n\nIf the result is not \"all\" or if the current setting for this requirement has not been noted and approved by the organization in the system documentation, this is a finding.","fixText":"Execute the following SQL as the \"enterprisedb\" operating system user:\n\n> psql edb -c \"ALTER SYSTEM SET edb_audit_connect = 'all'\"\n> psql edb -c \"ALTER SYSTEM SET edb_audit_disconnect = 'all'\"\n> psql edb -c \"SELECT pg_reload_conf()\"\n\nor\n\nUpdate the system documentation to note the organizationally approved setting and corresponding justification of the setting for this requirement.","ccis":["CCI-000172"]},{"vulnId":"V-259318","ruleId":"SV-259318r961827_rule","severity":"medium","ruleTitle":"The EDB Postgres Advanced Server must generate audit records for all privileged activities or other system-level access.","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;\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 the DBMS 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.","checkContent":"Execute the following SQL as the \"enterprisedb\" operating system user:\n\n> psql edb -c \"SHOW edb_audit_statement\"\n\nIf the result is not \"all\" or if the current setting for this requirement has not been noted and approved by the organization in the system documentation, this is a finding.","fixText":"Execute the following SQL as the \"enterprisedb\" operating system user:\n\n> psql edb -c \"ALTER SYSTEM SET edb_audit_statement = 'all'\"\n> psql edb -c \"SELECT pg_reload_conf()\"\n\nor\n\nUpdate the system documentation to note the organizationally approved setting and corresponding justification of the setting for this requirement.","ccis":["CCI-000172"]},{"vulnId":"V-259319","ruleId":"SV-259319r961827_rule","severity":"medium","ruleTitle":"The EDB Postgres Advanced Server must generate audit records when unsuccessful attempts to execute privileged activities or other system-level access occur.","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:\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.","checkContent":"Execute the following SQL as the \"enterprisedb\" operating system user:\n\n> psql edb -c \"SHOW edb_audit_statement\"\n\nIf the result is not \"all\" or if the current setting for this requirement has not been noted and approved by the organization in the system documentation, this is a finding.","fixText":"Execute the following SQL as the \"enterprisedb\" operating system user:\n\n> psql edb -c \"ALTER SYSTEM SET edb_audit_statement = 'all'\"\n> psql edb -c \"SELECT pg_reload_conf()\"\n\nor\n\nUpdate the system documentation to note the organizationally approved setting and corresponding justification of the setting for this requirement.","ccis":["CCI-000172"]},{"vulnId":"V-259320","ruleId":"SV-259320r961830_rule","severity":"medium","ruleTitle":"The EDB Postgres Advanced Server must generate audit records showing starting and ending time for user access to the database(s).","description":"For completeness of forensic analysis, it is necessary to know how long a user's (or other principal's) connection to the DBMS 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.","checkContent":"Execute the following SQL as the \"enterprisedb\" operating system user:\n\n> psql edb -c \"SHOW edb_audit_connect\"\n\nIf the result is not \"all\" or if the current setting for this requirement has not been noted and approved by the organization in the system documentation, this is a finding.","fixText":"Execute the following SQL as the \"enterprisedb\" operating system user:\n\n> psql edb -c \"ALTER SYSTEM SET edb_audit_connect = 'all'\"\n> psql edb -c \"ALTER SYSTEM SET edb_audit_disconnect = 'all'\"\n> psql edb -c \"SELECT pg_reload_conf()\"\n\nor\n\nUpdate the system documentation to note the organizationally approved setting and corresponding justification of the setting for this requirement.","ccis":["CCI-000172"]},{"vulnId":"V-259321","ruleId":"SV-259321r961833_rule","severity":"medium","ruleTitle":"The EDB Postgres Advanced Server must generate audit records when concurrent logons/connections by the same user from different workstations occur.","description":"For completeness of forensic analysis, it is necessary to track who logs on to the DBMS.\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\nIf 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.","checkContent":"Execute the following SQL as the \"enterprisedb\" operating system user:\n\n> psql edb -c \"SHOW edb_audit_connect\"\n\nIf the result is not \"all\" or if the current setting for this requirement has not been noted and approved by the organization in the system documentation, this is a finding.","fixText":"Execute the following SQL as the \"enterprisedb\" operating system user:\n\n> psql edb -c \"ALTER SYSTEM SET edb_audit_connect = 'all'\"\n> psql edb -c \"ALTER SYSTEM SET edb_audit_disconnect = 'all'\"\n> psql edb -c \"SELECT pg_reload_conf()\"\n\nor\n\nUpdate the system documentation to note the organizationally approved setting and corresponding justification of the setting for this requirement.","ccis":["CCI-000172"]},{"vulnId":"V-259322","ruleId":"SV-259322r961836_rule","severity":"medium","ruleTitle":"The EDB Postgres Advanced Server must be able to generate audit records when successful accesses to objects occur.","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","checkContent":"Execute the following SQL as the \"enterprisedb\" operating system user:\n\n> psql edb -c \"SHOW edb_audit_statement\"\n\nIf the result is not \"all\" or if the current setting for this requirement has not been noted and approved by the organization in the system documentation, this is a finding.","fixText":"Execute the following SQL as the \"enterprisedb\" operating system user:\n\n> psql edb -c \"ALTER SYSTEM SET edb_audit_statement = 'all'\"\n> psql edb -c \"SELECT pg_reload_conf()\"\n\nor\n\nUpdate the system documentation to note the organizationally approved setting and corresponding justification of the setting for this requirement.","ccis":["CCI-000172"]},{"vulnId":"V-259323","ruleId":"SV-259323r961836_rule","severity":"medium","ruleTitle":"The EDB Postgres Advanced Server must generate audit records when unsuccessful accesses to objects occur.","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\n\nTo aid in diagnosis, it is necessary to keep track of failed attempts in addition to the successful ones.","checkContent":"Execute the following SQL as the \"enterprisedb\" operating system user:\n\n> psql edb -c \"SHOW edb_audit_statement\"\n\nIf the result is not \"all\" or if the current setting for this requirement has not been noted and approved by the organization in the system documentation, this is a finding.","fixText":"Execute the following SQL as the \"enterprisedb\" operating system user:\n\n> psql edb -c \"ALTER SYSTEM SET edb_audit_statement = 'all'\"\n> psql edb -c \"SELECT pg_reload_conf()\"\n\nor\n\nUpdate the system documentation to note the organizationally approved setting and corresponding justification of the setting for this requirement.","ccis":["CCI-000172"]},{"vulnId":"V-259324","ruleId":"SV-259324r961839_rule","severity":"medium","ruleTitle":"The EDB Postgres Advanced Server must generate audit records for all direct access to the database(s).","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 nonstandard sources.","checkContent":"Execute the following SQL as the \"enterprisedb\" operating system user:\n\n> psql edb -c \"SHOW edb_audit_statement\"\n> psql edb -c \"SHOW edb_audit_connect\"\n> psql edb -c \"SHOW edb_audit_disconnect\" \n\nIf the result is not \"all\" for any or if the current settings for this requirement have not been noted and approved by the organization in the system documentation, this is a finding.","fixText":"Execute the following SQL as enterprisedb:\n\nALTER SYSTEM SET edb_audit_statement = 'all';\nALTER SYSTEM SET edb_audit_connect = 'all';\nALTER SYSTEM SET edb_audit_disconnect = 'all';\nSELECT pg_reload_conf();\n\nor\n\nUpdate the system documentation to note the organizationally approved setting and corresponding justification of the setting for this requirement.","ccis":["CCI-000172"]},{"vulnId":"V-259325","ruleId":"SV-259325r961857_rule","severity":"medium","ruleTitle":"The EDB Postgres Advanced Server must implement NIST FIPS 140-2 or 140-3 validated cryptographic modules to provision digital signatures.","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-3, Security Requirements For Cryptographic Modules. Note that the product's cryptographic modules must be validated and certified by NIST as FIPS-compliant.","checkContent":"If a FIPS-certified OpenSSL library is not installed, this is a finding.\n\nRun the command \"cat /proc/sys/crypto/fips_enabled\".\n\nIf the output is not \"1\", this is a finding.\n\nFor RedHat 8 or higher, run: \"fips-mode-setup --check\".\n\nIf the output is not \"FIPS mode is enabled\", this is a finding.","fixText":"If fips_enabled = 0 or FIPS mode is not enabled, configure OpenSSL to be FIPS compliant.\n\nConfigure per operating system documentation:\nRedHat7: https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/7/html/security_guide/chap-federal_standards_and_regulations\n\nRedHat8: https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/8/html/security_hardening/assembly_installing-a-rhel-8-system-with-fips-mode-enabled_security-hardening\n\nUbuntu: https://security-certs.docs.ubuntu.com/en/fips","ccis":["CCI-002450"]},{"vulnId":"V-259326","ruleId":"SV-259326r961857_rule","severity":"medium","ruleTitle":"The EDB Postgres Advanced Server must implement NIST FIPS 140-2 or 140-3 validated cryptographic modules to generate and validate cryptographic hashes.","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-3, Security Requirements For Cryptographic Modules. Note that the product's cryptographic modules must be validated and certified by NIST as FIPS-compliant.","checkContent":"If a FIPS-certified OpenSSL library is not installed, this is a finding.\n\nRun the command \"cat /proc/sys/crypto/fips_enabled\".\n\nIf the output is not \"1\", this is a finding.\n\nFor RedHat 8 or higher, run: \"fips-mode-setup --check\".\n\nIf the output is not \"FIPS mode is enabled\", this is a finding.","fixText":"If fips_enabled = 0 or FIPS mode is not enabled, configure OpenSSL to be FIPS compliant.\n\nConfigure per operating system documentation:\nRedHat7: https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/7/html/security_guide/chap-federal_standards_and_regulations\n\nRedHat8: https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/8/html/security_hardening/assembly_installing-a-rhel-8-system-with-fips-mode-enabled_security-hardening\n\nUbuntu: https://security-certs.docs.ubuntu.com/en/fips","ccis":["CCI-002450"]},{"vulnId":"V-259327","ruleId":"SV-259327r961857_rule","severity":"medium","ruleTitle":"The EDB Postgres Advanced Server must implement NIST FIPS 140-2 or 140-3 validated cryptographic modules to protect unclassified information requiring confidentiality and cryptographic protection, in accordance with the requirements of the data owner.","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-3, Security Requirements For Cryptographic Modules. Note that the product's cryptographic modules must be validated and certified by NIST as FIPS-compliant.","checkContent":"If a FIPS-certified OpenSSL library is not installed, this is a finding.\n\nRun the command \"cat /proc/sys/crypto/fips_enabled\".\n\nIf the output is not \"1\", this is a finding.","fixText":"If fips_enabled = 0 or FIPS mode is not enabled, configure OpenSSL to be FIPS compliant.\n\nConfigure per operating system documentation:\n\nRedHat7: https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/7/html/security_guide/chap-federal_standards_and_regulations\n\nRedHat8: https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/8/html/security_hardening/assembly_installing-a-rhel-8-system-with-fips-mode-enabled_security-hardening\n\nUbuntu: https://security-certs.docs.ubuntu.com/en/fips","ccis":["CCI-002450"]},{"vulnId":"V-259328","ruleId":"SV-259328r961860_rule","severity":"medium","ruleTitle":"The EDB Postgres Advanced Server 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.","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\nThe DBMS 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.","checkContent":"If Postgres Enterprise Manager (PEM) or another log collection tool is not installed and configured to automatically collect audit logs, this is a finding.\n\nReview the system documentation for a description of how audit records are off-loaded and how local audit log space is managed.","fixText":"Install PEM and configure the centralized Audit Manager as documented here: https://www.enterprisedb.com/docs/pem/latest/pem_online_help/04_toc_pem_features/04_audit_manager/\n\nIf another tool other than PEM is used, configure it to meet this requirement.","ccis":["CCI-001851"]},{"vulnId":"V-259329","ruleId":"SV-259329r997401_rule","severity":"high","ruleTitle":"EDB Postgres Advanced Server products must be a version supported by the vendor.","description":"Unsupported commercial and database systems should not be used because fixes to newly identified bugs will not be implemented by the vendor. The lack of support can result in potential vulnerabilities.\n\nSystems at unsupported servicing levels or releases will not receive security updates for new vulnerabilities, which leaves them subject to exploitation.\n\nWhen maintenance updates and patches are no longer available, the database software is no longer considered supported and should be upgraded or decommissioned.","checkContent":"Review the system documentation and interview the database administrator.\n \nIdentify all database software components.\n \nReview the current version and release information as follows:\n\n> /usr/edb/as<version>/bin/edb-postgres --version\n \nAccess the EDB website to validate that the version is currently supported: https://www.enterprisedb.com/resources/platform-compatibility\n\nIf the DBMS or any of the software components are not supported by the vendor, this is a finding.","fixText":"Remove or decommission all unsupported software products.\n\nUpgrade unsupported DBMS or unsupported components to a supported version of the product.","ccis":["CCI-003376"]}]}