PGS9-00-009500 - If passwords are used for authentication, PostgreSQL must store only hashed, salted representations of passwords - pg_shadow

Warning! Audit Deprecated

This audit has been deprecated and will be removed in a future update.

View Next Audit Version

Information

The DoD standard for authentication is DoD-approved PKI certificates.

Authentication based on User ID and Password may be used only when it is not possible to employ a PKI certificate, and requires AO approval.

In such cases, database passwords stored in clear text, using reversible encryption, or using unsalted hashes would be vulnerable to unauthorized disclosure. Database passwords must always be in the form of one-way, salted hashes when stored internally or externally to PostgreSQL.

Solution

Note: The following instructions use the PGDATA and PGVER environment variables. See supplementary content APPENDIX-F for instructions on configuring PGDATA and APPENDIX-H for PGVER.

To enable password_encryption, as the database administrator, edit postgresql.conf:

$ sudo su - postgres
$ vi ${PGDATA?}/postgresql.conf
password_encryption = on

Institute a policy of not using the 'WITH UNENCRYPTED PASSWORD' option with the CREATE ROLE/USER and ALTER ROLE/USER commands. (This option overrides the setting of the password_encryption configuration parameter.)

As the system administrator, restart the server with the new configuration:

# SYSTEMD SERVER ONLY
$ sudo systemctl restart postgresql-${PGVER?}

# INITD SERVER ONLY
$ sudo service postgresql-${PGVER?} restart

See Also

https://dl.dod.cyber.mil/wp-content/uploads/stigs/zip/U_PGS_SQL_9-x_V2R3_STIG.zip

Item Details

References: CAT|I, CCI|CCI-000196, Rule-ID|SV-214130r836924_rule, STIG-ID|PGS9-00-009500, STIG-Legacy|SV-87667, STIG-Legacy|V-73015, Vuln-ID|V-214130

Plugin: PostgreSQLDB

Control ID: a1eae3846df45015a01755406aa73fd3e72671585acc03053beedf8b198afd56