SV-224168r508023_rule
V-224168
SRG-APP-000172-DB-000075
EP11-00-004400
CAT II
10
Open "<postgresql data directory>\pg_hba.conf" in an editor.
Note that 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 postgres instance can be found using the following command run from a Windows command prompt:
psql -d <database name> -U <database superuser name> -c "SHOW hba_file"
where, <database name> is any database in the EDB postgres instance and <database superuser name> is a database superuser. By default, a database named "edb" and a superuser named "enterprisedb" are installed with EDB Postgres Advanced Server (EPAS).
For any rows that have "password" specified for the "METHOD" column, change the value to "sha-256-scram" or "md5".
Verify that the pg_hba.conf is not using the "password" authentication method.
Note that 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 postgres instance can be found using the following command run from a Windows command prompt:
psql -d <database name> -U <database superuser name> -c "SHOW hba_file"
where, <database name> is any database in the EDB postgres instance and <database superuser name> is a database superuser. By default, a database named "edb" and a superuser named "enterprisedb" are installed with EDB Postgres Advanced Server (EPAS).
To verify that the pg_hba.conf file is not using the methods listed above, open the pg_hba.conf file in a text editor and inspect the contents of the file. If any uncommented lines have "password" specified for the "METHOD" column, this is a finding.
Optionally, the following command can be run from a Windows command prompt to identify any uncommented lines in the pg_hba.conf file that may be using these methods:
type <postgresql data directory>\pg_hba.conf | findstr /N "password" | find /V /N "#"
Note: For the command above, if the path to the pg_hba.conf file contains spaces in it, the path to the file (including the file name) should be placed in double quotes.
If any uncommented lines showing that the "password" authentication method has been specified are reported via the above command, this is a finding.
V-224168
False
EP11-00-004400
Verify that the pg_hba.conf is not using the "password" authentication method.
Note that 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 postgres instance can be found using the following command run from a Windows command prompt:
psql -d <database name> -U <database superuser name> -c "SHOW hba_file"
where, <database name> is any database in the EDB postgres instance and <database superuser name> is a database superuser. By default, a database named "edb" and a superuser named "enterprisedb" are installed with EDB Postgres Advanced Server (EPAS).
To verify that the pg_hba.conf file is not using the methods listed above, open the pg_hba.conf file in a text editor and inspect the contents of the file. If any uncommented lines have "password" specified for the "METHOD" column, this is a finding.
Optionally, the following command can be run from a Windows command prompt to identify any uncommented lines in the pg_hba.conf file that may be using these methods:
type <postgresql data directory>\pg_hba.conf | findstr /N "password" | find /V /N "#"
Note: For the command above, if the path to the pg_hba.conf file contains spaces in it, the path to the file (including the file name) should be placed in double quotes.
If any uncommented lines showing that the "password" authentication method has been specified are reported via the above command, this is a finding.
M
4107