-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(gcp service): Adapt to token regen behavior change (#21411)
* fix(GcpAuthenticator): Handle metadata behaviour change with token regen * fix(GcpAuthenticator): Handle metadata behaviour change with token regen * changelog file * rename changelog file * improve readability * Add additional changelog info * change text to pass spell check * fmt
- Loading branch information
1 parent
4b3de83
commit 6ff1fd6
Showing
2 changed files
with
23 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
Adjusts GcpAuthenticator token regeneration to reflect recent metadata server behaviour changes. | ||
|
||
metadata-server (0.4.292 and above) will return a cached token during the last 300-60 seconds of its lifetime (rather than the currently documented behaviour of returning a fresh token during the last 300 seconds). | ||
|
||
If a request for a fresh token is made to the metadata server during that window: | ||
|
||
- it will return a cached token | ||
- it will also trigger a background refresh process | ||
- if the refresh is successful, the metadata server will update its cache | ||
|
||
This change deals with this scenario by retrying the token refresh after 2 seconds if a cached token is determined to have been returned from the metadata server. | ||
|
||
authors: garethpelly |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters