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

Correct manage setting 'password_encryption' for PostgreSQL 10 and above #460

Merged
merged 4 commits into from
Feb 10, 2021

Conversation

MemberIT
Copy link
Contributor

@MemberIT MemberIT commented Dec 18, 2019

PostgreSQL =< 9.6 password_encryption is boolean
https://www.postgresql.org/docs/9.6/runtime-config-connection.html
PostgreSQL >= 10 password_encryption is enum - 'md5' (default) or 'scram-sha-256'.
https://www.postgresql.org/docs/10/runtime-config-connection.html

Duplicates PR #368, but retains backward compatibility with versions below 10.

@gclough
Copy link
Collaborator

gclough commented Mar 6, 2020

@MemberIT , could you update this PR?

@MemberIT
Copy link
Contributor Author

MemberIT commented Mar 6, 2020

@MemberIT , could you update this PR?

Done.

@kravietz
Copy link

@gclough can you merge this one please? It's a bug that the role was being plagued since 2018 and it's a simple fix.

@maglub
Copy link
Collaborator

maglub commented Jun 10, 2020

This PR has a suboptimal solution, as the allowed values are not correct.

Why don't we just use a simple solution. We don't have to do the validity check in our role, we can leave it to the user (as we do for many other variables).

Like in PR #460.

password_encryption = {{ postgresql_password_encryption if postgresql_password_encryption else 'off' }}		# md5 or scram-sha-256

For PG11 and 12, valid values are:

  • ""
  • on
  • md5
  • scram-sha-256

@MemberIT
Copy link
Contributor Author

@maglub
I corrected PR in accordance with your comments

@maglub
Copy link
Collaborator

maglub commented Jun 10, 2020

Looks good to me, thanks a lot! Who do we chase to get this PR accepted?

@gclough gclough merged commit 99a2bbc into ANXS:master Feb 10, 2021
@robustq
Copy link

robustq commented Feb 17, 2021

@MemberIT Thank you, and @gclough thanks for merging in!

robustq pushed a commit to robustq/postgresql that referenced this pull request Feb 25, 2021
Correct manage setting 'password_encryption' for PostgreSQL 10 and above
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.

None yet

5 participants