Skip to content

[OID4VC] Support ETSI Lists of Trusted Entities - #54522

Open
dominikschlosser wants to merge 1 commit into
keycloak:mainfrom
dominikschlosser:etsi-tl
Open

dominikschlosser wants to merge 1 commit into
keycloak:mainfrom
dominikschlosser:etsi-tl

Conversation

@dominikschlosser

@dominikschlosser dominikschlosser commented Nov 1, 2026 •

Copy link
Copy Markdown
Contributor

Closes #48106

Adds an etsi-trust-list identity provider that uses a signed ETSI TS 119 602 List of Trusted Entities (LoTE) as trust material for OID4VCI key attestations, attestation-based client authentication and OID4VP. This is necessary to use Keycloak as issuer or verifier in the EUDI ecosystem.

  • The list signature is verified against configured certificates, and the LoTE type and service types are enforced.
  • Listed CA certificates become X.509 trust anchors. x5c is required, as in HAIP, and keys cannot be selected by kid. Listed end entity certificates are ignored.
  • A list that fails to download or verify, or is past NextUpdate, fails the trust decision until a valid list is available. Lists without NextUpdate are not trusted at all.
  • X509TrustMaterial now accepts subordinate CAs as trust anchors. Real lists contain them, for example the German sandbox PID list.
  • Adds the admin console settings and documentation.

