hashicorp / vault-plugin-auth-kubernetes

Vault authentication plugin for Kubernetes Service Accounts
https://www.vaultproject.io/docs/auth/kubernetes.html
Mozilla Public License 2.0
206 stars 62 forks source link

CA cert on local disk is not reloaded if changed #170

Closed nsimons closed 1 year ago

nsimons commented 1 year ago

We found an issue where the CA certificate on local disk is not reloaded when it is changed.

To reproduce;

Similar problem could happen when Kubernetes API Server changes the server certificate issuer (the CA). Then the Kubernetes Auth Plugin is not reloading the TLSConfig to take the new CA into use.

Root cause is similar as #169. The cached HTTP Client TLSConfig is only set at initialization and at 'config write', but local CA file can theoretically change at any time.