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 {
4545 TLSConfigs map [string ]* AuthTLSConfig
4646 // ExpireCachedAuth is a function that returns true auth config should be refreshed
4747 // 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 .
4949 // The function is called with the time the cached auth config was created
5050 // and the server URL the auth config is for.
5151 ExpireCachedAuth func (created time.Time , serverURL string ) bool
@@ -59,7 +59,8 @@ type authConfigCacheEntry struct {
5959func NewDockerAuthProvider (cfg DockerAuthProviderConfig ) session.Attachable {
6060 if cfg .ExpireCachedAuth == nil {
6161 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
6364 }
6465 }
6566 return & authProvider {
You can’t perform that action at this time.
0 commit comments