From 8305b57bab053ae86b1ad111b67712717d63649d Mon Sep 17 00:00:00 2001 From: Bani Singh Date: Sun, 1 Sep 2024 05:22:18 +0000 Subject: [PATCH] Adding check for refresh expiry in credshelper 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 --- cmd/bootstrap/main.go | 4 ---- 1 file changed, 4 deletions(-) diff --git a/cmd/bootstrap/main.go b/cmd/bootstrap/main.go index bd42024..38f4d72 100644 --- a/cmd/bootstrap/main.go +++ b/cmd/bootstrap/main.go @@ -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()