-
Notifications
You must be signed in to change notification settings - Fork 781
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
vault: support k8s auth method (#1580)
Implements support of K8S auth method. Adds new fields to CreateConsulClientInput: * K8SAuthRoleName string * K8SServiceAccountMountPath string * K8SServiceAccountToken string * K8SServiceMountPath string If a token is set in the function CreateVaultClient then ignore k8s auth method. Execute client.Auth().Login(...) with vault.auth.KubernetesAuth auth method, set the token. This can't be integration tested, so I mocked one endpoint (/v1/auth/kubernetes/login) with an *httptest.Server, all other calls are proxied to Vault
- Loading branch information
Showing
12 changed files
with
776 additions
and
84 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.