Skip to content

Commit

Permalink
Update client.go (#454)
Browse files Browse the repository at this point in the history
Signed-off-by: Ivan Anisimov <[email protected]>
  • Loading branch information
yoks authored Mar 19, 2024
1 parent 2f5a124 commit 332ae57
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions internal/keystore/vault/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit 332ae57

Please sign in to comment.