Select any two versions of this STIG to compare the individual requirements
Select any old version/release of this STIG to view the previous requirements
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. Execute the following as the "enterprisedb" operating system user: > psql edb -c "SELECT rolname, rolconnlimit FROM pg_roles where rolname not like 'pg_%' and rolname not like 'aq_%'" If rolconnlimit is -1 or larger than the system documentation limits for any rolname, this is a finding.
For any roles where rolconnlimit is -1 or larger than the system documentation limits, execute the following SQL as the "enterprisedb" operating system user: > psql edb -c "ALTER USER <username> WITH CONNECTION LIMIT <limit number> "
Verify that pg_hba.conf is not using: "trust", "md5", or "password" as allowable access methods. > cat <path-to-PGDATA-directory>/pg_hba.conf | egrep -I "trust|md5|password"| grep -v "^\#" NOTE: A command line text editor such as VIM or EMACS can also be used to search for "MD5". The default path for PGDATA is /var/lib/edb/as<version>/data, but this will vary according to local circumstances. If any output is produced, verify the users are documented as being authorized to use one of these access methods. If the users are not authorized to use these access methods, this is a finding.
Identify any user that is using "trust", "md5", or "password" as allowable access methods. > cat <path-to-PGDATA-directory>/pg_hba.conf | egrep -I "trust|md5|password"| grep -v "^\#" NOTE: A command line text editor such as VIM or EMACS can also be used such as VIM or EMACS to search for "MD5". The default path for PGDATA is /var/lib/edb/as<version>/data, but this will vary according to local circumstances. Document 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). For 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 Use a command line text editor such as VIM or EMACS to make changes. Example: > vim <path-to-PGDATA-directory>/pg_hba.conf
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. Review the permissions in place for the EDB Postgres Advanced Server. First, check the privileges of all users and roles in the database by running the following command as the "enterprisedb" user: > psql edb -c "\du" If any users or roles have privileges that exceed those that are documented, this is a finding. Next 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: > psql edb -c "\dp" If the privileges assigned to these objects for any users or roles exceeds those that have been documented, this is a finding. Next, 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. > psql edb -c "SHOW hba_file" > cat <output-path-to-file-from above> If any entries do not match the documented authentication requirements, this is a finding.
To determine current user access to database objects, run the following as the "enterprisedb" operating system user: > psql edb -c "SELECT grantee, privilege_type, table_name FROM information_schema.role_table_grants WHERE grantee='<username>'" Use GRANT, REVOKE, and ALTER statements to add and/or remove permissions on server-level securables, bringing them in line with the documented requirements.
Execute the following SQL as the "enterprisedb" operating system user: > psql edb -c "SHOW edb_audit" If the result is not "csv" or "xml", this is a finding.
Execute the following SQL as the "enterprisedb" operating system user: > psql edb -c "ALTER SYSTEM SET edb_audit = csv" > psql edb -c "SELECT pg_reload_conf()" or > psql edb -c "ALTER SYSTEM SET edb_audit = xml" > psql edb -c "SELECT pg_reload_conf()"
Execute the following SQL as the "enterprisedb" operating system user: > psql edb -c "SHOW edb_audit" If the result is not "csv" or "xml", this is a finding.
Execute the following SQL as the "enterprisedb" operating system user: > psql edb -c "ALTER SYSTEM SET edb_audit = csv" > psql edb -c "SELECT pg_reload_conf()" or > psql edb -c "ALTER SYSTEM SET edb_audit = xml" > psql edb -c "SELECT pg_reload_conf()"
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. If the files are not owned by enterprisedb (user)/enterprisedb (group) or do not have RW permission for the user only, this is a finding.
Run these commands as the "root" user (or user with sudo privileges) from the EDB Postgres Advanced Server data (PGDATA) directory: > chown enterprisedb postgresql*.conf > chgrp enterprisedb postgresql*.conf > chmod 600 postgresql*.conf The 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: > chown enterprisedb postgresql*.conf > chgrp enterprisedb postgresql*.conf > chmod 600 postgresql*.conf The default path for the postgresql*.conf files is /var/lib/edb/as<version>/data (PGDATA), but this will vary according to local circumstances.
Execute the following SQL as the "enterprisedb" operating system user: > psql edb -c "SHOW edb_audit_statement" If 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.
Execute the following SQL as the "enterprisedb" operating system user: > psql edb -c "ALTER SYSTEM SET edb_audit_statement = 'all'" > psql edb -c "SELECT pg_reload_conf()" or Update the system documentation to note the organizationally approved setting and corresponding justification of the setting for this requirement.
Execute the following SQL as the "enterprisedb" operating system user: > psql edb -c "SHOW edb_audit_statement" If 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.
Execute the following SQL as the "enterprisedb" operating system user: psql edb -c "ALTER SYSTEM SET edb_audit_statement = 'all'" psql edb -c "SELECT pg_reload_conf()" or Update the system documentation to note the organizationally approved setting and corresponding justification of the setting for this requirement.
Execute the following SQL as the "enterprisedb" operating system user: > psql edb -c "SHOW edb_audit_statement" If 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.
Execute the following SQL as the "enterprisedb" operating system user: psql edb -c "ALTER SYSTEM SET edb_audit_statement = 'all'" psql edb -c "SELECT pg_reload_conf()" or Update the system documentation to note the organizationally approved setting and corresponding justification of the setting for this requirement.
Execute the following SQL as the "enterprisedb" operating system user: > psql edb -c "SHOW edb_audit_statement" If 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.
Execute the following SQL as the "enterprisedb" operating system user: > psql edb -c "ALTER SYSTEM SET edb_audit_statement = 'all'" > psql edb -c "SELECT pg_reload_conf()" or Update the system documentation to note the organizationally approved setting and corresponding justification of the setting for this requirement.
Execute the following SQL as the "enterprisedb" operating system user: > psql edb -c "SHOW edb_audit_statement" If 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.
Execute the following SQL as the "enterprisedb" operating system user: > psql edb -c "ALTER SYSTEM SET edb_audit_statement = 'all'" > psql edb -c "SELECT pg_reload_conf()" or Update the system documentation to note the organizationally approved setting and corresponding justification of the setting for this requirement.
Execute the following SQL as the "enterprisedb" operating system user: > psql edb -c "SHOW edb_audit_statement" If 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.
Execute the following SQL as the "enterprisedb" operating system user: > psql edb -c "ALTER SYSTEM SET edb_audit_statement = 'all'" > psql edb -c "SELECT pg_reload_conf()" or Update the system documentation to note the organizationally approved setting and corresponding justification of the setting for this requirement.
Execute the following SQL as the "enterprisedb" operating system user: > psql edb -c "SHOW edb_audit_statement" If 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.
Execute the following SQL as the "enterprisedb" operating system user: > psql edb -c "ALTER SYSTEM SET edb_audit_statement = 'all'" > psql edb -c "SELECT pg_reload_conf()" or Update the system documentation to note the organizationally approved setting and corresponding justification of the setting for this requirement.
Execute the following SQL as the "enterprisedb" operating system user: > psql edb -c "SHOW edb_audit_statement" If 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.
Execute the following SQL as the "enterprisedb" operating system user: > psql edb -c "ALTER SYSTEM SET edb_audit_statement = 'all'" > psql edb -c "SELECT pg_reload_conf()" or Update the system documentation to note the organizationally approved setting and corresponding justification of the setting for this requirement.
Execute the following SQL as the "enterprisedb" operating system user: > psql edb -c "SHOW edb_audit_statement" If 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.
Execute the following SQL as the "enterprisedb" operating system user: > psql edb -c "ALTER SYSTEM SET edb_audit_statement = 'all'" > psql edb -c "SELECT pg_reload_conf()" or Update the system documentation to note the organizationally approved setting and corresponding justification of the setting for this requirement.
Review the system documentation to identify what additional information the organization has determined necessary. Check 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. If any additional information is defined and is not included in the audit records, this is a finding.
Execute the following SQL to set additional detailed information for the audit records in the session: set edb_audit_tag = '<information>'; Replace <information> with a character string holding the additional data that must be captured. To 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: CREATE OR REPLACE FUNCTION add_audit_info() RETURNS trigger AS $BODY $BEGIN SET edb_audit_tag = '<information>'; RETURN NEW; END; $BODY $LANGUAGE plpgsql; CREATE TRIGGER add_audit_info_trigger BEFORE INSERT ON <table> FOR EACH ROW EXECUTE PROCEDURE add_audit_info();
If the application owner has determined that the need for system availability outweighs the need for a complete audit trail, this is not applicable. If Postgres Enterprise Manager (PEM) is installed and configured to shut down the database when the audit log is full, this is not a finding. Otherwise, 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. If the procedures do not exist, this is a finding. If the procedures exist, request evidence that they are followed. If the evidence indicates that the procedures are not followed, this is a finding. If 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.
Modify DBMS, OS, or third-party logging application settings to alert appropriate personnel when a specific percentage of log storage capacity is reached. If 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.
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. If 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.
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: 1. Add the following to the bottom of the /etc/logrotate.conf file: <path-to-PGDATA-directory>/edb_audit/audit.csv { size 10M dateext dateformat .%Y-%m-%d.%s copytruncate rotate 8 } The 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. 2. Create the file /etc/cron.hourly/logrotate with these contents: #!/bin/sh /usr/sbin/logrotate /etc/logrotate.conf EXITVALUE=$? if [ $EXITVALUE != 0 ]; then /usr/bin/logger -t logrotate "ALERT exited abnormally with [$EXITVALUE]" fi exit 0 3. Issue these SQL statements: ALTER SYSTEM SET edb_audit_filename = 'audit'; SELECT pg_reload_conf();
Verify User ownership, Group ownership, and permissions on the "edb_audit" directory: > ls -ld <path-to-data-directory>/edb_audit If the User owner is not "enterprisedb", this is a finding. If the Group owner is not "enterprisedb", this is a finding. If the directory is more permissive than 700, this is a finding. The default path for the edb_audit directory 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: > chown enterprisedb edb_audit > chgrp enterprisedb edb_audit > chmod 700 edb_audit The default path for the edb_audit directory is /var/lib/edb/as<version>/data (PGDATA), but this will vary according to local circumstances.
Verify User ownership, Group ownership, and permissions on the "edb_audit" directory: > ls -ld <path-to-data-directory>/edb_audit If the User owner is not "enterprisedb", this is a finding. If the Group owner is not "enterprisedb", this is a finding. If the directory is more permissive than 700, this is a finding. The default path for the edb_audit directory 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: > chown enterprisedb edb_audit > chgrp enterprisedb edb_audit > chmod 700 edb_audit The default path for the edb_audit directory is /var/lib/edb/as<version>/data (PGDATA), but this will vary according to local circumstances.
Verify User ownership, Group ownership, and permissions on the "edb_audit" directory: > ls -ld <path-to-data-directory>/edb_audit If the User owner is not "enterprisedb", this is a finding. If the Group owner is not "enterprisedb", this is a finding. If the directory is more permissive than 700, this is a finding. The default path for the edb_audit directory 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: > chown enterprisedb edb_audit > chgrp enterprisedb edb_audit > chmod 700 edb_audit The default path for the edb_audit directory is /var/lib/edb/as<version>/data (PGDATA), but this will vary according to local circumstances.
Verify User ownership, Group ownership, and permissions on the "edb_audit" directory: > ls -ld <path-to-data-directory>/edb_audit If the User owner is not "enterprisedb", this is a finding. If the Group owner is not "enterprisedb", this is a finding. If the directory is more permissive than 700, this is a finding. The default path for the edb_audit directory 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: > chown enterprisedb edb_audit > chgrp enterprisedb edb_audit > chmod 700 edb_audit The default path for the edb_audit directory is /var/lib/edb/as<version>/data (PGDATA), but this will vary according to local circumstances.
Verify User ownership, Group ownership, and permissions on the "edb_audit" directory: > ls -ld <path-to-data-directory>/edb_audit If the User owner is not "enterprisedb", this is a finding If the Group owner is not "enterprisedb", this is a finding. If the directory is more permissive than 700, this is a finding. The default path for the edb_audit directory 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: > chown enterprisedb edb_audit > chgrp enterprisedb edb_audit > chmod 700 edb_audit The default path for the edb_audit directory is /var/lib/edb/as<version>/data (PGDATA), but this will vary according to local circumstances.
Verify User ownership, Group ownership, and permissions on the "edb_audit" directory: > ls -ld <path-to-data-directory>/edb_audit If the User owner is not "enterprisedb", this is a finding. If the Group owner is not "enterprisedb", this is a finding. If the directory is more permissive than 700, this is a finding. The default path for the edb_audit directory 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: > chown enterprisedb edb_audit > chgrp enterprisedb edb_audit > chmod 700 edb_audit The default path for the edb_audit directory is /var/lib/edb/as<version>/data (PGDATA), but this will vary according to local circumstances.
Review monitoring procedures and implementation evidence to verify monitoring of changes to database software libraries, related applications, and configuration files is done. Verify the list of files and directories being monitored is complete. If monitoring does not occur or is not complete, this is a finding.
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. Use file hashes or checksums for comparisons, as file dates may be manipulated by malicious users.
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: select job, what from ALL_JOBS; Additionally, in Postgres Enterprise Manager, navigate to the "Jobs" node of the database and examine the job from there. If 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: > psql edb -c "SHOW edb_audit_statement" The output should return "all". If 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.
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/ Alternatively, the EDB audit utility can capture these changes by enabling as follows: Execute the following SQL as the "enterprisedb" operating system user: > psql edb -c "ALTER SYSTEM SET edb_audit_statement = 'all'" > psql edb -c "SELECT pg_reload_conf()"
Review procedures for controlling, granting access to, and tracking use of the DBMS software installation account. If 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.
Develop, document, and implement procedures to restrict and track use of the DBMS software installation account.
Review the DBMS software library directory and note other root directories located on the same disk directory or any subdirectories. If 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. Only 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. If other applications are located in the same directory as the DBMS, this is a finding.
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.
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: psql edb -c "SELECT * FROM sys.all_objects;" If any database objects are found to be owned by users not authorized to own database objects, this is a finding.
Assign ownership of authorized objects to authorized object owner accounts by running the following SQL command for each object to be changed: ALTER <type> <object name> OWNER TO <new owner>; For example: ALTER TABLE my_table OWNER TO APP_USER;
Use psql to connect to the database as enterprisedb and run this command: \dp *.* If any unauthorized roles have unauthorized accesses, this is a finding. Definitions of the access privileges are defined here: http://www.postgresql.org/docs/current/static/sql-grant.html
Revoke unauthorized privileges. The syntax is: REVOKE <privilege> ON <object> FROM <role>. Example: REVOKE INSERT ON mytable FROM PUBLIC; Refer to PostgreSQL documentation for details: https://www.postgresql.org/docs/current/sql-revoke.html
Review vendor documentation and vendor websites for vendor-provided demonstration or sample databases, database applications, objects, and files. Review 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. If any are present in the database or are included with the DBMS application, this is a finding. Check for the existence of EDB Postgres sample databases: postgres and edb. Execute the following SQL as the "enterprisedb" operating system user: psql edb -c "SELECT datname FROM pg_database WHERE datistemplate = false" If any databases are listed here that are not used by the application, this is a finding. Note: the "postgres" and "edb" databases are internal databases that are part of the EDB Postgres Advanced Server.
Remove any unused databases from the DBMS. To remove a database, execute the follow SQL as the enterprised user: > psql edb -c "DROP DATABASE <database>" or > dropdb <database_name>
Review the list of components and features installed with the database. If unused components are installed and are not documented and authorized, this is a finding. RPM can also be used to check what is installed: > yum list installed | grep edb- This returns EDB database packages that have been installed. If any packages displayed by this command are not being used, this is a finding.
Review the EDB Postgres Advanced Server packages available in the installation guide here: https://www.enterprisedb.com/docs/epas/<version number>/ Uninstall all packages that are not required by running the following as the "root" user: > yum erase -y <package-name> At 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.
Run the following command as the "root" user: > yum list installed | grep edb- If any packages are installed that are not required, this is a finding.
Review the EDB Postgres Advanced Server packages available in the installation guide here: https://www.enterprisedb.com/docs/epas/<version number>/ Uninstall all packages that are not required by running the following as the "root" user: > yum erase -y <package-name> At 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.
Run the following command as the "root" user: > yum list installed | grep edb- If any packages are installed that are not required, this is a finding.
Review the EDB Postgres Advanced Server packages available in the installation guide here: https://www.enterprisedb.com/docs/epas/<version number>/ Uninstall all packages that are not required by running the following as the "root" user: > yum erase -y <package-name> At 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.
Execute the following SQL as the "enterprisedb" operating system user: > psql edb -c "SHOW port" > psql edb -c "SHOW listen_addresses" If the port or addresses are not approved, this is a finding.
Execute the following SQL as the "enterprisedb" operating system user: > psql edb -c "ALTER SYSTEM SET port = <port number>" > psql edb -c "ALTER SYSTEM SET listen_addresses = '<addresses>'" Execute the following operating system command as the "root" user: > systemctl restart edb-as-<version> Note: <version> is the major version of the EDB Postgres Advanced Server instance (e.g., 15).
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. If any rows have "trust" specified for the "METHOD" column, this is a finding.
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. If any rows have "trust" specified for the "METHOD" column, delete the rows or change them to other authentication methods. Permitted methods in preferred order are: peer (local only), cert, ldap, sspi, pam, and scram-sha-256.
If DBMS authentication, using passwords, is not employed, this is not a finding. In a SQL window, run this command: select * from dba_profiles; If there are UNLIMITED or NULL values in the "limit" column, this is a finding. Review 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. a. minimum of 15 characters, including at least one of each of the following character sets: - Uppercase - Lowercase - Numeric - Special characters (e.g., ~ ! @ # $ % ^ & * ( ) _ + = - ' [ ] / ? > <) b. Minimum number of characters changed from previous password: 50 percent of the minimum password length; that is, eight. Review the DBMS settings relating to password lifetime. Determine whether the following rules are enforced. If any are not, this is a finding. a. Password lifetime limits for interactive accounts: minimum 24 hours, maximum 60 days. b. Password lifetime limits for noninteractive accounts: minimum 24 hours, maximum 365 days. c. Number of password changes before an old one may be reused: minimum of five.
After creating a password verification function, configure the default profile to use it and the other required password related settings. To 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. Before creating the password verification function, check whether the fuzzystrmatch extension is installed by executing the following SQL query as enterprisedb: SELECT extname FROM pg_extension; If "fuzzystrmatch" is not listed, execute the following SQL to install the extension as enterprisedb: CREATE EXTENSION fuzzystrmatch; With the fuzzystrmatch extension installed, execute the following SQL statements as enterprisedb: CREATE OR REPLACE FUNCTION sys.dod_verify_password(user_name varchar2, new_password varchar2, old_password varchar2) RETURN boolean IMMUTABLE IS pwd_length integer := NVL( length(new_password), 0 ); min_length integer := 15; min_lower integer := 1; min_upper integer := 1; min_numeric integer := 1; min_special integer := 1; min_diff integer := ceil(min_length::numeric / 2); cnt_lower integer := 0; cnt_upper integer := 0; cnt_numeric integer := 0; cnt_special integer := 0; cnt_diff integer := 0; i integer ; curr_char CHAR(1); BEGIN -- -- Check Length of new password -- IF ( pwd_length < min_length ) THEN raise_application_error(-20001, 'Password is too short. Password must be at least '||min_length||' characters long.'); END IF; -- -- Get count of each character type in new password. -- FOR i in 1..pwd_length LOOP curr_char := substr(new_password, i, 1); IF ( curr_char SIMILAR TO '[a-z]' ) THEN cnt_lower := cnt_lower + 1; ELSIF ( curr_char SIMILAR TO '[A-Z]' ) THEN cnt_upper := cnt_upper + 1; ELSIF ( curr_char SIMILAR TO '[0-9]' ) THEN cnt_numeric := cnt_numeric + 1; ELSE cnt_special := cnt_special + 1; END IF; END LOOP; -- -- Calculate Levenshtein difference between old and new password -- cnt_diff := levenshtein( old_password, new_password ); -- Check if new password has minimum number of lowercase characters IF cnt_lower < min_lower THEN raise_application_error(-20004, 'Password must contain at least '||min_lower||' lowercase character(s)'); END IF; -- Check if new password has minimum number of uppercase characters IF cnt_upper < min_upper THEN raise_application_error(-20003, 'Password must contain at least '||min_upper||' uppercase character(s)'); END IF; -- Check if new password has minimum number of numeric characters IF cnt_numeric < min_numeric THEN raise_application_error(-20005, 'Password must contain at least '||min_numeric||' numeric character(s)'); END IF; -- Check if new password has minimum number of special characters IF cnt_special < min_special THEN raise_application_error(-20006, 'Password must contain at least '||min_special||' special character(s)'); END IF; -- Check if new password differs from old password by minimum number of required characters IF cnt_diff < min_diff THEN raise_application_error(-20007, 'Password must differ from old password by at least '||min_diff||' character(s)'); END IF; RETURN true; END; ALTER FUNCTION sys.dod_verify_password(varchar2, varchar2, varchar2) OWNER TO enterprisedb; Next, execute the following statement (or a variant of this) to set the default profile for DOD standards: ALTER PROFILE DEFAULT LIMIT FAILED_LOGIN_ATTEMPTS 3 PASSWORD_LOCK_TIME 1 PASSWORD_LIFE_TIME 60 PASSWORD_GRACE_TIME 3 PASSWORD_REUSE_TIME 180 PASSWORD_REUSE_MAX 5 PASSWORD_VERIFY_FUNCTION dod_verify_password; Note 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.
Execute the following SQL as the "enterprisedb" user: SHOW password_encryption; If the value is not "scram-sha-256", this is a finding.
Execute the following SQL as the "enterprisedb" user: ALTER SYSTEM SET password_encryption = 'scram-sha-256'; SELECT pg_reload_conf();
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. If 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.
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. For any rows that have TYPE of "hostssl", append "clientcert=1" in the OPTIONS column at the end of the line.
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. If 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.
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. For any rows that have TYPE of "hostssl", append "clientcert=1" in the OPTIONS column at the end of the line.
Verify User ownership, Group ownership, and permissions on the "server.key" file: > ls -alL <postgresql data directory>/server.key If the User owner is not "enterprisedb", this is a finding. If the Group owner is not "enterprisedb", this is a finding. If the file is more permissive than 600, this is a finding. The default path for the postgresql data directory is /var/lib/edb/as<version>/data (PGDATA), but this will vary according to local circumstances.
Run these commands: > chown enterprisedb <postgresql data directory>/server.key" > chgrp enterprisedb <postgresql data directory>/server.key > chmod 600 <postgresql data directory>/server.key The default path for the postgresql data directory is /var/lib/edb/as<version>/data (PGDATA), but this will vary according to local circumstances.
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. To check the cn of the certificate, using openssl, do the following: $ openssl x509 -noout -subject -in client_cert If the cn does not match the users listed in PostgreSQL and no user mapping is used, this is a finding. User 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: $ sudo su - enterprisedb $ grep "map" $<data directory>/pg_hba.conf The default path for the postgresql data directory is /var/lib/edb/as<version>/data (PGDATA), but this will vary according to local circumstances. With the names of the maps used, check those maps against the user name mappings in pg_ident.conf: $ sudo su - enterprisedb $ cat <data directory>/pg_ident.conf If user accounts are not being mapped to authenticated identities, this is a finding. If the cn and the username mapping do not match, this is a finding.
Configure PostgreSQL to map authenticated identities directly to PostgreSQL user accounts.
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. Request 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.
For psql, which can accept a plain-text password, and any other essential tool with the same limitation: 1. Document the need for it, who uses it, and any relevant mitigations, and obtain AO approval. 2. 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.
Determine whether any applications that access the database allow for entry of the account name and password or PIN. If any do, determine whether these applications obfuscate authentication data. If they do not, this is a finding.
Configure or modify applications to prohibit display of passwords in clear text.
If a FIPS-certified OpenSSL library is not installed, this is a finding. Run the command "cat /proc/sys/crypto/fips_enabled". If the output is not "1", this is a finding. For RedHat 8 or higher, run "fips-mode-setup --check". If the output is not "FIPS mode is enabled", this is a finding.
If fips_enabled = 0 or FIPS mode is not enabled, configure OpenSSL to be FIPS compliant. Configure per operating system documentation: RedHat7: https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/7/html/security_guide/chap-federal_standards_and_regulations RedHat8: 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
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. If 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. If FIPS encryption is not enabled, this is a finding.
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.
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. If any rows have "trust" specified for the "METHOD" column, this is a finding.
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. If any rows have "trust" specified for the "METHOD" column, delete the rows or change them to other authentication methods. Permitted methods in preferred order are: peer (local only), cert, ldap, sspi, pam, and scram-sha-256.
As the "enterprisedb" user, run the following from the command line: > psql edb From the psql prompt run: \du If a user listed in the output is not approved for SUPERUSER access, this is a finding.
Execute the following SQL as the "enterprisedb" operating system user for all database users not approved for SUPERUSER privileges: > psql edb -c "ALTER USER <username> NOSUPERUSER"
As the "enterprisedb" user, run the following from the command line: > psql edb From the psql prompt run the following commands: SHOW statement_timeout; SHOW tcp_keepalives_idle; SHOW tcp_keepalives_interval; SHOW tcp_keepalives_count; If any of the above parameters has a value of "0", this is a finding.
As the "enterprisedb" user, run the following from the command line for all of the previously noted parameters with a value of "0" : psql edb ALTER SYSTEM SET statement_timeout = 10000; ALTER SYSTEM SET tcp_keepalives_idle = 10; ALTER SYSTEM SET tcp_keepalives_interval = 10; ALTER SYSTEM SET tcp_keepalives_count = 10; Note: 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/ From the operating system command line run the following as the "enterprisedb" user: systemctl restart edb-as-<version>
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. If no information is identified as requiring such protection, this is not a finding. Review the configuration of the DBMS, operating system/file system, and additional software as relevant. If 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.
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. This can be done at the OS level with encryption technologies provided by third-party tools. If only certain columns need encryption, use the pgcrypto module to encrypt those columns as documented here: https://www.postgresql.org/docs/current/pgcrypto.html Note: 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/
All EDB Postgres Advanced Server built-in security packages are in the sys, pg_catalog, information_schema, and dbo schemas. If any application-specific packages have been added to these schemas, this is a finding.
Remove all application-specific packages that were added to the sys, pg_catalog, information_schema, and dbo schemas.
Review the procedures for the refreshing of development/test data from production. Review 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. Verify that copies of production data are not left in unprotected locations. If 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.
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.
Verify User ownership, Group ownership, and permissions on the <postgresql data directory> directory: > ls -ald <PostgreSQL data directory> If the User owner is not "enterprisedb", this is a finding. If the Group owner is not "enterprisedb", this is a finding. If the directory is more permissive than 700, this is a finding. The default path for the postgresql data directory is /var/lib/edb/as<version>/data (PGDATA), but this will vary according to local circumstances.
Run these commands: > chown enterprisedb <PostgreSQL data directory> > chgrp enterprisedb <PostgreSQL data directory> > chmod 700 <PostgreSQL data directory> The default path for the postgresql data directory is /var/lib/edb/as<version>/data (PGDATA), but this will vary according to local circumstances.
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. If code exists that allows invalid data to be acted upon or input into the database, this is a finding. If column/field definitions do not exist in the database, this is a finding. If columns/fields do not contain constraints and validity checking where required, this is a finding. Where 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. Where 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. Check 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. Execute the following SQL as the "enterprisedb" user: SELECT * FROM sqlprotect.list_protected_users; If 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.
Modify database code to properly validate data before it is put into the database or acted upon by the database. Modify the database to contain column/field definitions for each column/field in the database. Modify the database to contain constraints and validity checking on database columns and tables that require them for data integrity. Use prepared statements for user supplied inputs. Do not allow general users direct console access to the EDB Postgres Advanced Server database. If 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/ Alternatively, implement, document, and maintain another method of checking for the validity of inputs.
Execute the following SQL as the "enterprisedb" operating system user: > psql edb -c "SELECT * FROM sqlprotect.list_protected_users" If 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.
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/ Alternatively, implement, document, and maintain another method of checking for the validity of inputs.
Execute the following SQL as the "enterprisedb" operating system user: > psql edb -c "SELECT * FROM sqlprotect.list_protected_users" If 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.
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/ Alternatively, implement, document, and maintain another method of checking for the validity of inputs.
Check custom database code to verify that error messages do not contain information beyond what is needed for troubleshooting the issue. If custom database errors contain PII data, sensitive business data, or information useful for identifying the host system or database structure, this is a finding.
Configure custom database code and associated application code not to divulge sensitive information or information useful for system identification in error messages.
Check the EDB Postgres Advanced Server settings and custom database code to determine if detailed error messages are ever displayed to unauthorized individuals. To check the level of detail for errors exposed to clients, run the following as the "enterprisedb" operating system user: > psql edb -c "SHOW client_min_messages" If client_min_messages is not set to ERROR, this is a finding. If detailed error messages for any custom code are displayed to users not authorized to view them, this is a finding. Additionally, logs may contain detailed information and should only be accessible by the database owner. As the "enterprisedb" operating system user, verify that the log_file_mode parameter is set to 0600: > psql edb -c "SHOW log_file_mode" If log_file_mode is not set to 0600, this is a finding. If 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.
Set the client_min_messages parameter to "ERROR". As the "enterprisedb" operating system user: > psql edb -c "ALTER SYSTEM SET client_min_messages='ERROR'" > psql edb -c "SELECT pg_reload_conf()" > psql edb -c "SHOW client_min_messages" Set the log_file_mode to 0600. As the "enterprisedb" operating system user: > psql edb -c "ALTER SYSTEM SET log_file_mode='0600'" > psql edb -c "SELECT pg_reload_conf()" > psql edb -c "SHOW log_file_mode"
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. If 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.
Execute this SQL command in the places where the documentation requires automatic session termination: SELECT pg_terminate_backend(pid) FROM pg_stat_activity WHERE usename = '<username>'
If security labeling is not required, this is not applicable. If security labeling requirements have been specified, execute the following SQL as the "enterprisedb" operating system user: > psql edb -c "SELECT * from ALL_POLICIES where OBJECT_NAME = '<object_name>'" If a policy is not enabled for the table requiring security labeling, this is a finding.
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/
If security labeling is not required, this is not applicable. If security labeling requirements have been specified, execute the following SQL as the "enterprisedb" operating system user: > psql edb -c "SELECT * from ALL_POLICIES where OBJECT_NAME = '<object_name>'" If a policy is not enabled for the table requiring security labeling, this is a finding.
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/
If security labeling is not required, this is not applicable. If security labeling requirements have been specified, execute the following SQL as the "enterprisedb" operating system user: > psql edb -c "SELECT * from ALL_POLICIES where OBJECT_NAME = '<object_name>'" If a policy is not enabled for the table requiring security labeling, this is a finding.
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/
Review system documentation to identify the required DAC for the database. Review 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. If the DAC defined in the documentation is not implemented in the security configuration, this is a finding. If any database objects are found to be owned by users not authorized to own database objects, this is a finding. To check the ownership of objects in the database, as the "enterprisedb" user, run the following the operating system command line: psql <database_name> From the psql prompt: \dn *.* \dt *.* \ds *.* \dv *.* \x (turns on expanded view for easier viewing) \df+ *.* If any role or user is granted privileges to unauthorized objects, this is a finding.
Revoke any unauthorized user/role object privileges found. Example: > psql -c "REVOKE SELECT ON TABLE <schema.table_name> from <user or role name>"
Review the system documentation to obtain the definition of the database/DBMS functionality considered privileged in the context of the system in question. To 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>';" If any functionality considered privileged has access privileges granted to nonprivileged users, this is a finding.
Revoke any privileges to privileged functionality by executing the REVOKE command as documented here: http://www.postgresql.org/docs/current/static/sql-revoke.html
Review the system documentation and source code of the application(s) using the database. If elevation of DBMS privileges is used but not documented, this is a finding. If elevation of DBMS privileges is documented but not implemented as described in the documentation, this is a finding. If 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. Execute the following SQL as the "enterprisedb" operating system user to find any SECURITY DEFINER functions (meaning they are executed as owner rather than invoker): psql edb -c "SELECT proname FROM pg_proc WHERE prosecdef = true" If any of these functions should not be SECURITY DEFINER, this is a finding.
Determine where, when, how, and by what principals/subjects elevated privilege is needed. Modify the system and the application(s) using the database to ensure privilege elevation is used only as required. To alter a function to use SECURITY INVOKER instead of SECURITY DEFINER, execute the following SQL as the "enterprisedb" user: ALTER FUNCTION <function()> SECURITY INVOKER;
Review the system documentation and source code of the application(s) using the database. If elevation of DBMS privileges is used but not documented, this is a finding. If elevation of DBMS privileges is documented but not implemented as described in the documentation, this is a finding. If 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. Execute the following SQL to find any users with BYPASS RLS permissions: select rolname from pg_roles where rolbypassrls = true; If any of these users are not superusers that should bypass RLS, this is a finding.
Determine where, when, how, and by what principals/subjects elevated privilege is needed. Modify the system and the application(s) using the database to ensure privilege elevation is used only as required. To alter a user to not allow bypassing RLS, execute the following SQL: ALTER USER <user> NOBYPASSRLS;
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. If there have been, this is a finding.
Allocate sufficient audit file space to "<PostgreSQL data directory>/edb_audit" to support peak demand.
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. The default path for the PostgreSQL data directory (PGDATA) is /var/lib/edb/as<version>/data, but this will vary according to local circumstances.
Install PEM and configure a probe to monitor and notify appropriate support staff upon storage volume utilization reaching 75 percent. Instructions to create a custom probe can be found at: https://www.enterprisedb.com/docs/pem/latest/monitoring_performance/probes/#creating-a-custom-probe Example 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. Open the PEM web console in a browser. - Log in. - Click on the agent for the machine to be monitored. - Select "Management | Probe Configuration". - Select "Disk Space" and set the check interval as warranted. - Select "Management | Alerting". - Name the definition "Audit Log Full". - Select Template "Disk Consumption Percentage". - Set Frequency, Comparison Operator, and Thresholds (1 minute, >, 95/96/97 for example). - Enter the Mount Point for where the audit log is. - Click Notification tab. - Click Email all alerts. - Click "Execute Script" on Monitored Server. - Enter script to shut down postgres, generally "systemctl stop edb-as-<version>". - Click Add/Change to save, click OK to exit dialog box.
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. If real-time alerts are not sent upon auditing failure, this is a finding.
Install PEM and configure audit failure event alerting as documented here: https://www.enterprisedb.com/docs/pem/latest/ An 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. Open the PEM web console in a browser. - Log in. - Click on the agent for the machine to be monitored. - Select "Management | Probe Configuration". - Select "Disk Space" and set the check interval as warranted. - Select "Management | Alerting". - Name the definition "Audit Log Full". - Select Template "Disk Consumption Percentage". - Set Frequency, Comparison Operator, and Thresholds (1 minute, >, 95/96/97 for example). - Enter the Mount Point for where the audit log is. - Click Notification tab. - Click Email all alerts. - Click "Execute Script" on Monitored Server.
As the "enterprisedb" operating system user, run the following to show the current log_timezone setting: > psql -d edb -c "SHOW log_timezone" If anything other than "UTC" is returned, this is a finding.
As the "enterprisedb" operating system user, run the following to set the log_timezone parameter: > psql edb -c "ALTER SYSTEM SET log_timezone = 'UTC'" Next, reload the parameter file: psql edb -c "SELECT pg_reload_conf()" Confirm the new value: psql edb -c "SHOW log_timezone"
As the "enterprisedb" operating system user, run the following to verify the log_line_prefix parameter setting: > psql edb -c "SHOW log_line_prefix" If log_line_prefix is not set to "%m" (Timestamp in milliseconds) , this is a finding.
As the "enterprisedb" operating system user, run the following to set the log_line_prefix parameter to "%m" (Timestamps in milliseconds) > psql edb -c "ALTER SYSTEM SET log_line_prefix = '%m'" Next, reload the parameter file: > psql edb -c "SELECT pg_reload_conf()" Confirm the new value: > psql edb -c "SHOW log_line_prefix"
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. Review 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: \l \dn+ If any such permissions exist and are not documented and approved, this is a finding.
Document and obtain approval for any nonadministrative users who require the ability to create, alter, or replace logic modules. Implement the approved permissions. Revoke (or deny) any unapproved permissions and remove any unauthorized role memberships.
Review the security configuration of the EDB Postgres database(s). If EDB Postgres does not enforce access restrictions associated with changes to the configuration of the database(s), this is a finding. To assist in conducting reviews of permissions, the following psql commands describe permissions of databases, schemas, and users: \l \dn+ \du Permissions of concern in this respect include the following, and possibly others: - any user with SUPERUSER privileges. - any database or schema with "C" (create) or "w" (update) privileges that are not necessary.
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. Use the ALTER ROLE to remove accesses from roles. As the "enterprisedb" operating system user, run the following: > psql edb -c "ALTER ROLE <rolename> NOSUPERUSER" Use REVOKE to remove privileges from databases and schemas: > psql edb -c "REVOKE ALL PRIVILEGES ON <objectname> FROM <username>"
Execute the following SQL as "enterprisedb" operating system user: > psql edb -c "SHOW edb_audit_statement" If 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.
Execute the following SQL as "enterprisedb" operating system user: > psql edb -c "ALTER SYSTEM SET edb_audit_statement = 'all'" > psql edb -c "SELECT pg_reload_conf()" or Update the system documentation to note the organizationally approved setting and corresponding justification of the setting for this requirement.
Review the network functions, ports, protocols, and services supported by the EDB Postgres Advanced Server. If any protocol is prohibited by the PPSM guidance and is enabled, this is a finding. Open "<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. Execute the following SQL as "enterprisedb" operating system user: > psql edb -c "SHOW port" If the displayed port is not allowed, this is a finding.
Disable each prohibited network function, port, protocol, or service prohibited by the PPSM guidance. Open "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. Change 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. Execute the following SQL as "enterprisedb" operating system user: > psql edb -c "ALTER SYSTEM SET port = <port>" Execute the following operating system command as the "root" user (or user with sudo privileges) to restart the postgres instance: > systemctl restart edb-as-<version> Where <version> is the major version of the EDB Postgres Advanced Server instance [e.g., 15].
Determine all situations where a user must reauthenticate. Check if the mechanisms that handle such situations use the following SQL. To make a single user reauthenticate, the following must be present: SELECT pg_terminate_backend(pid) FROM pg_stat_activity WHERE user='<username>' To make all users reauthenticate, run the following: SELECT pg_terminate_backend(pid) FROM pg_stat_activity WHERE user LIKE '%' If the provided SQL does not force reauthentication, this is a finding.
Determine the organization-defined circumstances or situations that require reauthentication and ensure the following SQL is executed in those situations. To require a single user to reauthenticate, use this SQL: SELECT pg_terminate_backend(pid) FROM pg_stat_activity WHERE user = '<username>'; To require all users to reauthenticate, use this SQL: SELECT pg_terminate_backend(pid) FROM pg_stat_activity WHERE user LIKE '%';
If the EDB Postgres Advanced Server is deployed in an unclassified environment, this is not applicable. If 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. To check if PostgreSQL is configured to use SSL, as the "enterprisedb" operating system user, run the following: > psql edb -c "SHOW ssl" If Secure Socket Layer (SSL) is set to "off", this is a finding (Refer to below). Consult network administration staff to determine whether the server is protected by NSA-approved encrypting devices. If not, then this a finding.
As the "enterprisedb" operating system user, run the following to set the ssl parameter to "on": > psql edb -c "ALTER SYSTEM SET ssl = 'on'" Next, reload the parameter file: psql edb -c "SELECT pg_reload_conf()" Now confirm the new value: psql edb -c "SHOW ssl"
Verify that the root.crt certificate was issued by a valid DOD entity. > 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. Example: > openssl x509 -in /var/lib/edb/as15/data/root.crt -text | grep -i "issuer" If any issuers are listed that are not approved DOD certificate authorities, this is a finding.
Revoke trust in any certificates not issued by a DOD-approved certificate authority. Contact the organization's certificate issuer and request a new certificate that is issued by a DOD-approved certificate authority.
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. If no information is identified as requiring such protection, this is not a finding. Review the configuration of the EDB Postgres Advanced Server, operating system/file system, and additional software as relevant. If 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.
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. If only certain columns require encryption, use pgcrypt to encrypt those columns as documented here: http://www.postgresql.org/docs/current/static/pgcrypto.html Note: 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/
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. If no information is identified as requiring such protection, this is not a finding. Review the configuration of the EDB Postgres Advanced Server, operating system/file system, and additional software as relevant. If 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.
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. If only certain columns need encryption, use pgcrypt to encrypt those columns as documented here: http://www.postgresql.org/docs/current/static/pgcrypto.html Note: 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/
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. Open 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. If any rows do not have TYPE of "hostssl" as well as a METHOD of "cert", this is a finding.
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: > psql -d <database-name> -U <username> -c "SHOW config_file" Where <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). In the postgresql.conf file, set the "ssl" parameter as follows: ssl = on Ensure the parameter is uncommented. In 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. To restart the database on a systemd server, issue the following command as the root user or a user with sudo access: > systemctl restart edb-as-<version> Where <version> is the major version of the EDB Postgres Advanced Server instance (e.g., 15). To restart the database on an initd server, issue the following command as the root user or a user with sudo access: > systemctl restart edb-as-<version> Where <version> is the major version of the EDB Postgres Advanced Server instance (e.g., 15). After 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: > psql -d <database-name> -U <username> -c "SHOW hba_file" Where <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). Obtain approval and document any uncommented entries with corresponding justification that are not of type hostssl and do not include the "clientcert=1" option. For 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. Note that changes to the host-based authentication settings require a database reload in order to apply the updated settings. To reload the database on a systemd server, issue the following command as the root user or a user with sudo access: > systemctl reload edb-as-<version> Where <version> is the major version of the EDB Postgres Advanced Server instance (e.g., 15). To reload the database on an initd server, issue the following command as the root user or a user with sudo access: > systemctl reload edb-as-<version> Where <version> is the major version of the EDB Postgres Advanced Server instance (e.g., 15). For more information on configuring PostgreSQL to use SSL, consult the following documentation: https://www.postgresql.org/docs/current/ssl-tcp.html
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. First, check if SSL is enabled for the database instance by executing the following command from a command prompt: > psql -d <database-name> -U <username> -c "SHOW ssl" Where <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). If the result is not "on", this is a finding. Next, open the pg_hba.conf file in a viewer or editor and review the authentication settings that are configured in that file. The 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: > psql -d <database-name> -U <username> -c "SHOW hba_file" Where <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). If 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.
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: > psql -d <database-name> -U <username> -c "SHOW config_file" Where <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). In the postgresql.conf file, set the "ssl" parameter as follows: ssl = on Ensure the parameter is uncommented. In 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. To restart the database on a systemd server, issue the following command as the root user or a user with sudo access: > systemctl restart edb-as-<version> Where <version> is the major version of the EDB Postgres Advanced Server instance (e.g., 15). To restart the database, issue the following command as the root user or a user with sudo access: > systemctl restart edb-as-<version> Where <version> is the major version of the EDB Postgres Advanced Server instance (e.g., 14). After 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: > psql -d <database-name> -U <username> -c "SHOW hba_file" Where <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). Obtain approval and document any uncommented entries with corresponding justification that are not of type hostssl and do not include the "clientcert=1" option. For 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. Note that changes to the host-based authentication settings require a database reload in order to apply the updated settings.
Execute the following SQL as "enterprisedb" operating system user: > psql edb -c "SELECT * FROM sqlprotect.list_protected_users" If 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.
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/ Alternatively, implement, document, and maintain another method of checking for the validity of inputs.
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: > /usr/edb/as15/bin/edb-postgres --version If such evidence cannot be obtained, or the evidence that is obtained indicates a pattern of noncompliance, this is a finding. If an administrator is not registered on the EDB Support Portal with an email address for monitoring technical alerts, this is a finding.
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. Ensure that a monitored email address is registered as a user on the EDB support portal and is receiving technical alerts.
Execute the following SQL the "enterprisedb" operating system user: > psql edb -c "SHOW edb_audit_statement" If 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.
Execute the following SQL as the "enterprisedb" operating system user: > psql edb -c "ALTER SYSTEM SET edb_audit_statement = 'all'" > psql edb -c "SELECT pg_reload_conf()" or Update the system documentation to note the organizationally approved setting and corresponding justification of the setting for this requirement.
Execute the following SQL the "enterprisedb" operating system user: > psql edb -c "SHOW edb_audit_statement" If 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.
Execute the following SQL as the "enterprisedb" operating system user: > psql edb -c "ALTER SYSTEM SET edb_audit_statement = 'all'" > psql edb -c "SELECT pg_reload_conf()" or Update the system documentation to note the organizationally approved setting and corresponding justification of the setting for this requirement.
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. Execute the following SQL the "enterprisedb" operating system user: > psql edb -c "SHOW edb_audit_statement" If 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.
Execute the following SQL as the "enterprisedb" operating system user: > psql edb -c "ALTER SYSTEM SET edb_audit_statement = 'all'" > psql edb -c "SELECT pg_reload_conf()" or Update the system documentation to note the organizationally approved setting and corresponding justification of the setting for this requirement.
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. Execute the following SQL the "enterprisedb" operating system user: > psql edb -c "SHOW edb_audit_statement" If 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.
Execute the following SQL as the "enterprisedb" operating system user: > psql edb -c "ALTER SYSTEM SET edb_audit_statement = 'all'" > psql edb -c "SELECT pg_reload_conf()" or Update the system documentation to note the organizationally approved setting and corresponding justification of the setting for this requirement.
Execute the following SQL the "enterprisedb" operating system user: > psql edb -c "SHOW edb_audit_statement" If 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.
Execute the following SQL as the "enterprisedb" operating system user: > psql edb -c "ALTER SYSTEM SET edb_audit_statement = 'all'" > psql edb -c "SELECT pg_reload_conf()" or Update the system documentation to note the organizationally approved setting and corresponding justification of the setting for this requirement.
Execute the following SQL the "enterprisedb" operating system user: > psql edb -c "SHOW edb_audit_statement" If 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.
Execute the following SQL as the "enterprisedb" operating system user: > psql edb -c "ALTER SYSTEM SET edb_audit_statement = 'all'" > psql edb -c "SELECT pg_reload_conf()" or Update the system documentation to note the organizationally approved setting and corresponding justification of the setting for this requirement.
Execute the following SQL the "enterprisedb" operating system user: > psql edb -c "SHOW edb_audit_statement" If 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.
Execute the following SQL as the "enterprisedb" operating system user: > psql edb -c "ALTER SYSTEM SET edb_audit_statement = 'all'" > psql edb -c "SELECT pg_reload_conf()" or Update the system documentation to note the organizationally approved setting and corresponding justification of the setting for this requirement.
Execute the following SQL the "enterprisedb" operating system user: > psql edb -c "SHOW edb_audit_statement" If 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.
Execute the following SQL as the "enterprisedb" operating system user: > psql edb -c "ALTER SYSTEM SET edb_audit_statement = 'all'" > psql edb -c "SELECT pg_reload_conf()" or Update the system documentation to note the organizationally approved setting and corresponding justification of the setting for this requirement.
Execute the following SQL the "enterprisedb" operating system user: > psql edb -c "SHOW edb_audit_statement" If 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.
Execute the following SQL as the "enterprisedb" operating system user: > psql edb -c "ALTER SYSTEM SET edb_audit_statement = 'all'" > psql edb -c "SELECT pg_reload_conf()" or Update the system documentation to note the organizationally approved setting and corresponding justification of the setting for this requirement.
Execute the following SQL the "enterprisedb" operating system user: > psql edb -c "SHOW edb_audit_statement" If 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.
Execute the following SQL as the "enterprisedb" operating system user: > psql edb -c "ALTER SYSTEM SET edb_audit_statement = 'all'" > psql edb -c "SELECT pg_reload_conf()" or Update the system documentation to note the organizationally approved setting and corresponding justification of the setting for this requirement.
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. Execute the following SQL the "enterprisedb" operating system user: > psql edb -c "SHOW edb_audit_statement" If 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.
Execute the following SQL as the "enterprisedb" operating system user: > psql edb -c "ALTER SYSTEM SET edb_audit_statement = 'all'" > psql edb -c "SELECT pg_reload_conf()" or Update the system documentation to note the organizationally approved setting and corresponding justification of the setting for this requirement.
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. Execute the following SQL the "enterprisedb" operating system user: > psql edb -c "SHOW edb_audit_statement" If 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.
Execute the following SQL as the "enterprisedb" operating system user: > psql edb -c "ALTER SYSTEM SET edb_audit_statement = 'all'" > psql edb -c "SELECT pg_reload_conf()" or Update the system documentation to note the organizationally approved setting and corresponding justification of the setting for this requirement.
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. Execute the following SQL the "enterprisedb" operating system user: > psql edb -c "SHOW edb_audit_statement" If 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.
Execute the following SQL as the "enterprisedb" operating system user: > psql edb -c "ALTER SYSTEM SET edb_audit_statement = 'all'" > psql edb -c "SELECT pg_reload_conf()" or Update the system documentation to note the organizationally approved setting and corresponding justification of the setting for this requirement.
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. Execute the following SQL the "enterprisedb" operating system user: > psql edb -c "SHOW edb_audit_statement" If 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.
Execute the following SQL as the "enterprisedb" operating system user: > psql edb -c "ALTER SYSTEM SET edb_audit_statement = 'all'" > psql edb -c "SELECT pg_reload_conf()" or Update the system documentation to note the organizationally approved setting and corresponding justification of the setting for this requirement.
Execute the following SQL the "enterprisedb" operating system user: > psql edb -c "SHOW edb_audit_statement" If 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.
Execute the following SQL as the "enterprisedb" operating system user: > psql edb -c "ALTER SYSTEM SET edb_audit_statement = 'all'" > psql edb -c "SELECT pg_reload_conf()" or Update the system documentation to note the organizationally approved setting and corresponding justification of the setting for this requirement.
Execute the following SQL the "enterprisedb" operating system user: > psql edb -c "SHOW edb_audit_statement" If 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.
Execute the following SQL as the "enterprisedb" operating system user: > psql edb -c "ALTER SYSTEM SET edb_audit_statement = 'all'" > psql edb -c "SELECT pg_reload_conf()" or Update the system documentation to note the organizationally approved setting and corresponding justification of the setting for this requirement.
Execute the following SQL the "enterprisedb" operating system user: > psql edb -c "SHOW edb_audit_statement" If 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.
Execute the following SQL as the "enterprisedb" operating system user: > psql edb -c "ALTER SYSTEM SET edb_audit_statement = 'all'" > psql edb -c "SELECT pg_reload_conf()" or Update the system documentation to note the organizationally approved setting and corresponding justification of the setting for this requirement.
Execute the following SQL as the "enterprisedb" operating system user: > psql edb -c "SHOW edb_audit_statement" If 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.
Execute the following SQL as the "enterprisedb" operating system user: > psql edb -c "ALTER SYSTEM SET edb_audit_statement = 'all'" > psql edb -c "SELECT pg_reload_conf()" or Update the system documentation to note the organizationally approved setting and corresponding justification of the setting for this requirement.
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. Execute the following SQL the "enterprisedb" operating system user: > psql edb -c "SHOW edb_audit_statement" If 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.
Execute the following SQL as the "enterprisedb" operating system user: > psql edb -c "ALTER SYSTEM SET edb_audit_statement = 'all'" > psql edb -c "SELECT pg_reload_conf()" or Update the system documentation to note the organizationally approved setting and corresponding justification of the setting for this requirement.
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. Execute the following SQL the "enterprisedb" operating system user: > psql edb -c "SHOW edb_audit_statement" If 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.
Execute the following SQL as the "enterprisedb" operating system user: > psql edb -c "ALTER SYSTEM SET edb_audit_statement = 'all'" > psql edb -c "SELECT pg_reload_conf()" or Update the system documentation to note the organizationally approved setting and corresponding justification of the setting for this requirement.
Execute the following SQL as the "enterprisedb" operating system user: > psql edb -c "SHOW edb_audit_connect" If 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.
Execute the following SQL as the "enterprisedb" operating system user: > psql edb -c "ALTER SYSTEM SET edb_audit_connect = 'all'" > psql edb -c "ALTER SYSTEM SET edb_audit_disconnect = 'all'" >psql edb -c "SELECT pg_reload_conf()" or Update the system documentation to note the organizationally approved setting and corresponding justification of the setting for this requirement.
Execute the following SQL as the "enterprisedb" operating system user: > psql edb -c "SHOW edb_audit_connect" If 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.
Execute the following SQL as the "enterprisedb" operating system user: > psql edb -c "ALTER SYSTEM SET edb_audit_connect = 'all'" > psql edb -c "ALTER SYSTEM SET edb_audit_disconnect = 'all'" > psql edb -c "SELECT pg_reload_conf()" or Update the system documentation to note the organizationally approved setting and corresponding justification of the setting for this requirement.
Execute the following SQL as the "enterprisedb" operating system user: > psql edb -c "SHOW edb_audit_statement" If 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.
Execute the following SQL as the "enterprisedb" operating system user: > psql edb -c "ALTER SYSTEM SET edb_audit_statement = 'all'" > psql edb -c "SELECT pg_reload_conf()" or Update the system documentation to note the organizationally approved setting and corresponding justification of the setting for this requirement.
Execute the following SQL as the "enterprisedb" operating system user: > psql edb -c "SHOW edb_audit_statement" If 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.
Execute the following SQL as the "enterprisedb" operating system user: > psql edb -c "ALTER SYSTEM SET edb_audit_statement = 'all'" > psql edb -c "SELECT pg_reload_conf()" or Update the system documentation to note the organizationally approved setting and corresponding justification of the setting for this requirement.
Execute the following SQL as the "enterprisedb" operating system user: > psql edb -c "SHOW edb_audit_connect" If 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.
Execute the following SQL as the "enterprisedb" operating system user: > psql edb -c "ALTER SYSTEM SET edb_audit_connect = 'all'" > psql edb -c "ALTER SYSTEM SET edb_audit_disconnect = 'all'" > psql edb -c "SELECT pg_reload_conf()" or Update the system documentation to note the organizationally approved setting and corresponding justification of the setting for this requirement.
Execute the following SQL as the "enterprisedb" operating system user: > psql edb -c "SHOW edb_audit_connect" If 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.
Execute the following SQL as the "enterprisedb" operating system user: > psql edb -c "ALTER SYSTEM SET edb_audit_connect = 'all'" > psql edb -c "ALTER SYSTEM SET edb_audit_disconnect = 'all'" > psql edb -c "SELECT pg_reload_conf()" or Update the system documentation to note the organizationally approved setting and corresponding justification of the setting for this requirement.
Execute the following SQL as the "enterprisedb" operating system user: > psql edb -c "SHOW edb_audit_statement" If 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.
Execute the following SQL as the "enterprisedb" operating system user: > psql edb -c "ALTER SYSTEM SET edb_audit_statement = 'all'" > psql edb -c "SELECT pg_reload_conf()" or Update the system documentation to note the organizationally approved setting and corresponding justification of the setting for this requirement.
Execute the following SQL as the "enterprisedb" operating system user: > psql edb -c "SHOW edb_audit_statement" If 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.
Execute the following SQL as the "enterprisedb" operating system user: > psql edb -c "ALTER SYSTEM SET edb_audit_statement = 'all'" > psql edb -c "SELECT pg_reload_conf()" or Update the system documentation to note the organizationally approved setting and corresponding justification of the setting for this requirement.
Execute the following SQL as the "enterprisedb" operating system user: > psql edb -c "SHOW edb_audit_statement" > psql edb -c "SHOW edb_audit_connect" > psql edb -c "SHOW edb_audit_disconnect" If 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.
Execute the following SQL as enterprisedb: ALTER SYSTEM SET edb_audit_statement = 'all'; ALTER SYSTEM SET edb_audit_connect = 'all'; ALTER SYSTEM SET edb_audit_disconnect = 'all'; SELECT pg_reload_conf(); or Update the system documentation to note the organizationally approved setting and corresponding justification of the setting for this requirement.
If a FIPS-certified OpenSSL library is not installed, this is a finding. Run the command "cat /proc/sys/crypto/fips_enabled". If the output is not "1", this is a finding. For RedHat 8 or higher, run: "fips-mode-setup --check". If the output is not "FIPS mode is enabled", this is a finding.
If fips_enabled = 0 or FIPS mode is not enabled, configure OpenSSL to be FIPS compliant. Configure per operating system documentation: RedHat7: https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/7/html/security_guide/chap-federal_standards_and_regulations RedHat8: 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 Ubuntu: https://security-certs.docs.ubuntu.com/en/fips
If a FIPS-certified OpenSSL library is not installed, this is a finding. Run the command "cat /proc/sys/crypto/fips_enabled". If the output is not "1", this is a finding. For RedHat 8 or higher, run: "fips-mode-setup --check". If the output is not "FIPS mode is enabled", this is a finding.
If fips_enabled = 0 or FIPS mode is not enabled, configure OpenSSL to be FIPS compliant. Configure per operating system documentation: RedHat7: https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/7/html/security_guide/chap-federal_standards_and_regulations RedHat8: 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 Ubuntu: https://security-certs.docs.ubuntu.com/en/fips
If a FIPS-certified OpenSSL library is not installed, this is a finding. Run the command "cat /proc/sys/crypto/fips_enabled". If the output is not "1", this is a finding.
If fips_enabled = 0 or FIPS mode is not enabled, configure OpenSSL to be FIPS compliant. Configure per operating system documentation: RedHat7: https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/7/html/security_guide/chap-federal_standards_and_regulations RedHat8: 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 Ubuntu: https://security-certs.docs.ubuntu.com/en/fips
If Postgres Enterprise Manager (PEM) or another log collection tool is not installed and configured to automatically collect audit logs, this is a finding. Review the system documentation for a description of how audit records are off-loaded and how local audit log space is managed.
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/ If another tool other than PEM is used, configure it to meet this requirement.
Review the system documentation and interview the database administrator. Identify all database software components. Review the current version and release information as follows: > /usr/edb/as<version>/bin/edb-postgres --version Access the EDB website to validate that the version is currently supported: https://www.enterprisedb.com/resources/platform-compatibility If the DBMS or any of the software components are not supported by the vendor, this is a finding.
Remove or decommission all unsupported software products. Upgrade unsupported DBMS or unsupported components to a supported version of the product.