Repository navigation
[OID4VC] Support ETSI Lists of Trusted Entities - #54522
dominikschlosser wants to merge 1 commit into
Conversation
There was a problem hiding this comment.
🟡 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
x5cvalidation. - 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
ae35af9 to
86e8bf8
Compare
There was a problem hiding this comment.
🟡 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
86e8bf8 to
e5af3de
Compare
There was a problem hiding this comment.
🔵 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
e5af3de to
9415b4e
Compare
There was a problem hiding this comment.
🟡 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
9415b4e to
4233913
Compare
4233913 to
8e3be3c
Compare
8e3be3c to
e4f0861
Compare
e4f0861 to
1348c18
Compare
1348c18 to
cc6361d
Compare
| /** | ||
| * 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 |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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
left a comment
There was a problem hiding this comment.
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
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 |
cc6361d to
d497f29
Compare
Signed-off-by: Dominik Schlosser <dominik.schlosser@gmail.com>
d497f29 to
4bff7f1
Compare
Closes #48106
Adds an
etsi-trust-listidentity 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.x5cis required, as in HAIP, and keys cannot be selected bykid. Listed end entity certificates are ignored.NextUpdate, fails the trust decision until a valid list is available. Lists withoutNextUpdateare not trusted at all.X509TrustMaterialnow accepts subordinate CAs as trust anchors. Real lists contain them, for example the German sandbox PID list.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
x5csupport inAttestationBasedClientAuthenticator, which #52883 adds. Key attestations and OID4VP work without it.