From 332ae57e2b57e7bc2e7863731bd85581baba56d3 Mon Sep 17 00:00:00 2001 From: Ivan Anisimov Date: Tue, 19 Mar 2024 07:30:45 -0700 Subject: [PATCH] Update client.go (#454) Signed-off-by: Ivan Anisimov --- internal/keystore/vault/client.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/keystore/vault/client.go b/internal/keystore/vault/client.go index 42625db8..dbdea62d 100644 --- a/internal/keystore/vault/client.go +++ b/internal/keystore/vault/client.go @@ -83,7 +83,7 @@ func (c *client) AuthenticateWithAppRole(login *AppRole) authFunc { "role_id": login.ID, "secret_id": login.Secret, }) - if secret == nil { + if secret == nil && err == nil { // The Vault SDK eventually returns no error but also no // secret. In this case have to return a (not very helpful) // error to signal that the authentication failed - for some @@ -108,7 +108,7 @@ func (c *client) AuthenticateWithK8S(login *Kubernetes) authFunc { "role": login.Role, "jwt": login.JWT, }) - if secret == nil { + if secret == nil && err == nil { // The Vault SDK eventually returns no error but also no // secret. In this case have to return a (not very helpful) // error to signal that the authentication failed - for some