Skip to content

Commit

Permalink
Ignore anonymous request failures checking kv status
Browse files Browse the repository at this point in the history
When making unauthenticated secret lookup requests, ignore errors that
result from checking the secret mount type.  If it's a persistent error,
the error on the actual lookup.

This restores behavior to before
#1180 .
  • Loading branch information
Mahmood Ali committed Jul 16, 2019
1 parent 9dc0e8d commit ae80c54
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions dependency/vault_common.go
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,12 @@ func isKVv2(client *api.Client, path string) (string, bool, error) {
return "", false, nil
}

// anonymous requests may fail to access /sys/internal/ui path
// Vault v1.1.3 returns 500 status code but may return 4XX in future
if client.Token() == "" {
return "", false, nil
}

return "", false, err
}

Expand Down

0 comments on commit ae80c54

Please sign in to comment.