Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bearer_token needs to be reloaded every 1h to avoid expired service account tokens #530

Closed
grosser opened this issue Jan 19, 2022 · 0 comments · Fixed by #532
Closed

bearer_token needs to be reloaded every 1h to avoid expired service account tokens #530

grosser opened this issue Jan 19, 2022 · 0 comments · Fixed by #532

Comments

@grosser
Copy link
Contributor

grosser commented Jan 19, 2022

as per https://github.com/kubernetes/enhancements/blob/master/keps/sig-auth/1205-bound-service-account-tokens/README.md since 1.22 (or with BoundServiceAccountTokenVolume=true) tokens will expire every 1h and need to be re-loaded from disk

options:

  • add a reload_bearer_auth_token method for users to call
  • add an internal Thread the reloads it (... ideally on by default, but tricky)
  • check age every time a request is made and reload as needed
  • reload on every request (in def rest_client and def http_options) since it's pretty cheap and usually an in-memory file
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant