Skip to content

Commit

Permalink
doc: Initial commit of spec and schema files (#2)
Browse files Browse the repository at this point in the history
  • Loading branch information
jimmarino authored Jan 24, 2024
1 parent a7879c5 commit 33406ab
Show file tree
Hide file tree
Showing 66 changed files with 924 additions and 1 deletion.
20 changes: 20 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
*.log
# Package Files #
*.jar
*.war
*.nar
*.ear
*.zip
*.tar.gz
*.rar

.idea
*.iml
.vs
.vscode

/secrets
**/secrets

.DS_Store
.env
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
# tractusx-profiles
# tx-profiles

Defines Credential and Policy Profiles for Tractus-X. Currently,
The [Catena-X Credential and Policy Profile](./cx/README.md) is defined.
7 changes: 7 additions & 0 deletions cx/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Catena-X Credential and Policy Profile

Defines mandatory `Verifiable Credentials` and `Policies` required for Catena-X interoperability:

- **Credentials** are defined [here](./credentials).

- **Policies** are defined [here](./policy).
20 changes: 20 additions & 0 deletions cx/credentials/samples/behavioral.twin.credential.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"@context": [
"https://www.w3.org/2018/credentials/v1",
"https://w3id.org/catenax/credentials/v1.0.0"
],
"id": "1f36af58-0fc0-4b24-9b1c-e37d59668089",
"type": [
"VerifiableCredential",
"BehavioralTwinCredential"
],
"issuer": "did:web:com.example.issuer",
"issuanceDate": "2024-01-01T19:23:24Z",
"expirationDate": "2026-01-01T19:23:24Z",
"credentialSubject": {
"id": "did:web:com.example.participant",
"holderIdentifier": "BPNL000000001",
"contractTemplate": "https://public.catena-x.org/contracts/behavior_twin.v1.pdf",
"contractVersion": "1.0.0"
}
}
18 changes: 18 additions & 0 deletions cx/credentials/samples/bpn.credential.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"@context": [
"https://www.w3.org/2018/credentials/v1",
"https://w3id.org/catenax/credentials/v1.0.0"
],
"id": "1f36af58-0fc0-4b24-9b1c-e37d59668089",
"type": [
"VerifiableCredential",
"BpnCredential"
],
"issuer": "did:web:com.example.issuer",
"issuanceDate": "2021-06-16T18:56:59Z",
"expirationDate": "2022-06-16T18:56:59Z",
"credentialSubject": {
"id": "did:web:com.example.participant",
"bpn": "BPNL000000001"
}
}
24 changes: 24 additions & 0 deletions cx/credentials/samples/dismantler.credential.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{
"@context": [
"https://www.w3.org/2018/credentials/v1",
"https://w3id.org/catenax/credentials/v1.0.0"
],
"id": "1f36af58-0fc0-4b24-9b1c-e37d59668089",
"type": [
"VerifiableCredential",
"DismantlerCredential"
],
"issuer": "did:web:com.example.issuer",
"issuanceDate": "2021-06-16T18:56:59Z",
"expirationDate": "2022-06-16T18:56:59Z",
"credentialSubject": {
"id": "did:web:com.example.participant",
"holderIdentifier": "BPNL000000001",
"activityType": "vehicleDismantle",
"allowedVehicleBrands": [
"Alfa Romeo",
"Alpina",
"BMW"
]
}
}
18 changes: 18 additions & 0 deletions cx/credentials/samples/membership.credential.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"@context": [
"https://www.w3.org/2018/credentials/v1",
"https://w3id.org/catenax/credentials/v1.0.0"
],
"id": "1f36af58-0fc0-4b24-9b1c-e37d59668089",
"type": [
"VerifiableCredential",
"MembershipCredential"
],
"issuer": "did:web:com.example.issuer",
"issuanceDate": "2021-06-16T18:56:59Z",
"expirationDate": "2022-06-16T18:56:59Z",
"credentialSubject": {
"id": "did:web:com.example.participant",
"holderIdentifier": "BPNL000000001"
}
}
20 changes: 20 additions & 0 deletions cx/credentials/samples/pcf.credential.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"@context": [
"https://www.w3.org/2018/credentials/v1",
"https://w3id.org/catenax/credentials/v1.0.0"
],
"id": "1f36af58-0fc0-4b24-9b1c-e37d59668089",
"type": [
"VerifiableCredential",
"PcfCredential"
],
"issuer": "did:web:com.example.issuer",
"issuanceDate": "2021-06-16T18:56:59Z",
"expirationDate": "2022-06-16T18:56:59Z",
"credentialSubject": {
"id": "did:web:com.example.participant",
"holderIdentifier": "BPNL000000001",
"contractTemplate": "https://public.catena-x.org/contracts/pcf.v1.pdf",
"contractVersion": "1.0.0"
}
}
20 changes: 20 additions & 0 deletions cx/credentials/samples/quality.credential.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"@context": [
"https://www.w3.org/2018/credentials/v1",
"https://w3id.org/catenax/credentials/v1.0.0"
],
"id": "1f36af58-0fc0-4b24-9b1c-e37d59668089",
"type": [
"VerifiableCredential",
"QualityCredential"
],
"issuer": "did:web:com.example.issuer",
"issuanceDate": "2021-06-16T18:56:59Z",
"expirationDate": "2022-06-16T18:56:59Z",
"credentialSubject": {
"id": "did:web:com.example.participant",
"holderIdentifier": "BPNL000000001",
"contractTemplate": "https://public.catena-x.org/contracts/quality.v1.pdf",
"contractVersion": "1.0.0"
}
}
20 changes: 20 additions & 0 deletions cx/credentials/samples/resiliency.credential.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"@context": [
"https://www.w3.org/2018/credentials/v1",
"https://w3id.org/catenax/credentials/v1.0.0"
],
"id": "1f36af58-0fc0-4b24-9b1c-e37d59668089",
"type": [
"VerifiableCredential",
"ResiliencyCredential"
],
"issuer": "did:web:com.example.issuer",
"issuanceDate": "2021-06-16T18:56:59Z",
"expirationDate": "2022-06-16T18:56:59Z",
"credentialSubject": {
"id": "did:web:com.example.participant",
"holderIdentifier": "BPNL000000001",
"contractTemplate": "https://public.catena-x.org/contracts/resiliency.v1.pdf",
"contractVersion": "1.0.0"
}
}
21 changes: 21 additions & 0 deletions cx/credentials/samples/sustainability.credential.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"@context": [
"https://www.w3.org/2018/credentials/v1",
"https://w3id.org/catenax/credentials/v1.0.0"
],
"id": "1f36af58-0fc0-4b24-9b1c-e37d59668089",
"type": [
"VerifiableCredential",
"SustainabilityCredential"
],
"issuer": "did:web:com.example.issuer",
"issuanceDate": "2021-06-16T18:56:59Z",
"expirationDate": "2022-06-16T18:56:59Z",
"credentialSubject": {
"id": "did:web:com.example.participant",
"holderIdentifier": "BPNL000000001",
"contractTemplate": "https://public.catena-x.org/contracts/sustainability.v1.pdf",
"contractVersion": "1.0.0"
}
}

