From 3f20ab67039ca07e69a458e032ff2351b7673d0e Mon Sep 17 00:00:00 2001 From: Jim Marino Date: Sat, 10 Jun 2023 13:49:25 +0200 Subject: [PATCH] Add summary credential --- .../summary.vc.context.modified.v1.json | 26 ++++ .../summary/summary.vc.context.v1.json | 30 +++++ docs/credentials/summary/summary.vc.md | 118 ++++++++++++++++++ docs/credentials/tx.vc.guidelines.md | 4 +- 4 files changed, 176 insertions(+), 2 deletions(-) create mode 100644 docs/credentials/summary/summary.vc.context.modified.v1.json create mode 100644 docs/credentials/summary/summary.vc.context.v1.json create mode 100644 docs/credentials/summary/summary.vc.md diff --git a/docs/credentials/summary/summary.vc.context.modified.v1.json b/docs/credentials/summary/summary.vc.context.modified.v1.json new file mode 100644 index 0000000..2c6fc5b --- /dev/null +++ b/docs/credentials/summary/summary.vc.context.modified.v1.json @@ -0,0 +1,26 @@ +{ + "@context": { + "@version": 1.1, + "@protected": true, + "summary": "https://w3id.org/2023/tractusx/credentials/summary/", + "id": "@id", + "type": "@type", + "SummaryCredential": { + "@context": [ + "https://www.w3.org/2018/credentials/v1" + ], + "@id": "summary:SummaryCredential" + }, + "holderIdentifier": { + "@id": "summary:holderIdentifier" + }, + "hasCredentials": { + "@id": "summary:hasCredentials", + "@type": "https://schema.org/Text" + }, + "contractTemplate": { + "@id": "summary:contractTemplate", + "@type": "@id" + } + } +} diff --git a/docs/credentials/summary/summary.vc.context.v1.json b/docs/credentials/summary/summary.vc.context.v1.json new file mode 100644 index 0000000..bb0eaa4 --- /dev/null +++ b/docs/credentials/summary/summary.vc.context.v1.json @@ -0,0 +1,30 @@ +{ + "@context": { + "@version": 1.1, + "@protected": true, + "summary": "https://w3id.org/2023/tractusx/credentials/summary/", + "id": "@id", + "type": "@type", + "SummaryCredential": { + "@context": [ + "https://www.w3.org/2018/credentials/v1" + ], + "@id": "summary:SummaryCredential" + }, + "holderIdentifier": { + "@id": "summary:holderIdentifier" + }, + "name": { + "@id": "summary:name", + "@type": "https://schema.org/Text" + }, + "items": { + "@id": "summary:items", + "@type": "https://schema.org/Text" + }, + "contract-template": { + "@id": "summary:contract-template", + "@type": "https://schema.org/Text" + } + } +} diff --git a/docs/credentials/summary/summary.vc.md b/docs/credentials/summary/summary.vc.md new file mode 100644 index 0000000..d22dce7 --- /dev/null +++ b/docs/credentials/summary/summary.vc.md @@ -0,0 +1,118 @@ +# 1. Introduction: The Summary VC + +The Summary VC (S-VC) is a temporary credential designed to roll-up a number of other Tractus-X VCs into a compact form +that will fit within HTTP header limits. This document specifies the Summary VC schema. + +The following is an example Summary VC: + +```json + { + "@context": [ + "https://w3id.org/2023/tractusx/credentials/summary/v1" + ], + "id": "", + "type": [ + "VerifiableCredential", + "SummaryCredential" + ], + "issuer": "", + "issuanceDate": "2023-06-02T12:00:00Z", + "expirationDate": "2022-06-16T18:56:59Z", + "credentialSubject": { + "id": "", + "holderIdentifier": "", + "type": "Summary-List", + "name": "CX-Credentials", + "items": [ + "cx-active-member", + "cx-dismantler", + "cx-pcf", + "cx-sustainability", + "cx-quality", + "cx-traceability", + "cx-behavior-twin", + "cx-bpn" + ], + "contract-templates": "https://public.catena-x.org/contracts/" + } +} +``` + +A Json-Ld context defining Summary VC terms is [here](./summary.vc.context.v1.json) + +# 2. Verifiable Credential Properties + +## 2.1. Credential Subject and Credential Holder + +The credential subject and credential holder must be the same as described by +the [Verifiable Credentials Data Model v1.1](https://www.w3.org/TR/vc-data-model/#subject-is-the-holder). + +- The mandatory `id` property of the `credentialSubject` object must be set to the subject's DID (`did:web`). +- The mandatory `holderIdentifier` property of the `credentialSubject` object must be set to the subject's BPN. + +## 2.2 Summary Items + +The mandatory `items` property defined by the `https://w3id.org/2023/tractusx/credentials/summary/v1` context contains a +set of string identifiers indicating the credential types held by the subject. + +Valid items are: + +- cx-active-member +- cx-dismantler +- cx-pcf +- cx-sustainability +- cx-quality +- cx-traceability +- cx-behavior-twin +- cx-bpn + +## 2.3 Mandatory Properties + +If mandatory properties are not present, the VC should be interpreted as invalid. + +# 3. Issues + +The following are outstanding questions and issues that need to be resolved. There is +a [proposed context](./summary.vc.context.modified.v1.json) that resolves these issues. + +## 3.1. Clear Properties + +- What are `credentialSubject#type` and `credentialSubject#name` used for? + +## 3.2 Consistent Naming + +- The `credentialSubject#items` property is too ambiguous and should be something + like `credentialSubject#hasCredentials` +- The `credentialSubject#contract-template` property uses hyphens and should be consistent with W3C camelCase +- The `credentialSubject#items-template` property uses hyphens and should be consistent with W3C camelCase + +## 3.3 Referencing Credential Types + +Credentials referenced in the [Summary Items property](#22-summary-items) should correspond to credential types, not +hyphenated strings, e.g.`DismantlerCredential` instead of `cx-dismantler`. Note that actual types will not be used as +that would require term definitions in the VC context. + +The proposed valid property values are: + +- MembershipCredential +- DismantlerCredential +- PcfCredential +- SustainabilityCredential +- QualityCredential +- TraceabilityCredential +- BehaviorTwinCredential +- BpnCredential + +## 3.4 Use of IRIs + +The `credentialSubject#contract-template` property should be an IRI instead of text. There it should be defined as +type `@id`: + +```json +{ + "contractTemplate": { + "@id": "summary:contractTemplate", + "@type": "@id" + } +} +``` diff --git a/docs/credentials/tx.vc.guidelines.md b/docs/credentials/tx.vc.guidelines.md index 2c13567..ce94e14 100644 --- a/docs/credentials/tx.vc.guidelines.md +++ b/docs/credentials/tx.vc.guidelines.md @@ -25,7 +25,7 @@ All TX verifiable credentials must conform to the [Verifiable Credentials Data Model v1.1](https://www.w3.org/TR/vc-data-model/). > Note that the URL scheme adopted by this specification is the one in use by the W3C, which supports the ability to -version context definitions. +> version context definitions. ## 3.1. The Master VC Context @@ -35,7 +35,7 @@ context should be referenced as: `https://w3id.org/tractusx/2023/credentials/v1.0.0` -## 3.2. Indidual VC Contexts +## 3.2. Individual VC Contexts Individual VC contexts define terms specific to the VC and should be referenced using a URL similar to the following: