Repository navigation
Conversation
…ion is accepted Reject the protected crit header during SD-JWT verification because the verifier supports no critical JOSE extensions. Cover both issuer-signed and key-binding JWTs in regression tests and document the compatibility change in th 8000 e upgrade guide. Closes keycloak#55380 AI Disclosure: This commit was authored with the assistance of an AI coding tool. All changes were reviewed and approved by the committer. Signed-off-by: Bruno Oliveira da Silva <bruno@abstractj.com>
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues remain for the change rejecting protected crit headers during SD-JWT verification.
No open issues 🎉
What changed in this PR
Fixes #55380 by rejecting protected crit headers during SD-JWT verification, since Keycloak supports no critical JOSE extensions in this verifier.
Changes:
- Rejects
critheaders for both issuer-signed and key-binding JWTs. - Adds regression tests and a helper for signing JWTs with custom protected headers.
- Documents the compatibility change and migration steps.
| File | Description |
|---|---|
| docs/documentation/upgrading/topics/changes/changes-27_0_0.adoc | Explains the rejection behavior and how to update affected credentials and presentations. |
| core/src/test/java/org/keycloak/sdjwt/TestUtils.java | Adds a signing helper that preserves custom protected headers. |
| core/src/test/java/org/keycloak/sdjwt/sdjwtvp/SdJwtVPVerificationTest.java | Tests rejection of critical headers in key-binding JWTs. |
| core/src/test/java/org/keycloak/sdjwt/SdJwtVerificationTest.java | Tests acceptance of noncritical extensions and rejection of critical headers in issuer-signed JWTs. |
| core/src/main/java/org/keycloak/sdjwt/JwsToken.java | Uses the parsed protected header for algorithm checks and rejects crit. |
Review effort: Balanced
graziang
reviewed
Nov 25, 2026
Contributor
There was a problem hiding this comment.
@abstractj thanks! I think we could drop the upgrade note, as from what I see only the OID4VP broker uses this verifier and the feature is still experimental
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.
Reject the protected crit header during SD-JWT verification because the verifier supports no critical JOSE extensions. Cover both issuer-signed and key-binding JWTs in regression tests and document the compatibility change in the upgrade guide.
Closes #55380
AI Disclosure: This commit was authored with the assistance of an AI coding tool. All changes were reviewed and approved by the committer.