20 changes: 20 additions & 0 deletions cx/credentials/samples/traceability.credential.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"@context": [
"https://www.w3.org/2018/credentials/v1",
"https://w3id.org/catenax/credentials/v1.0.0"
],
"id": "1f36af58-0fc0-4b24-9b1c-e37d59668089",
"type": [
"VerifiableCredential",
"TraceabilityCredential"
],
"issuer": "did:web:com.example.issuer",
"issuanceDate": "2021-06-16T18:56:59Z",
"expirationDate": "2022-06-16T18:56:59Z",
"credentialSubject": {
"id": "did:web:com.example.participant",
"holderIdentifier": "BPNL000000001",
"contractTemplate": "https://public.catena-x.org/contracts/traceability.v1.pdf",
"contractVersion": "1.0.0"
}
}
58 changes: 58 additions & 0 deletions cx/credentials/schema/context/credentials.context.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
{
"@version": 1.1,
"@protected": true,
"cred": "https://www.w3.org/2018/credentials#",
"xsd": "http://www.w3.org/2001/XMLSchema#",
"cx-credentials": "https://w3id.org/catenax/credentials/",
"BehavioralTwinCredential": {
"@id": "cx-credentials:BehavioralTwinCredential"
},
"BpnCredential": {
"@id": "cx-credentials:BpnCredential"
},
"DismantlerCredential": {
"@id": "cx-credentials:DismantlerCredential"
},
"MembershipCredential": {
"@id": "cx-credentials:MembershipCredential"
},
"PcfCredential": {
"@id": "cx-credentials:PcfCredential"
},
"ResiliencyCredential": {
"@id": "cx-credentials:ResiliencyCredential"
},
"QualityCredential": {
"@id": "cx-credentials:QualityCredential"
},
"SustainabilityCredential": {
"@id": "cx-credentials:SustainabilityCredential"
},
"TraceabilityCredential": {
"@id": "cx-credentials:TraceabilityCredential"
},
"activityType": {
"@id": "cx-credentials:activityType",
"@type": "xsd:string"
},
"allowedVehicleBrands": {
"@id": "cx-credentials:allowedVehicleBrands",
"@container": "@set"
},
"bpn": {
"@id": "cx-credentials:bpn",
"@type": "xsd:string"
},
"contractTemplate": {
"@id": "cx-credentials:contractTemplate",
"@type": "@id"
},
"contractVersion": {
"@id": "cx-credentials:contractVersion",
"@type": "@id"
},
"holderIdentifier": {
"@id": "cx-credentials:holderIdentifier",
"@type": "xsd:string"
}
}
18 changes: 18 additions & 0 deletions cx/credentials/schema/context/namespace.context.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"@version": 1.1,
"@protected": true,
"cred": "https://www.w3.org/2018/credentials#",
"xsd": "http://www.w3.org/2001/XMLSchema#",
"cx": "https://w3id.org/catenax/ns/" ,

