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

fix: timing of stale token refreshes on ComputeEngine #749

Merged
merged 8 commits into from Sep 30, 2021

Commits on Sep 28, 2021

  1. fix: timing of stale token refreshes on ComputeEngine

    ComputeEngine metadata server has its own token caching mechanism that will return a cached token until the last 5 minutes of its expiration. This has a negative interaction with stale token refreshes because stale token refresh kicks in T-6mins until T-5mins. This will cause every stale refresh to return the same stale token.
    
    This PR updates the timing for ComputeEngineCredentials to start a stale refresh at T-4mins and consider the token expired at T-3 mins. The implementation is a bit noisy because it includes a change OAuth2Credentials to make the thresholds configureable and now that we targeting java8, I migrated to using java8 time data types
    igorbernstein2 committed Sep 28, 2021
    Copy the full SHA
    e567395 View commit details
    Browse the repository at this point in the history
  2. fmt

    igorbernstein2 committed Sep 28, 2021
    Copy the full SHA
    d69e469 View commit details
    Browse the repository at this point in the history
  3. fix test

    igorbernstein2 committed Sep 28, 2021
    Copy the full SHA
    d4d37a6 View commit details
    Browse the repository at this point in the history
  4. fix test again

    igorbernstein2 committed Sep 28, 2021
    Copy the full SHA
    7c4eef1 View commit details
    Browse the repository at this point in the history
  5. Copy the full SHA
    da2d455 View commit details
    Browse the repository at this point in the history

Commits on Sep 29, 2021

  1. remove debug code

    igorbernstein2 committed Sep 29, 2021
    Copy the full SHA
    521e959 View commit details
    Browse the repository at this point in the history

Commits on Sep 30, 2021

  1. comments

    igorbernstein2 committed Sep 30, 2021
    Copy the full SHA
    77cc25e View commit details
    Browse the repository at this point in the history
  2. Copy the full SHA
    8987544 View commit details
    Browse the repository at this point in the history