Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

V-233596 Update #21

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

V-233596 Update #21

wants to merge 1 commit into from

Conversation

em-c-rod
Copy link
Contributor

add to only support what is in listed in the guidance

@@ -57,7 +57,7 @@
sql = postgres_session(input('pg_dba'), input('pg_dba_password'), input('pg_host'), input('pg_port'))

describe sql.query('SHOW password_encryption;', [input('pg_db')]) do
its('output') { should match /on|true|scram-sha-256/i }
its('output') { should match /scram-sha-256/i }
end

passwords_sql = 'SELECT usename FROM pg_shadow '\
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should the line below be checking for scram-sha-256 instead of md5 hashes? @aaronlippold

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, the describe block was perhaps adapting legacy postgres 9 ideas https://github.com/mitre/pgstigcheck-inspec/blob/a6faeb2eaff1d351d29629b7e53af6f7351cd9b4/controls/V-73015.rb#L69 without regard to what "on" means today in 10+ versions. https://access.crunchydata.com/documentation/postgresql13/13.3/runtime-config-connection.html#GUC-PASSWORD-ENCRYPTION discusses current setting interpretation:

password_encryption ( enum )
When a password is specified in CREATE ROLE or ALTER ROLE , this parameter determines the algorithm to use to encrypt the password. The default value is md5 , which stores the password as an MD5 hash ( on is also accepted, as alias for md5 ). Setting this parameter to scram-sha-256 will encrypt the password with SCRAM-SHA-256.

Note that older clients might lack support for the SCRAM authentication mechanism, and hence not work with passwords encrypted with SCRAM-SHA-256. See Section 20.5 for more details.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants