mirror of
https://github.com/moby/buildkit.git
synced 2026-11-06 05:16:45 +00:00
The timeout for daemon-side session auth round-trips with the buildx client session (resolving credentials, fetching auth tokens, verifying token authority) was hardcoded to 60 seconds. Turn the package-level const into an exported var, SessionAuthTimeout, and make it configurable from buildkitd.toml via [system].sessionAuthTimeout, applied at daemon start in the existing [system] block, following the same pattern as [system].platformsCacheMaxAge. The value accepts a duration string (e.g. "48h") or a bare integer treated as seconds, reusing the existing config.Duration type. If unset, the default of 60s is kept, so existing deployments see no behavior change. A configured value of zero or less disables the deadline entirely: the withTimeout helper skips the context.WithTimeoutCause call for non-positive values, because a zero-duration context would expire immediately and fail every auth round-trip. Signed-off-by: Paul Schroeder <paul.schroeder@pingidentity.com>