-
Notifications
You must be signed in to change notification settings - Fork 614
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
postgresql::server::role with sensitive passwords and enabled update_password are not working #1402
Comments
Mhm ok tested again and found out that the problem is with the Sensitive handling in postgresql::server::role and it does not only apply to a pre-hashed password but also to a Sensitive cleartext password. Like that is working
or
And that does not
or
🤷 |
Oh wait a Sensitive in a Sensitive does not work or? The merge of the Sensitive into the String is here the issue. See following POC of the Problem
will create the file
Yes i used here the exec intentionally here to exclude other Sensitive handling of the type itself. |
Describe the Bug
From the Datatype definition password_hash is allowed to be Sensitive but when setting it as one the password is set wrongly and ALTER password runs always.
Problem is https://github.com/puppetlabs/puppetlabs-postgresql/blob/v8.2.1/manifests/server/role.pp#L165 because is merged with string here https://github.com/puppetlabs/puppetlabs-postgresql/blob/main/manifests/server/role.pp#L182-L183
Resulting that
$pwd_hash_sql
will always replaced withSensitive [value redacted]
because it has not been unwrapped before.Expected Behavior
postgresql::server::role
should be allowed to be used with a Sensitive password_hash and with update_password enabled.Steps to Reproduce
Environment
Additional Context
POC of the problem:
The text was updated successfully, but these errors were encountered: