-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
[bearertokenauthextension] Load token lazily for gRPC AUTH to fix token refresh issue #36749
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
@ms-hujia seems we miss a changelog entry. You can run |
Hi @frzifus, I've added the changelog and rebased with main. Could you help to merge this PR? |
Hi @jpkrohling and @frzifus, thanks for your review! I'm wondering when this fix could be merged and appear in the release. |
Description
For the gRPC client AUTH part of bearertokenauthextension, there's a token refresh issue which causes all telemetry rejected by server after a period of time. The old token is always used even if the token is refreshed in filesystem. The root cause is the token value is cached during the
PerRPCCredentials()
instead of retrieving the latest. This PR aims to fix it by loading the token lazily inGetRequestMetadata()
.Link to tracking issue
N/A.
Testing
After I built a new docker image with this fix and tested in my environment, the token refresh issue didn't happen again after the first token expired.
Documentation
N/A.