File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
session/auth/authprovider Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -45,7 +45,7 @@ type DockerAuthProviderConfig struct {
45
45
TLSConfigs map [string ]* AuthTLSConfig
46
46
// ExpireCachedAuth is a function that returns true auth config should be refreshed
47
47
// instead of using a pre-cached result.
48
- // If nil then the cached result will expire after 10 minutes.
48
+ // If nil then the cached result will expire after 4 minutes and 50 seconds .
49
49
// The function is called with the time the cached auth config was created
50
50
// and the server URL the auth config is for.
51
51
ExpireCachedAuth func (created time.Time , serverURL string ) bool
@@ -59,7 +59,8 @@ type authConfigCacheEntry struct {
59
59
func NewDockerAuthProvider (cfg DockerAuthProviderConfig ) session.Attachable {
60
60
if cfg .ExpireCachedAuth == nil {
61
61
cfg .ExpireCachedAuth = func (created time.Time , _ string ) bool {
62
- return time .Since (created ) > 10 * time .Minute
62
+ // Tokens for Google Artifact Registry via Workload Identity expire after 5 minutes.
63
+ return time .Since (created ) > 4 * time .Minute + 50 * time .Second
63
64
}
64
65
}
65
66
return & authProvider {
You can’t perform that action at this time.
0 commit comments