postgres-operator/pkg
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
..
apis fix operatorconfigurations CRD: render sidecars as array (#3160) 2026-08-11 17:10:05 +02:00
apiserver Add operator deployment readiness probe (#1874) 2023-01-05 18:29:47 +01:00
cluster Skip owner references on user secrets when secret deletion is disabled (#3165) 2026-08-11 17:22:39 +02:00
controller prepare bugfix release (#3147) 2026-07-29 10:51:00 +02:00
generated Update to Go 1.26.4, build runners and go.mod depedencies (#3108) 2026-06-23 13:35:53 +02:00
spec Fix operatorconfigurations CRD: NamespacedName must render as type string (#3145) 2026-07-28 16:02:59 +02:00
teams Generate CRD for postgresteam resource (#3004) 2026-01-10 19:39:08 +01:00
util Skip ALTER ROLE when the stored SCRAM verifier already matches the password 2026-08-13 17:02:08 +00:00