From 1242b9355ccc4b87fa64bfa69af46557d9aa8f0f Mon Sep 17 00:00:00 2001 From: Matthew DeVenny Date: Wed, 31 May 2023 11:39:36 -0700 Subject: [PATCH] Set AuthType for vault Signed-off-by: Matthew DeVenny --- pkg/controller/v2/controller.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/controller/v2/controller.go b/pkg/controller/v2/controller.go index 9ce5ee1..85074e7 100644 --- a/pkg/controller/v2/controller.go +++ b/pkg/controller/v2/controller.go @@ -674,12 +674,12 @@ func (h *Handler) getProfileFuncMap(profile *dockhand.Profile) (template.FuncMap } } if roleID != "" && secretID != "" { - opts = append(opts, vault.RoleAndSecretID(roleID, secretID)) + opts = append(opts, vault.RoleAndSecretID(roleID, secretID), vault.AuthType(vault.RoleAuth)) } if profile.Vault.TokenRef != nil { if secretData, err := h.secrets.Get(profile.Namespace, profile.Vault.TokenRef.Name, metav1.GetOptions{}); err == nil { if secretData != nil { - opts = append(opts, vault.Token(string(secretData.Data[profile.Vault.TokenRef.Key]))) + opts = append(opts, vault.Token(string(secretData.Data[profile.Vault.TokenRef.Key])), vault.AuthType(vault.RoleAuth)) } } else { return nil, err