hashicorp / vault-secrets-operator

The Vault Secrets Operator (VSO) allows Pods to consume Vault secrets natively from Kubernetes Secrets.
https://hashicorp.com
Other
436 stars 89 forks source link

CachingClientFactory: support client taints #717

Closed benashz closed 1 month ago

benashz commented 2 months ago

The secret reconcilers have no way of advising the CachingClientFactory that a Client might be invalid. Now a reconciler can taint the Client if a Vault operation fails for some reason. The common case is where a Vault request resulted in a 403 (forbidden) status code. In this case the reconciler can taint the client so that the next call to factory for the tainted client will have the factory check that the client's token is still valid by reaching out to Vault's lookup lookup API. Client taints should be used sparingly, since they can increase the number of requests to Vault.