Skip to content

Commit

Permalink
Fix k8s authentication token not being set (#3)
Browse files Browse the repository at this point in the history
  • Loading branch information
jcbbc authored Mar 10, 2023
1 parent b95a31b commit 2027bcb
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions internal/provider/provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -148,5 +148,11 @@ func setupVaultClientAuth(client *vault.Client, authConf *providerAuthModel) err
return fmt.Errorf("not auth info returned for kubernetes auth with role %s and JWT %s: %s", role, jwt, err)
}

if authInfo.Auth == nil || authInfo.Auth.ClientToken == "" {
return fmt.Errorf("response did not return ClientToken, client token not set")
}

client.SetToken(authInfo.Auth.ClientToken)

return nil
}

0 comments on commit 2027bcb

Please sign in to comment.