-
Notifications
You must be signed in to change notification settings - Fork 148
Add Kubernetes Auth method #52
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
Conversation
Jenkins master running on kubernetes can use a service account token to authenticate with vault.
|
|
||
| public class VaultKubernetesCredential extends AbstractVaultTokenCredential { | ||
|
|
||
| private static final String SERVICE_ACCOUNT_TOKEN_PATH = "/var/run/secrets/kubernetes.io/serviceaccount/token"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This path is not the same as it would be on Windows?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't really know that. The windows container support in kubernetes is relatively new and after a quick search I couldn't find any documentation on how the volumes work in windows containers, but I guess as in any regular windows.
The service account token is just a regular secret, so technically it can be mounted on any path even in unix containers. But the Service Account Admission Controller, which manages service accounts in kubernetes, mounts the token on this path by default. link to the documentation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perhaps this option should only be visible if kubernetes secret is detected?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can be achieved with isApplicable in the descriptor
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perhaps this option should only be visible if kubernetes secret is detected?
Do you mean to only show the VaultKubernetesCredential as option, when the mounted token is detected?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Simply a suggestion, don't know if it makes sense. I am fine with the feature as is.
|
Is there an ETA on merging/releasing this? |
|
😅 I been super busy at work lately. I'd be happy if someone wants to co-maintain the plugin! |
When the jenkins master is running on Kubernetes the authentication can be done using a Kubernetes service account token.
fixes #18