Skip to content

fix(authn): stop trusting keys that are removed from the JWKS - #14

Merged
sujal-maheshwari2004 merged 1 commit into
mainfrom
fix/jwks-key-rotation
Nov 15, 2026
Merged

sujal-maheshwari2004 merged 1 commit into
mainfrom
fix/jwks-key-rotation

Conversation

@sujal-maheshwari2004

Copy link
Copy Markdown
Member

Security fix for GHSA-7q3w-26fc-h52h; the advisory is published with the release that contains it. Tested in the advisory's private fork and on current main (go vet, go test).

KeySet only ever added keys, so a kid rotated out of /jwks stayed trusted for
the life of the process. Rotating a leaked signing key did not take effect
until every server restarted.

Each successful fetch now replaces the cached key set, and a set older than
five minutes is re-fetched in the background (requests keep being served
from the cache, and a failed refresh keeps the cached keys and retries after
30s), so a removed key stops verifying within that window.
@sujal-maheshwari2004
sujal-maheshwari2004 merged commit 50d773c into main Nov 15, 2026
1 check passed
@sujal-maheshwari2004
sujal-maheshwari2004 deleted the fix/jwks-key-rotation branch November 15, 2026 05:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant