fix: tolerate legacy JWK alg EdDSA on Ed25519 keys during draft-10 transition - #15
Merged
Merged
Conversation
…ansition Jwk.requireConsistentAlg rejected any JWK carrying alg: EdDSA, but the pre-draft-10 ecosystem (including the Python reference's clients) emits exactly that in JWKS — so Java-side verification of Python-issued resource tokens failed with 'Forbidden or unsupported JWK alg: EdDSA' (found live via the person server's mode-3 interop script). Token-header verification already accepts both Ed25519 and legacy EdDSA; this applies the same transition policy to JWK alg: EdDSA is accepted when the key is OKP/Ed25519 and rejected on any other key shape. Both tolerances flip to strict together once the ecosystem is on draft-10. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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.
0.2.x's
Jwk.requireConsistentAlghard-rejectsalg: EdDSA, but pre-draft-10 peers — including the Python reference's client scripts — emit it in JWKS. Net effect: Java-side verification of Python-issued resource tokens fails (Forbidden or unsupported JWK alg: EdDSA), found live when aauth-java-person-server's mode-3 interop script broke after the 0.2.1 bump.This is inconsistent with the library's own transition strategy: token-header verification already accepts both
Ed25519and legacyEdDSA. The fix applies the same policy to JWKs —EdDSAtolerated iff the key isOKP/Ed25519, rejected on any other shape (new negative test: EdDSA on a P-256 key). Both tolerances should flip to strict together when the ecosystem reaches draft-10.Suggest releasing as 0.2.2 so downstream (person server, full-java-demo) can pick it up from Central.
🤖 Generated with Claude Code