ExecAuth token cache is stale and cannot be reset when ADC auth token is regenerated
Describe the bug exec_auth cache the token despite gcloud adc token has been invalidated using gcloud auth revoke. Our product Cloud Code integrates with this k8s nodejs application and we use gcloud ADC for permission to GCP services, our tool does allow user to sign out and sign back in and we need a way to clear the exec_auth cache as gke_gcloud_auth_plugin (which is an exec) is a common auth method for GKE clusters.
** Client Version ** 0.16.3
** Server Version ** n/a
To Reproduce
- use gcloud auth revoke
- re-sign in using gcloud auth application-default login
- Token inside exec_auth is the old token despite the new token generated by gcloud
Expected behavior A way for application to clear the cache in exec_auth on demand.
** Example Code** ExecAuth.clearCache() and access to ExecAuth instance from KubeConfig object or KubeConfig.clearTokenCache()
We can also send you a PR if you're ok with the API proposal below. Thanks!
Environment (please complete the following information):
- OS: MacOSX, Linux and Windows
- NodeJS Version: 18.7
- Cloud runtime: GCP
Additional context Add any other context about the problem here.
We'd be happy to take a PR to implement this. Note that I don't think that kubectl handles this case correctly either.
The Kubernetes project currently lacks enough contributors to adequately respond to all issues and PRs.
This bot triages issues and PRs according to the following rules:
- After 90d of inactivity,
lifecycle/staleis applied - After 30d of inactivity since
lifecycle/stalewas applied,lifecycle/rottenis applied - After 30d of inactivity since
lifecycle/rottenwas applied, the issue is closed
You can:
- Mark this issue or PR as fresh with
/remove-lifecycle stale - Mark this issue or PR as rotten with
/lifecycle rotten - Close this issue or PR with
/close - Offer to help out with Issue Triage
Please send feedback to sig-contributor-experience at kubernetes/community.
/lifecycle stale
The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs.
This bot triages issues and PRs according to the following rules:
- After 90d of inactivity,
lifecycle/staleis applied - After 30d of inactivity since
lifecycle/stalewas applied,lifecycle/rottenis applied - After 30d of inactivity since
lifecycle/rottenwas applied, the issue is closed
You can:
- Mark this issue or PR as fresh with
/remove-lifecycle rotten - Close this issue or PR with
/close - Offer to help out with Issue Triage
Please send feedback to sig-contributor-experience at kubernetes/community.
/lifecycle rotten
The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs.
This bot triages issues according to the following rules:
- After 90d of inactivity,
lifecycle/staleis applied - After 30d of inactivity since
lifecycle/stalewas applied,lifecycle/rottenis applied - After 30d of inactivity since
lifecycle/rottenwas applied, the issue is closed
You can:
- Reopen this issue with
/reopen - Mark this issue as fresh with
/remove-lifecycle rotten - Offer to help out with Issue Triage
Please send feedback to sig-contributor-experience at kubernetes/community.
/close not-planned
@k8s-triage-robot: Closing this issue, marking it as "Not Planned".
In response to this:
The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs.
This bot triages issues according to the following rules:
- After 90d of inactivity,
lifecycle/staleis applied- After 30d of inactivity since
lifecycle/stalewas applied,lifecycle/rottenis applied- After 30d of inactivity since
lifecycle/rottenwas applied, the issue is closedYou can:
- Reopen this issue with
/reopen- Mark this issue as fresh with
/remove-lifecycle rotten- Offer to help out with Issue Triage
Please send feedback to sig-contributor-experience at kubernetes/community.
/close not-planned
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.