Repository navigation
[OID4VP] Delegate trust material to an external trust IdP by alias - #51673
Conversation
|
@forkimenjeckayang @Awambeng @IngridPuppet Just pinging you for the review (I am not able to add you directly as reviewers). |
Unreported flaky test detectedIf 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.webauthn.passwordless.WebAuthnPwdLessPropertyTest#timeout |
8944616 to
637f98e
Compare
637f98e to
bdd4d3c
Compare
bdd4d3c to
056e005
Compare
056e005 to
9727b17
Compare
9727b17 to
d314ce1
Compare
Signed-off-by: Dominik Schlosser <dominik.schlosser@gmail.com>
d314ce1 to
8cfad07
Compare
| name="config.requiredExtendedKeyUsages" | ||
| label={t("requiredExtendedKeyUsages")} | ||
| labelIcon={t("requiredExtendedKeyUsagesHelp")} |
mposolda
left a comment
There was a problem hiding this comment.
The updates in this PR looks good to me, but I did not verify the pieces related to VP.
Leaving to the @rmartinc , @mabartos , @vaceksimon .
@forkimenjeckayang @Awambeng @Ogenbertrand @IngridPuppet Anyone from your team available to review?
rmartinc
left a comment
There was a problem hiding this comment.
I tested this yesterday and it was working OK for the PID combined (configuring the trust using jwks and certificate). So I think it is OK. I'm approving and merging it.
@forkimenjeckayang @Awambeng @Ogenbertrand @IngridPuppet If anyone finds some issue, please fill a follow-up issue for the findings.
Thanks @dominikschlosser and all people involved here!
|
@mabartos I commented on the linked report, it is a false positive. |
Closes #50664
@rmartinc @vaceksimon @mabartos This is required work for supporting the ETSI trust list integration thats needed for the EUDI ecosystem
@mposolda This does some refactoring for the
TrustMaterialIdentityProviderand Cert chain validation / EKU requirements. So please review as well.Trust delegation
trustMaterialIdpsto the OID4VP idp config: comma-separated aliases of trust material identity providers (e.g.default-trust) supplying the trusted issuer keys and X.509 trust anchors. Takes precedence over the inlinetrustedIssuerJwks; config validation requires one of the two.TrustMaterialSdJwtIssuerResolvermandates chain validation whenever the resolved trust material exposes X.509 anchors (HAIP 6.1.1): the credential's x5c must validate against the anchors and the chain leaf key verifies the signature; a credential without an x5c is rejected instead of silently falling back to key lookup. Only anchor-free configurations resolve trusted keys by kid/alg/iss hints.Certificate chain validation moved out of the attestation code
AttestationX509CertificateValidatortoorg.keycloak.crypto.X509CertificateChainValidatorin core, so both OID4VCI attestation and OID4VP presentation verification share one implementation.TrustMaterialIdentityProvidergained a default methodvalidateX509Chainthat validates the presented certificate chain against the provider's X.509 trust material.TrustMaterialResolverapplies the same logic across several providers referenced by alias, replacing the removedAttestationX509CertificateValidator.Required EKUs are configuration instead of being hardcoded
attestationExtendedKeyUsagestorequiredExtendedKeyUsages(X509TrustMaterial.requiredExtendedKeyUsagesaccordingly): the leaf certificate must contain at least one of the configured OIDs, additional EKUs are fine, an empty list imposes no restriction.