uncefact / spec-untp

UN Transparency Protocol
https://uncefact.github.io/spec-untp/
GNU General Public License v3.0
10 stars 9 forks source link

CC schema/example update proposal #112

Closed PatStLouis closed 1 week ago

PatStLouis commented 2 weeks ago

Addresses issues:

100 #91 #47

Changes:

I will keep this PR scoped to this, most of it addresses the alignment with the core data model and some of it addresses some conceptual changes.

Looking for comments and feedback here please! Most of these changes came from our exploration with the MinesActPermit and the TenureTitle ConformityCredentials over at BC Gov.

PatStLouis commented 1 week ago

@onthebreeze the biggest change that I would ask more input on is moving the ConformityAttestation within a hasAttestation property of the credentialSubject , the subject becoming the issuedTo party. It's common for the credentialSubject.id to represent an identifier (often a did) which will make further statements or include this credential in a presentation. When reading from the DPP perspective, this would say

here's a ConformityCredential depicting a ConformityAttestation that was issued to me by this issuer, showing various ConformityAssessment made about this product/facility

Looking at the VCDM definition of the credentialSubject:

The value of the credentialSubject property is defined as a set of objects where each object MUST be the subject of one or more claims, which MUST be serialized inside the credentialSubject property. Each object MAY also contain an id to identify the subject, as described in Section 4.3 Identifiers.

Claims about the subject in this case would be things like legalName, identifier, url, image, description (or any other property defined by a Party in the UNTP spec) and most importantly hasAttestation which would contain the ConformityAttestation object as defined in the UNTP specification.

What is the most critical IMO is that the ConformityAttestation object remains intact according to this specification. The ConformityCredential says party A (issuer.id) claims party B (credentialSubject.id) has this ConformityAttestation containing these ConformityAssessment.

In other words, the credentialSubject.id of the ConformityCredential SHOULD match the issuer.id of the DigitalProductPassport. Note that the credentialSubject.id doesn't need to be a did, but it must be a URL. This URL (regardless if its a did or any other form) SHOULD map to a claim in an AnchoringIdentityCredential.

zachzeus commented 1 week ago

Principle: If VCDM field that serves same purpose - then we should not have a duplicated value in the schema. Is the intent of the conformity credential the same as the VCDM then don't overload the VCDM - put it inside the credential and call it something else. NOTE: We should put this in the governance section.