8000 Upgrade WebAuthn4j to 0.32.0 with ML-DSA support by mabartos · Pull Request #54556 · keycloak/keycloak · GitHub
[go: up one dir, main page]

Skip to content

Upgrade WebAuthn4j to 0.32.0 with ML-DSA support - #54556

Merged
rmartinc merged 3 commits into
keycloak:mainfrom
mabartos:KC-50085
Nov 26, 2026
Merged

rmartinc merged 3 commits into
keycloak:mainfrom
mabartos:KC-50085

Conversation

@mabartos
@mabartos mabartos commented Nov 2, 2026 •
Copy link
Copy Markdown
Member

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.

🔵 Needs a closer look

The Jackson 3 migration affects persisted WebAuthn credentials and mdoc wire encoding, requiring runtime compatibility validation for legacy credentials and ML-DSA across supported JDK/provider combinations that could not be performed here.

No open issues 🎉

What changed in this PR

Upgrades WebAuthn4j to 0.32.0 to enable ML-DSA support in Keycloak’s WebAuthn flows, adopting the required Jackson 3 dependencies while adding legacy credential compatibility coverage.

Changes:

  • Adds ML-DSA-44, ML-DSA-65, and ML-DSA-87 to registration algorithm mapping and admin UI policy options.
  • Updates Jackson dependencies and migrates mdoc CBOR serialization to Jackson 3.
  • Adds ML-DSA and compatibility tests, plus documentation of browser and cryptographic-provider requirements.
File Description
testsuite/​integration-arquillian/​tests/​base/​src/​main/​java/​org/​keycloak/​testsuite/​arquillian/​TestClassProvider.java Updates test class inclusion for Jackson 3.
tests/​webauthn/​src/​test/​resources/​webauthn/​jackson2-credentials.json Adds legacy credential and assertion fixtures.
tests/​webauthn/​src/​test/​java/​org/​keycloak/​tests/​webauthn/​WebAuthnPasswordlessMLDSATest.java Extends ML-DSA tests to passwordless flows.
tests/​webauthn/​src/​test/​java/​org/​keycloak/​tests/​webauthn/​WebAuthnMLDSATest.java Tests ML-DSA registration, authentication, and invalid signatures.
tests/​webauthn/​src/​test/​java/​org/​keycloak/​tests/​webauthn/​WebAuthnJackson2CompatibilityTest.java Tests authentication with Jackson 2 credential fixtures.
services/​src/​test/​java/​org/​keycloak/​credential/​WebAuthnCredentialSerializationTest.java Tests legacy key and attestation serialization compatibility.
services/​src/​main/​java/​org/​keycloak/​authentication/​requiredactions/​WebAuthnRegister.java Maps ML-DSA policy names to COSE algorithm identifiers.
quarkus/​runtime/​pom.xml Includes Jackson 3 runtime dependencies.
pom.xml Upgrades WebAuthn4j and imports the Jackson 3 BOM.
js/​apps/​admin-ui/​src/​authentication/​policies/​WebauthnPolicy.tsx Adds ML-DSA policy options.
integration/​admin-client-jackson3/​pom.xml Uses centrally managed Jackson versions.
docs/​documentation/​server_admin/​topics/​authentication/​webauthn.adoc Documents ML-DSA availability and requirements.
core/​src/​test/​java/​org/​keycloak/​mdoc/​CborUtilTest.java Adds nested-map and tagged-CBOR encoding tests.
core/​src/​main/​java/​org/​keycloak/​mdoc/​CborUtil.java Migrates CBOR serialization to Jackson 3 APIs.

Review effort: Balanced

@mabartos
mabartos requested a balanced review from Copilot November 4, 2026 15:32
@mabartos
mabartos marked this pull request as ready for review November 4, 2026 15:32
@mabartos
mabartos requested review from a team as code owners November 4, 2026 15:32
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.

🔵 Needs a closer look

The WebAuthn4j/Jackson 3 migration requires runtime validation of persisted-credential compatibility and ML-DSA across supported JDK and FIPS configurations, but the necessary dependencies and browser runtime are unavailable for this review.

No open issues 🎉

Review effort: Balanced

@stianst stianst 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.

Needs to be wrapped in a feature (WEBAUTHN_ML_DSA) as specifications are not finalised at this point.

We can target preview for 27. If this PR is the complete work needed then you can just introduce the feature as preview straight away, if there is follow-up work needed, including testing, then do experimental initially.

Copilot AI balanced review requested due to automatic review settings November 12, 2026 12:42
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.

🔵 Needs a closer look

