Skip to content

[DPE-6902] Replace md5 with scram-sha-256 in patroni/pg_hba.conf #1004

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

Open
wants to merge 3 commits into
base: 16/edge
Choose a base branch
from

Conversation

taurus-forever
Copy link
Contributor

@taurus-forever taurus-forever commented Jun 26, 2025

Issue

We have migrated from md5 to scram-sha-256 but still falling back to md5 in pg_hba.conf

Solution

Complete migration to scram-sha-256.
Support instance_password_encryption charm config option.

Checklist

  • I have added or updated any relevant documentation.
  • I have cleaned any remaining cloud resources from my accounts.

@taurus-forever taurus-forever changed the base branch from main to 16/edge June 26, 2025 08:29
Copy link

codecov bot commented Jun 26, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 64.87%. Comparing base (a42d4db) to head (aaaaeae).
⚠️ Report is 1 commits behind head on 16/edge.

Additional details and impacted files
@@           Coverage Diff            @@
##           16/edge    #1004   +/-   ##
========================================
  Coverage    64.87%   64.87%           
========================================
  Files           17       17           
  Lines         4270     4270           
  Branches       656      656           
========================================
  Hits          2770     2770           
  Misses        1333     1333           
  Partials       167      167           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@taurus-forever taurus-forever changed the title Alutay/md5 scram [DPE-6902] Replace md5 with scram-sha-256 in patroni/pg_hba.conf Jun 26, 2025
@taurus-forever taurus-forever marked this pull request as ready for review June 26, 2025 11:24
@taurus-forever taurus-forever added enhancement New feature, UI change, or workload upgrade labels Jun 26, 2025
Copy link
Contributor Author

@taurus-forever taurus-forever left a comment

Choose a reason for hiding this comment

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

PG<>PGB<>APP test passed, but IMHO, the code can be simplified here.

Copy link
Contributor

@dragomirp dragomirp left a comment

Choose a reason for hiding this comment

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

We should reconsider the instance_password_encryption config as a follow up. Setting it to md5 will not be practically usable, since users won't be able to login with md5 pass hashes.

@taurus-forever
Copy link
Contributor Author

We should reconsider the instance_password_encryption config as a follow up. Setting it to md5 will not be practically usable, since users won't be able to login with md5 pass hashes.

Good point. Should I include it into this PR? @dragomirp

Keep pgbouncer_auth_relation_% users in md5,
enforce scram-sha-256 for all other users.
@taurus-forever taurus-forever force-pushed the alutay/md5_scram branch 3 times, most recently from e1c2f86 to fe73262 Compare August 13, 2025 15:01
@taurus-forever
Copy link
Contributor Author

Requested review once again after adding instance_password_encryption config option.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature, UI change, or workload upgrade
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants