8000 org.keycloak.sdjwt 26.8.2: a JWS crit header naming an unknown extension is accepted by abstractj · Pull Request #55523 · keycloak/keycloak · GitHub
[go: up one dir, main page]

Skip to content

org.keycloak.sdjwt 26.8.2: a JWS crit header naming an unknown extension is accepted - #55523

Open
abstractj wants to merge 1 commit into
keycloak:mainfrom
abstractj:issue-55380
Open

abstractj wants to merge 1 commit into
keycloak:mainfrom
abstractj:issue-55380

Conversation

@abstractj
Copy link
Copy Markdown
Contributor

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.

…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>
@abstractj
abstractj requested a review from a team November 25, 2026 12:34
@abstractj
abstractj requested a review from a team as a code owner November 25, 2026 12:34
Copilot AI balanced review requested due to automatic review settings November 25, 2026 12:34
Copilot AI left a comment
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 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 crit headers 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 graziang left a comment
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

org.keycloak.sdjwt 26.8.2: a JWS crit header naming an unknown extension is accepted

3 participants

0