postgres-operator/pkg/util
g2px1 7831e2b729 Skip ALTER ROLE when the stored SCRAM verifier already matches the password
With password_encryption = scram-sha-256, syncSecrets compared the stored
rolpassword with a freshly generated verifier. SCRAM verifiers embed a
random salt, so the strings never match and every sync cycle re-issued
ALTER ROLE ... PASSWORD for every managed role, re-salting the verifier
each time. Besides the WAL and audit noise, this invalidates SCRAM
pass-through credentials cached by connection poolers (e.g. pgbouncer
behind auth_query), causing a short window of 'password authentication
failed' server logins after every sync.

Verify the stored hash against the desired password instead: for SCRAM
verifiers the salt and iteration count are taken from the stored value
and the derived keys are compared. Hashes whose type does not match the
configured password_encryption are still reported as outdated, so
switching between md5 and scram-sha-256 keeps re-hashing roles as
before.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-13 17:02:08 +00:00
..
config prepare bugfix release (#3147) 2026-07-29 10:51:00 +02:00
constants feat (operator): add support for IRSA (aws resources access) (#3128) 2026-07-15 18:19:10 +02:00
filesystems Fix golint warnings 2017-08-01 16:08:56 +02:00
httpclient Modernize code generation (#3003) 2026-01-09 14:22:10 +01:00
k8sutil refactor(controller): use kubernetes informers provided by client-go (#3080) 2026-06-03 12:43:34 +02:00
nicediff End 2 End tests speedup (#1180) 2020-10-28 10:04:33 +01:00
patroni Extend MaintenanceWindows parameter usage (#2810) 2025-01-15 18:04:36 +01:00
retryutil Fix typo (#965) 2020-05-12 09:20:09 +02:00
ringlog fix comments for ringlogger 2017-09-26 13:12:38 +02:00
teams add test team member (#1842) 2022-04-14 10:02:54 +02:00
users Skip ALTER ROLE when the stored SCRAM verifier already matches the password 2026-08-13 17:02:08 +00:00
volumes change volume specs to int32 and define max iops and throughput values (#3139) 2026-07-27 16:32:22 +02:00
util.go Skip ALTER ROLE when the stored SCRAM verifier already matches the password 2026-08-13 17:02:08 +00:00
util_test.go Skip ALTER ROLE when the stored SCRAM verifier already matches the password 2026-08-13 17:02:08 +00:00