-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
file resource type displays Sensitive information in clear text in output when Deferred #9384
Comments
I'm not convinced this is a puppet bug. The deferrable_epp function should preserve the sensitiveness of its inputs and so would be an issue with the stdlib module. If you pass a Sensitive value to the file resource then it works as expected, correct? |
I'll do some experiments at work on Thursday and see where things break down for me. |
Rather than using: The first run creates a new file. No secrets show. I should point out that the .epp file is setup:
A co-worker reported having the variable in his .epp file declares as Sensitive but having to change to Variat[Senstive, String] for puppet agent 8. |
When puppet creates a file (or any other ensurable resource), it just logs that the resource was created, but not what each of the desired properties are. When puppet modifies an existing file (or other ensurable resources), it logs the properties that changed.
Can you include your epp file? |
The client's rules make it very hard to get permission to post code, which is why everything is rather generic. The .epp file:
Whenever the token changes under puppet-agent 8.5.1, the difference contains the secret in clear text. |
In puppet.conf I added: This appears to have fixed the issue by making puppet agent 8.5.1 behave more like puppet agent 7.27/7.29. I assume there is a reason the default was set to 'false' for puppet agent 8 (despite what the Puppet 8 documentation says it is.) |
Thanks @bobnegri yes sounds like an issue with how deferred resources are preprocessed.
Yes that's correct. We're working on fixing our docs configuration, see #9312 I verified that using a non-deferred
And if I modify the file locally, then puppet redacts the password:
We'll take a look |
Migrated issue to PUP-12050 |
Describe the Bug
We are passing a Sensitive object from vault_lookup to the file resource type using stdlib::deferrable_epp.
Running
puppet agent --test
results in the updated secret being rendered to the screen in plain text.Expected Behavior
The file resource type should not render Sensitive variable values in clear text in file difference output. The value rendered to output should be changed from Redacted to Redacted.
Steps to Reproduce
Steps to reproduce the behavior:
sudo puppet agent --test
Environment
Additional Context
I'm pretty sure the secret was not displayed when it changed under puppet 7.24.
The text was updated successfully, but these errors were encountered: