-
Notifications
You must be signed in to change notification settings - Fork 12
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
Handling Secrets in KF Pipeline #23
Comments
We will leverage Hashicorp Vault for this, which can automatically inject the secrets into a running container. We can start with static secrets (stored in key-value pairs) and longer term looking at switching to more dynamic secrets for different components (like what we're doing with MinIO). |
Hey @justbert , if you have time, would you be able to look at whether we can apply Vault policies to users based on their |
Yeah, on it! |
Proof of concept is built! This is how we can operationalize it:
<kubeflow-profile-name> is compliant with DNS Subdomain Names (RFC 1123) and is a sanitized version of <preferred_username>. |
Just a written update: Due to the potential security pitfalls that could be created if the process for granting access to the stores isn't well structured. We've refactored the access and policy model got a good access model around it. I'm making sure that accounts and services in the system follow the Least Required Access principle and refactoring the system structure to enhance that even more. |
Here's an update: |
After researching this issue, and unfortunately diffusing the discussion of it by opening #62, I wanted to summarize where we are and what's left to do. Concrete use cases embodying this issueUsers need to pass secrets (either their own or those we provide, such as minio credentials) safely to kubeflow pipelines. Use cases include:
Lit review of examples of secrets being passedSecure examplesAn example of secret sharing is shown in the Kubeflow pipelines sdk for cloud credentials: These handle credentials by:
This results in secrets that appear as environment variables during runtime, but that do not appear in the yaml like a plain environment variable. For example:
This is the only approach I found for passing secrets without showing them in the yaml. The limitation here is that the secret needs to be in the pipeline runner's namespace (n=kubeflow) to be accessible, but the author of the pipeline never has access to that namespace. To solve this we need a way of putting the secret in the pipeline runner's namespace. Secrets cannot be shared across namespaces, but can be copied if someone has access to both Less secure examples...There are also examples where people pass secrets as bare environment variables, but then in the yaml they're exposed like:
For cases that pass secrets as environment variables, they must not be worried about the security of those secrets or they expect the wider namespace security covers their needs (eg: nobody who shouldn't see the secret ever gets access to the yaml)? Work completed so far#62 documents how environment variables passed to pipelines are visible in pipeline yaml files and thus are not suitable for secrets, especially for shared yaml files. Work on enabling vault for personal secrets is nearly complete (this issue, see notes above from @justbert). This will allow:
...but if we wanted these secrets available to kubeflow during pipeline runtime, we have to give the entire vault (or maybe just an entire namespace in a vault? either way...) to all running kubeflow pipelines via the ServiceAccounts and namespace. That means vault secrets would be public to anyone inside the kubeflow pipeline runner's namespace (kubeflow). Right now we have no way of saying "this pod in the pipeline runner gets Vault.A, this pod gets Vault.B" Still to do:While we have ways of storing secrets, we still do not have a way of passing them from a user to a running pipeline Ideas
|
@chritter @ca-scribner , now that we have namespaced pipelines, you can use regular ol' Kubernetes secrets for this. I think we should document this and place an example somwhere |
Going to close in favour of #91 |
Hello,
It would be great to be able to manage the secrets and credentials in the KF Pipeline components. This avoids accidental leakage of sensitive information.
Christian
The text was updated successfully, but these errors were encountered: