-
Notifications
You must be signed in to change notification settings - Fork 44
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
Secret output properties are not marked secret in the state #1380
Comments
This sounds bad on its face value... Do you think we should prioritise this? |
Yes! It's a real quick one to workaround and very much worth doing. If I don't get to it in this iteration next one is good. There's some more subtlety here, if I understand the flow correctly, secret-ness at the provider level is not propagated to Callbacks and it's not propagated to default value handling, so if default values are inherited from provider it unmasks any secrets. On the other hand I don't know of any practical scenarios where users are affected. And it's probably should not be the long-term strategy to patch things in this way; in the longer term we should consider opting into receiving secrets in the bridge and tracking their flow properly instead of relying on engine heuristics. In quick discussions with the team so far it feels like a larger lift due to concerns about observable behavior changes that users may depend on currently. |
I believe this issue might have been fixed since. I ran the following test:
I also did the same but with this line removed https://github.com/pulumi/pulumi-aws/blob/7c79fe28e58bfce60d3d9764c1fd6e067d73eeba/provider/resources.go#L7183 I'll raise a PR to remove the unnecessary Let me know if I missed something. |
@VenelinMartinov @t0yv0 If so, any ideas what could have fixed? The issue isn't old, so it must be some recent change? |
I do not think it's fixed. Pick a different property from tags_all for the repro as tags_all is increasingly special. Find a schema-secret output property and observe the issue. |
@VenelinMartinov it came onto the critical path of pulumi/pulumi-aws#2895 so I'm fixing this as I go, PR shortly. |
Fixes #1380 Similarly to Plugin Framework resources, SDKv2 based resources will now proactively mark properties as secrets in the results of Check method if the upstream schema says that these properties are sensitive or else if SchemaInfo in the bridged provider specifies the Secret true option.
What happened?
When working with pulumi/pulumi-aws#2791 I noticed that simply making a property Secret in SchemaInfo is insufficient to guarantee that the values of this property never appear in the plain the Pulumi state files.
It appears that we have some machinery to do this called MarkSchemaSecrets, but it is only applied in Check that is it applies to the inputs of a resource. If something is an output property that only becomes available during Create or Update, MarkSchemaSecrets does not touch it and it is then plain texted in the state file.
Example
In AWS provider, mark
tags_all
as Secret, provision a bucket with tags set and observe that the tags_all is not secret in the state.Output of
pulumi about
Additional context
N/A
Contributing
Vote on this issue by adding a 👍 reaction.
To contribute a fix for this issue, leave a comment (and link to your pull request, if you've opened one already).
The text was updated successfully, but these errors were encountered: