Complete the code to set the password authentication method to md5 in the pg_hba.conf file.
host all all 0.0.0.0/0 [1]
The md5 method requires users to provide a password hashed with MD5. This line sets password authentication for all users and databases.
Complete the SQL command to change a user's password using md5 encryption.
ALTER USER alice WITH PASSWORD '[1]';
When setting a password in PostgreSQL, you provide the plain password string. PostgreSQL handles the MD5 hashing internally.
Fix the error in the pg_hba.conf line to require password authentication using scram-sha-256.
host all all 192.168.1.0/24 [1]
The scram-sha-256 authentication method provides secure password authentication using the SCRAM-SHA-256 protocol.
Fill both blanks to complete the SQL command that creates a user with SCRAM password authentication.
CREATE USER bob WITH [1] '[2]';
To create a user with a password for use with SCRAM authentication, use PASSWORD followed by the plain password string after setting password_encryption = scram-sha-256 in postgresql.conf. PostgreSQL will handle the SCRAM hashing.
Fill all three blanks to complete the pg_hba.conf line that allows local connections with SCRAM authentication.
local [1] [2] [3]
This line allows all users to connect locally using SCRAM-SHA-256 authentication: local all all scram-sha-256.