Skip to content
This repository has been archived by the owner on Mar 12, 2024. It is now read-only.

Commit

Permalink
Merge pull request #5 from Metaform/doc/summary-vc
Browse files Browse the repository at this point in the history
  • Loading branch information
paullatzelsperger authored Jun 11, 2023
2 parents c44e940 + 3f20ab6 commit d30b883
Show file tree
Hide file tree
Showing 4 changed files with 176 additions and 2 deletions.
26 changes: 26 additions & 0 deletions docs/credentials/summary/summary.vc.context.modified.v1.json
Original file line number Diff line number Diff line change
@@ -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"
}
}
}
30 changes: 30 additions & 0 deletions docs/credentials/summary/summary.vc.context.v1.json
Original file line number Diff line number Diff line change
@@ -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"
}
}
}
118 changes: 118 additions & 0 deletions docs/credentials/summary/summary.vc.md
Original file line number Diff line number Diff line change
@@ -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": "<credential uid>",
"type": [
"VerifiableCredential",
"SummaryCredential"
],
"issuer": "<did:web:issuer>",
"issuanceDate": "2023-06-02T12:00:00Z",
"expirationDate": "2022-06-16T18:56:59Z",
"credentialSubject": {
"id": "<did:web:subject>",
"holderIdentifier": "<BPN>",
"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"
}
}
```
4 changes: 2 additions & 2 deletions docs/credentials/tx.vc.guidelines.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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:

Expand Down

0 comments on commit d30b883

Please sign in to comment.