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

Implement pre-emptive credential refresh #1161

Open
igorbernstein2 opened this issue Oct 11, 2022 · 1 comment
Open

Implement pre-emptive credential refresh #1161

igorbernstein2 opened this issue Oct 11, 2022 · 1 comment
Labels
type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design.

Comments

@igorbernstein2
Copy link

Thanks for stopping by to let us know something could be better!

PLEASE READ: If you have a support contract with Google, please create an issue in the support console instead of filing on GitHub. This will ensure a timely response.

Is your feature request related to a problem? Please describe.
In the current implementation OAuth credentials get refreshed inline when auth headers are requested by gRPC. This causes latency spikes that are hard to debug.

Describe the solution you'd like
Implement a stale state for OAuth tokens where the existing token is returned, and a refresh is triggered in the background. Prior art: googleapis/google-auth-library-java#646

Describe alternatives you've considered
Other possibilities are:

  • Have an always running background thread to always refresh the token. This will have lifetime issues since credentials dont currently have a way to close them/stop the thread
@clundin25 clundin25 added the type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design. label Nov 7, 2022
@clundin25
Copy link
Contributor

Implemented for sync credentials in #1368.

Async implementation is blocked until the API / Inheritance issues are sorted.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design.
Projects
None yet
Development

No branches or pull requests

2 participants