Lists of Trusted Lists (#54562) and Certificate Revocation (using CRL, #54561) are follow ups.
XML Trusted Lists are not supported for now, but may be needed in the future as well (QEAA providers might use them).

Live demo to test it: https://demo.eudi-test.dev/etsi-tl/
Keycloak admin UI with the changes in this PR: https://keycloak.eudi-test.dev/etsi-tl/admin/wallet-demo/console/ (Login: viewer/viewer)

Wallet/Key Attestation LoTE: https://eudi-test.dev/api/trustlists/wallet-provider
Credential LoTE (for OID4VP): https://keycloak.eudi-test.dev/trust-lists/issuers.jwt

German Sandbox LoTEs: https://bmi.usercontent.opencode.de/eudi-wallet/test-trust-lists/

Note: Client attestations with an ETSI trust list need x5c support in AttestationBasedClientAuthenticator, which #52883 adds. Key attestations and OID4VP work without it.

Copilot AI balanced review requested due to automatic review settings November 1, 2026 23:58
@dominikschlosser
dominikschlosser requested review from a team as code owners November 1, 2026 23:58

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.

🟡 Changes recommended

Refresh throttling can leave expired trust material usable, while public-key-based deduplication can discard valid renewed CA certificates and reject valid chains.

2 open issues
What changed in this PR

Adds ETSI List of Trusted Entities support to Keycloak’s trust-material identity providers, enabling EUDI Wallet trust for issuance, attestation-based client authentication, and presentation flows.

Changes:

  • Adds signed trust-list loading with list-type, service-scope, and freshness checks.
  • Supports subordinate CA trust anchors and client-attestation x5c validation.
  • Adds Admin Console configuration, documentation, and integration tests.
File Description
tests/​base/​src/​test/​java/​org/​keycloak/​tests/​oid4vc/​issuance/​signing/​OID4VCKeyAttestationTest.java Updates expectations for subordinate CA anchors.
tests/​base/​src/​test/​java/​org/​keycloak/​tests/​oid4vc/​abca/​OIDCMockClientAttester.java Supports certificate chains in mock attestations.
tests/​base/​src/​test/​java/​org/​keycloak/​tests/​oid4vc/​abca/​OIDCAttestationBasedClientAuthenticationTest.java Adds trust-list-backed authentication coverage.
tests/​base/​src/​test/​java/​org/​keycloak/​tests/​broker/​trust/​TrustListTestSupport.java Generates certificates and serves signed test lists.
tests/​base/​src/​test/​java/​org/​keycloak/​tests/​broker/​trust/​EtsiTrustListIdentityProviderTest.java Tests trust selection, validation, and refresh behavior.
services/​src/​main/​resources/​META-INF/​services/​org.keycloak.broker.provider.IdentityProviderFactory Registers the ETSI provider.
services/​src/​main/​java/​org/​keycloak/​broker/​trust/​etsi/​ListOfTrustedEntities.java Models trust-list JSON fields.
services/​src/​main/​java/​org/​keycloak/​broker/​trust/​etsi/​EtsiTrustListPublicKeyLoader.java Downloads, verifies, and extracts list certificates.
services/​src/​main/​java/​org/​keycloak/​broker/​trust/​etsi/​EtsiTrustListIdentityProviderFactory.java Defines provider settings and feature availability.
services/​src/​main/​java/​org/​keycloak/​broker/​trust/​etsi/​EtsiTrustListIdentityProviderConfig.java Parses and validates configuration.
services/​src/​main/​java/​org/​keycloak/​broker/​trust/​etsi/​EtsiTrustListIdentityProvider.java Exposes listed CA certificates as trust anchors.
services/​src/​main/​java/​org/​keycloak/​broker/​trust/​DefaultTrustIdentityProviderConfig.java Updates validation wording for CA anchors.
services/​src/​main/​java/​org/​keycloak/​broker/​oid4vp/​OID4VPIdentityProvider.java Removes the trust-list resolver TODO comment.
services/​src/​main/​java/​org/​keycloak/​authentication/​authenticators/​client/​AttestationBasedClientAuthenticator.java Adds attestation certificate-chain validation.
server-spi-private/​src/​main/​java/​org/​keycloak/​broker/​provider/​X509TrustMaterial.java Permits subordinate CA trust anchors.
js/​apps/​admin-ui/​src/​identity-providers/​routes/​IdentityProviderEtsiTrustList.tsx Defines the provider creation route.
js/​apps/​admin-ui/​src/​identity-providers/​routes.ts Registers the new route.
js/​apps/​admin-ui/​src/​identity-providers/​add/​EtsiTrustListSettings.tsx Renders trust-list configuration fields.
js/​apps/​admin-ui/​src/​identity-providers/​add/​DetailSettings.tsx Integrates provider-specific settings.
js/​apps/​admin-ui/​src/​identity-providers/​add/​AddEtsiTrustList.tsx Adds the provider creation form.
js/​apps/​admin-ui/​maven-resources/​theme/​keycloak.v2/​admin/​messages/​messages_en.properties Updates CA certificate help text.
docs/​documentation/​server_admin/​topics/​oid4vci/​proofs.adoc Documents ETSI trust-list setup and trust behavior.

Review effort: Balanced

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

🟡 Changes recommended

Critical security gaps allow expired trust-list CAs to remain trusted during cache reload throttling and permit missing x5c chains to bypass mandatory X.509 validation through kid fallback.

1 open issue
2 resolved since last review

Review effort: Balanced

Copilot AI balanced review requested due to automatic review settings November 2, 2026 01:56

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

Domain-owner security review is needed to validate ETSI/JAdES conformance, real signed LoTE interoperability, and broader X.509 anchor trust semantics beyond the synthetic-list tests.

No open issues 🎉

1 resolved since last review

Review effort: Balanced

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.

🟡 Changes recommended

The service-scope test uses an end-entity certificate independently rejected by isCaCertificate, masking missing service-type filtering; using Pki.ROOT would make it detect that regression.

1 open issue

Review effort: Balanced

Copilot AI balanced review requested due to automatic review settings November 3, 2026 10:35

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.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

Copilot AI balanced review requested due to automatic review settings November 3, 2026 10:53

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.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

Copilot AI balanced review requested due to automatic review settings November 3, 2026 16:09

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.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

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

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

Copilot AI balanced review requested due to automatic review settings November 3, 2026 17:43

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.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

@Awambeng Awambeng 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 for the PR. I’ve left a few minor comments.

Also, adding copyright headers to the new files is not necessary.

/**
* Exposes the CA certificates of an ETSI TS 119 602 List of Trusted Entities as X.509 trust anchors.
* HAIP requires the signing certificate in x5c and keeps the trust anchor out of it, so an artifact
* needs a chain to a listed CA. No key can be selected by kid and listed end entity certificates are

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.

Clause 6.6.3 allows any X.509 certificate in ServiceDigitalIdentity, not only CA certificates. We drop end entity certificates, so a scheme that publishes a leaf gives us nothing to trust. The docs do say this, just want to be sure it is a deliberate scope decision and not something we plan to support later.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Answer:

Yes. The class Javadoc and the docs say so. HAIP keeps the trust anchor out of x5c, so a listed leaf would need a separate pinned leaf path in X509CertificateChainValidator. That can be added later if a scheme needs it.

dominikschlosser asked the tracker's bot account to post this.

Automatic review by Claude Opus 5.5, checked by Claude Fable 5.2: https://oid4vc-sig.eudi-test.dev/reviews/54522.html#answer-t4479328201

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

HAIP requires the signing certificate in x5c and keeps the trust anchor out of it, so trust comes from a chain to a listed CA. A listed leaf would mean trusting a single key directly, which needs a different validation path. We can add that later if a scheme we need publishes only leaf certificates

@eudi-dev-bot eudi-dev-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.

AI review by Claude Code: Merge as is · 2 follow-ups

The PR adds an etsi-trust-list identity provider that downloads a signed ETSI TS 119 602 LoTE, verifies it against pinned signing certificates, checks LoTEType, service type, service status and NextUpdate, and exposes the listed CA certificates as X.509 trust anchors. It also lets X509TrustMaterial accept subordinate CAs as anchors. Load failures, expired lists and discontinued lists all lead to no trust material from this provider without breaking other providers, and the tests cover these cases. What remains are a misleading validation message, one missing docs sentence, a missing forced reload and a test with a real list shape.

For EUDI:

Keycloak can now use EUDI Wallet Provider, PID Provider and PubEAA Provider LoTEs directly for key attestations and SD-JWT VC presentations, but not yet for client attestations, which still need the x5c support from #52883. Admins must pin the list signing certificates and update them on rotation, because the provider does not follow a List of Trusted Lists yet.

Claude Code wrote this review of cc6361d. It read the code without building or running it.

dominikschlosser asked the tracker's bot account to post this.

Automatic review by Claude Opus 5.5, checked by Claude Fable 5.2: https://oid4vc-sig.eudi-test.dev/reviews/54522.html

@eudi-dev-bot

Copy link
Copy Markdown

Re Awambeng in a review:

The new files do not need copyright headers.

Answer:

The new Java files still carry the Red Hat header. Removing it is optional cleanup and does not block the merge.

dominikschlosser asked the tracker's bot account to post this.

Automatic review by Claude Opus 5.5, checked by Claude Fable 5.2: https://oid4vc-sig.eudi-test.dev/reviews/54522.html#answer-r5783452380

Copilot AI balanced review requested due to automatic review settings November 19, 2026 13:07

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.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

Signed-off-by: Dominik Schlosser <dominik.schlosser@gmail.com>
Copilot AI balanced review requested due to automatic review settings November 19, 2026 13:18

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.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[OID4VCI] Support for ETSI Trust Lists

4 participants