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
Bound JWKS staleness for caller-token validation #449
Parent: #367 — caller identity must have an explicit failure policy when an IdP's signing keys cannot be refreshed.
Problem
toolhive-core/authn.Config.MaxJWKSStaleness exists, but mecatl leaves it at zero (disabled). After one successful JWKS fetch, an IdP outage can leave the last good key set trusted indefinitely. A revoked signing key therefore remains accepted for the duration of the outage.
Scope
This is a follow-up to the caller-identity integration and must land with the tagged toolhive-core/authn dependency, not as an inert flag in an authn-less build.
Acceptance criteria
Decide and document the production default staleness bound, including whether operators may relax, disable, or only tighten it.
Expose the chosen policy through the supported operator configuration surface.
With a warm cache and a healthy IdP, valid tokens continue to validate.
With a warm cache, an unavailable IdP, and cache age beyond the configured bound, validation fails closed as identity unavailable (HTTP 503), never as accepted or an invalid-token 401.
The bound applies to both OIDC discovery and explicitly configured JWKS endpoints as applicable to the authn adapter.
User and operator documentation explain the revocation/outage trade-off.
Evidence
The caller-identity kind probe and plan recorded the current behavior in docs/acceptance/caller-identity-e2e.md under “JWKS staleness is unbounded by omission.” The authn library already has a focused staleness test; this issue is the mecatl wiring, policy decision, and end-to-end proof.
Activity
Merge pull request #458 from stacklok/spike/authn-wiring