Skip to content

Commit

Permalink
Adding check for refresh expiry in credshelper
Browse files Browse the repository at this point in the history
If refresh expiry is earlier than token expiry, then credshelper should
fail and not cache the token.

Bug: b/362712485
Test: N/A

Change-Id: Icba3a2cd452be4c61fd78db43f5431696653719f
GitOrigin-RevId: 89e3ad80363aeddb152d5c279f03d902babebd01
  • Loading branch information
banikharbanda authored and copybara-github committed Sep 12, 2024
1 parent 7d7af85 commit 8305b57
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions cmd/bootstrap/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -150,10 +150,6 @@ func main() {
fmt.Fprintf(os.Stderr, "Credentials helper failed. Please try again or use application default credentials:%v", err)
os.Exit(auth.ExitCodeExternalTokenAuth)
}
err = c.RefreshStatus()
if err != nil {
log.Exitf("Error obtaining credentials: %v", err)
}
ts = c.TokenSource()
} else {
m := authMechanism()
Expand Down

0 comments on commit 8305b57

Please sign in to comment.