"Dismantler": "cx:Dismantler",
"Dismantler.activityType": "cx:Dismantler.activityType",
"Dismantler.allowedBrands": "cx:Dismantler.allowedBrands",
"Membership": "cx:Membership",
"FrameworkAgreement.behavioraltwin": "cx:FrameworkAgreement.behavioraltwin",
"FrameworkAgreement.pcf": "cx:FrameworkAgreement.pcf" ,
"FrameworkAgreement.quality": "cx:FrameworkAgreement.quality",
"FrameworkAgreement.resiliency": "cx:FrameworkAgreement.resiliency",
"FrameworkAgreement.sustainability": "cx:FrameworkAgreement.sustainability",
"FrameworkAgreement.traceability": "cx:FrameworkAgreement.traceability"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"$id": "https://w3id.org/catenax/schemas/v1.0.0/behavioral.twin.credential.schema.json",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"title": "BehavioralTwinCredential",
"description": "Behavioral Twin Credential Schema",
"type": "object",
"properties": {
"credentialSubject": {
"$ref": "./framework.credential.subject.schema.json"
}
}
}
27 changes: 27 additions & 0 deletions cx/credentials/schema/credentials/bpn.credential.schema.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
{
"$id": "https://w3id.org/catenax/schemas/v1.0.0/bpn.credential.schema.json",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"title": "BpnCredential",
"description": "BPN Credential Schema",
"type": "object",
"properties": {
"credentialSubject": {
"type": "object",
"properties": {
"id": {
"description": "The Web DID of the holder",
"$ref": "./types.schema.json#/definitions/web-did"
},
"bpn": {
"description": "The Business Partner Number of the holder",
"type": "string"
}
},
"required": [
"id",
"bpn"
]
}
}
}

Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
{
"$id": "https://w3id.org/catenax/schemas/v1.0.0/dismantler.credential.schema.json",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"title": "BpnCredential",
"description": "Dismantler Credential Schema",
"type": "object",
"properties": {
"credentialSubject": {
"type": "object",
"properties": {
"id": {
"description": "The Web DID of the holder",
"$ref": "./types.schema.json#/definitions/web-did"
},
"holderIdentifier": {
"description": "The Business Partner Number of the holder",
"type": "string"
},
"activityType": {
"description": "The type of activity the dismantler is authorized for",
"type": "string"
},
"allowedVehicleBrands": {
"description": "The type of activity the dismantler is authorized for",
"type": "array",
"items": {
"type": "string"
}
}
},
"required": [
"id",
"holderIdentifier"
]
}
}
}

Loading

0 comments on commit 33406ab

Please sign in to comment.