-
Notifications
You must be signed in to change notification settings - Fork 228
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
Figure out how to handle secrets #3125
Comments
I think I agree with the approach here - I think we are recommending to not store the secret in git, even encrypted. Rather secrets should be stored in the cloud's secure secret manager or a service like vault. For TLS we could also recommend using certificate management functionality where that is separate. For automatically generated secrets, I think we should think about a controller that is capable of generating and storing a secret, and rotating that secret according to some policy. That feels like an accurate description of what we want here from a policy perspective, and I believe we've had customers asking for similar things. For manually managed secrets, I think this path would mean that we are proposing that users manually upload them. That feels pretty reasonable: we could put a tool or UI in front of the native APIs/UIs, but it's not clear that there's much value in doing so - nor that we necessarily have any particular insight which makes us the team to build that (yet?). Where we could maybe bring value is if we wanted to describe it using the same CRD as for automatically generated secrets, even though generation and rotation would be manual, and use this to remind people to upload the secret if it wasn't there, or to rotate the secret according to some policy. |
Yes, definitely as much as is practical we should recommend automatically rotated secrets: service accounts, workload identity, managed certs, and so on. |
https://dnastacio.medium.com/why-you-should-avoid-sealed-secrets-in-your-gitops-deployment-e50131d360dd Looks like Jenkins-X uses external secrets: It does look like it updates secrets in place, however, rather than creating new ones. |
This controller includes a secret generator: |
An example discovered in Ghost Application package: Two secrets are used. One for ghost-app and the other is for MariaDB. The secretes are referred by ghost-app The secretes are also injected in these two resources' |
For completeness, kustomize supports secret generation plugins. Example plugin: |
External secrets was inducted into the CNCF sandbox: |
We probably want a mechanism to help users not commit Secrets to git. |
Forking the discussion from #2433 (comment)
For usage in applications, there's https://secrets-store-csi-driver.sigs.k8s.io/.
For cases where we do need to copy into Kubernetes Secrets, I'd recommend using a similar approach as GitOps, which is copying from the storage system, the secret manager in this case rather than git. In the GitOps layer that could be a special kind of sync request. In the kpt CLI we'll need to figure out how we want to stage secrets before the apply, and ensure we don't leak them.
There's also the issue of generation, for cases where users do want to pre-generate secrets and push them along with their other configuration.
The text was updated successfully, but these errors were encountered: