Conversation
jwx v4 keeps unparseable keys as UnsupportedKey; round-tripping them into go-jose either failed the whole set or accepted RSA below 2048 bits. Skipping placeholders aligns token exchange with TokenValidator. Co-authored-by: Cursor <cursoragent@cursor.com>
rdimitrov
requested review from
ChrisJBurns,
JAORMX,
jhrozek and
tgrunnagle
as code owners
September 19, 2026 20:21
Co-authored-by: Cursor <cursoragent@cursor.com>
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #6697 +/- ##
==========================================
- Coverage 79.24% 79.24% -0.01%
==========================================
Files 795 795
Lines 80380 80386 +6
==========================================
+ Hits 63699 63701 +2
- Misses 16676 16680 +4
Partials 5 5 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
UnsupportedKeyplaceholders whose original JSON round-trips losslessly.bridgeJWKSetfed that JSON to go-jose, which either failed the whole set on an unknownktyor accepted RSA keys below jwx's 2048-bit floor.TokenValidator.Type of change
Test plan
task test) —go test -race ./pkg/authserver/server/tokenexchange(package suite, includingTestBridgeJWKSet_DropsUnsupportedKeys)task test-e2e)task lint-fix) — skipped; local golangci-lint cannot typecheck against Go 1.27.1Does this introduce a user-facing change?
Yes. External issuers whose JWKS mixes understood keys with unknown key types can now complete token exchange using the usable keys. Tokens signed with RSA keys smaller than 2048 bits are rejected on the token-exchange path (they already failed OIDC middleware verification after #6626).
Special notes for reviewers
This is the follow-up to #6626.
TokenValidatorwas already fail-closed (jwk.Exportrefuses placeholders); only the go-jose bridge onMultiIssuerTokenValidatorneeded the filter.Made with Cursor