The WebAuthn4j/Jackson 3 upgrade requires runtime validation of legacy credentials, persisted-CBOR compatibility, and ML-DSA across supported JDKs and cryptographic providers, but dependency-backed checks are unavailable and browser tests may be skipped.

No open issues 🎉

Review effort: Balanced

@mabartos
Copy link
Copy Markdown
Member Author

@keycloak/cloud-native @michalvavrik Could you please check this, as it needs Jackson 3? Thanks!

@rmartinc rmartinc 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.

Thanks @mabartos! LGTM! And I like the idea of returning the webauthn algorithms in the server info instead of using the profile (easier to integrate later). But there are conflicts in the WebAuthnCredentialProvider, probably because of your previous change in the HOTP issue. Let's see what other teams think about this.

@michalvavrik
michalvavrik requested review from shawkins and removed request for michalvavrik November 13, 2026 09:00
Copilot AI balanced review requested due to automatic review settings November 13, 2026 10:49
@mabartos
Copy link
Copy Markdown
Member Author

@rmartinc Updated, thanks!

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.

🔵 Needs a closer look

The WebAuthn4j/Jackson migration requires runtime validation of existing passkey compatibility and ML-DSA verification across supported JDKs and providers, which was unavailable in this review environment.

No open issues 🎉

Review effort: Balanced

@mabartos
mabartos requested a review from rmartinc November 16, 2026 08:57
rmartinc
rmartinc previously approved these changes Nov 16, 2026
@rmartinc rmartinc 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.

Thanks @mabartos! LGTM!
@keycloak/cloud-native Is the jackson tools upgrade OK for you? Thanks!

@Pepo48 Pepo48 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.

Could we exclude webauthn4j-core from the CLI’s keycloak-core dependency? It pulls Jackson 3 into the shaded JAR (which grew from 7.4 MB to 10 MB because of that) used by kcadm and kcreg. I guess they don't use WebAuthn4J functionality.

I tried the exclusion locally and all CLI tests passed, with Jackson 2 YAML still in the JAR.

I also tested this PR with our quarkus4-upgrade branch. The dist built and started with Jackson 3.2.4.

Closes keycloak#50085
Closes keycloak#50086

Signed-off-by: Martin Bartoš <mabartos@redhat.com>
Signed-off-by: Martin Bartoš <mabartos@redhat.com>
@mabartos
Copy link
Copy Markdown
Member Author

@Pepo48 I did it, but I believe that once you merge the Quarkus 4 changes, you'll go over these dependencies.

Thanks!

@rmartinc @Pepo48 Ready for another review. Thanks!

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.

🔵 Needs a closer look

The WebAuthn4j/Jackson 3 migration requires runtime validation of persisted legacy credentials and ML-DSA registration/authentication across supported JDK and provider configurations, which could not be performed here.

No open issues 🎉

Review effort: Balanced

Signed-off-by: Martin Bartoš <mabartos@redhat.com>
Copilot AI balanced review requested due to automatic review settings November 26, 2026 08:05
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.

🔵 Needs a closer look

The authentication-library and Jackson major-version upgrades affect persisted credentials and mdoc encoding, requiring runtime validation of legacy compatibility and ML-DSA verification across supported JDK/provider combinations.

No open issues 🎉

Review effort: Balanced

@keycloak-github-bot keycloak-github-bot Bot left a comment
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Unreported flaky test detected, please review

@keycloak-github-bot
Copy link
Copy Markdown

Unreported flaky test detected

If the flaky tests below are affected by the changes, please review and update the changes accordingly. Otherwise, a maintainer should report the flaky tests prior to merging the PR.

org.keycloak.testsuite.forms.RegisterWithUserProfileTest#testRegisterUserSuccess_lastNameRequiredForScope_notRequested

Keycloak CI - Forms IT (firefox)

org.openqa.selenium.TimeoutException: 
Navigation timed out after 10000 ms
Build info: version: '4.46.0', revision: 'df5a634 df5a6341cbb5f8f06b836bd595752775627c80dc'
System info: os.name: 'Linux', os.arch: 'amd64', os.version: '7.0.0-1020-azure', java.version: '25.0.5'
Driver info: org.openqa.selenium.firefox.FirefoxDriver
...

Report flaky test

@mabartos
mabartos requested review from Pepo48 and rmartinc November 26, 2026 09:50
@mabartos
Copy link
Copy Markdown
Member Author

@rmartinc @Pepo48 Could you please check it? Thanks!

@rmartinc rmartinc 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.

Thanks @mabartos and @Pepo48!

@rmartinc
rmart F2F4 inc merged commit 764fe21 into keycloak:main Nov 26, 2026
100 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

5 participants

0