mirror of
https://github.com/windmill-labs/windmill.git
synced 2026-09-06 16:02:23 +00:00
Stale-while-revalidate re-served cached keys and bumped their window on every request, but never tracked when the keys were last fetched successfully, so a persistently failing refresh (a revoked kid, or an unreachable issuer) served the old keys forever, minting fresh 24h guest JWTs indefinitely. Track fetched_at, preserve it across stale re-serves, and stop serving keys older than JWKS_MAX_STALE (1h): too-old keys fall through to a blocking refresh that fails closed. Also log the oversized-bearer refusal, which returned a bare None. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VF3v6LA9399gNphmZaHYG3