Skip to content

Commit

Permalink
fix: Avoid crash when approle is not used (#421)
Browse files Browse the repository at this point in the history
Co-authored-by: Anis Elleuch <anis@min.io>
  • Loading branch information
vadmeste and Anis Elleuch committed Nov 10, 2023
1 parent 53b74e3 commit 2e9975b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions internal/keystore/vault/vault.go
Original file line number Diff line number Diff line change
Expand Up @@ -132,9 +132,9 @@ func Connect(ctx context.Context, c *Config) (*Store, error) {
retry time.Duration
)
switch {
case c.AppRole.ID != "" || c.AppRole.Secret != "":
case c.AppRole != nil && (c.AppRole.ID != "" || c.AppRole.Secret != ""):
authenticate, retry = client.AuthenticateWithAppRole(c.AppRole), c.AppRole.Retry
case c.K8S.Role != "" || c.K8S.JWT != "":
case c.K8S != nil && (c.K8S.Role != "" || c.K8S.JWT != ""):
authenticate, retry = client.AuthenticateWithK8S(c.K8S), c.K8S.Retry
}

Expand Down

0 comments on commit 2e9975b

Please sign in to comment.