-
Notifications
You must be signed in to change notification settings - Fork 115
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
Creating a Secret adds the clear text secret value to the annotation #965
Comments
I'm pretty sure this is caused by the secret being created and updated using (the same approach as) |
I'm working on a fix for this already in #961, but in the meantime, you should be able to wrap the string output in a |
Since we don't set the annotation explicitly (but it is rather set by Kubernetes itself) I'm not sure what to wrap anything in pulumi.secret that will help here. Maybe we could set the annotation to something else to prevent Kubernetes from setting it at all? |
@ringods Actually, I just reread the issue, and I'm unclear if you're reporting on the Pulumi state, or the actual Secret in k8s. If it's the latter, any secret values are always readable if you pull them via All values in the |
If the input (either Again, this doesn't have any affect on how this appears in k8s. Any user who can access a Secret resource on the cluster can directly read the secret values contained within. The annotation doesn't change that. |
Unless I'm mistaken (currently on phone) describing a secret lists annotations while you need to read (get) it to see its value, so there is a functional difference in terms of permission management |
I just checked this locally with kubectl, and it's not showing me the
Edit: |
Oh okay, thanks for checking that out! Sorry :) |
Alright, after some further testing, I discovered that
Since we are using this annotation to support client-side diffing, we'll keep the current behavior, and will create that annotation for any Secrets managed by Pulumi. |
To elaborate on the above remark by @lblackstone, the
See Kubernetes Object Management for more details. |
I’m creating a Kubernetes Secret with Pulumi, and the secret information is added to the Secret in clear text as an annotation.
My code snippet:
After running Pulumi, I check what was created using
kubectl
and got this:The secret value is in clear text in the annotation!!!
When I create the Secret manually via the CLI, I don't get this annotation:
So what is Pulumi doing wrong here?
Context:
@pulumi
v1.8.1@pulumi/kubernetes
v1.4.5The text was updated successfully, but these errors were encountered: