You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 2c100fb
Browse filesBrowse the repository at this point in the historyBrowse files
fix(scheduledauth): use hardened HTTP client for JWKS warmup and fetch
The scheduled-task OIDC validator issued its JWKS warmup probe via
http.DefaultClient and let go-oidc's RemoteKeySet fetch keys over the
default transport. The JWKS URL is operator-supplied
(SCHEDULED_TASK_OIDC_JWKS_URL), so a misconfigured or compromised value
could reach internal/metadata endpoints, bypassing the IMDS-blocking
hardening the Azure provider clients already use.
Move the hardened client (IMDS blocking, dial/TLS/overall timeouts)
from providers/azure/internal/httpclient to the shared pkg/httpclient
package, since the Azure-internal package is unimportable across the
module boundary; the Azure package now delegates to it so there is a
single implementation. The validator constructs this client once in
configureOIDC, uses it for the warmup probe, and supplies it to
go-oidc via oidc.ClientContext so key fetches and rotation refreshes
ride the same hardened transport.
Regression tests guard all paths: the constructed client must not be
http.DefaultClient and must carry a timeout and dedicated transport;
Warmup and token-verification key fetches are run with a guarded
http.DefaultClient that fails the test if used (both fail pre-fix);
pkg/httpclient gets direct IMDS-blocking coverage (IPv4 + IPv6).
Closes#1145
0 commit comments