Parent PRD
#4079
What to build
Extract the validatePolicyAssertions logic from X509CredentialValidator and make it apply generically to any credential with a did:x509 issuer. This implements PSA 10.6.2 rule 9: identifier values in credentialSubject that originate from the issuer DID must match the corresponding attributes in the issuer DID.
- In the
Verify function (verifier.go), after signature verification succeeds for a credential with a did:x509 issuer, match credentialSubject identifiers against issuer DID attributes
- Implement a recursive walk of the
credentialSubject JSON to find all objects with system/value fields (identifier pattern per PSA 10.6.1)
- Match each identifier against the corresponding issuer DID attribute based on
system URI:
http://fhir.nl/fhir/NamingSystem/ura → URA from issuer DID
http://fhir.nl/fhir/NamingSystem/uzi-nr-pers → UZI-nummer from issuer DID
- Handle
roleCode as a known special case (direct attribute, not an identifier object)
- Remove
validatePolicyAssertions from X509CredentialValidator
This is independent of the CRL/resolver changes and can be worked on in parallel.
Acceptance criteria
Blocked by
None — can start immediately (independent of resolver/key resolution changes).
User stories addressed
- User story 1: PatientEnrollmentCredentials get attribute matching
- User story 2: HealthcareProfessionalDelegationCredentials get UZI-nummer and roleCode validated
- User story 3: HealthcareProviderCredentials get URA validated
- User story 7: existing behavior preserved
- User story 8: no type-specific validators needed for new credential types
Parent PRD
#4079
What to build
Extract the
validatePolicyAssertionslogic fromX509CredentialValidatorand make it apply generically to any credential with a did:x509 issuer. This implements PSA 10.6.2 rule 9: identifier values incredentialSubjectthat originate from the issuer DID must match the corresponding attributes in the issuer DID.Verifyfunction (verifier.go), after signature verification succeeds for a credential with a did:x509 issuer, match credentialSubject identifiers against issuer DID attributescredentialSubjectJSON to find all objects withsystem/valuefields (identifier pattern per PSA 10.6.1)systemURI:http://fhir.nl/fhir/NamingSystem/ura→ URA from issuer DIDhttp://fhir.nl/fhir/NamingSystem/uzi-nr-pers→ UZI-nummer from issuer DIDroleCodeas a known special case (direct attribute, not an identifier object)validatePolicyAssertionsfromX509CredentialValidatorThis is independent of the CRL/resolver changes and can be worked on in parallel.
Acceptance criteria
credentialSubject.hasEnrollment.enrolledBy.identifier)validatePolicyAssertionsis removed fromX509CredentialValidatorBlocked by
None — can start immediately (independent of resolver/key resolution changes).
User stories addressed