Skip to content

Commit

Permalink
fix(ssi): adjust schemas (eclipse-tractusx#72)
Browse files Browse the repository at this point in the history
  • Loading branch information
Phil91 authored Apr 23, 2024
1 parent 9e32358 commit ba63179
Show file tree
Hide file tree
Showing 9 changed files with 116 additions and 74 deletions.
2 changes: 1 addition & 1 deletion consortia/environments/values-beta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ ingress:
issuer:
swaggerEnabled: true
credential:
issuerDid: "did:web:dim-static-prod.dis-cloud-prod.cfapps.eu10-004.hana.ondemand.com:dim-hosted:2f45795c-d6cc-4038-96c9-63cedc0cd266"
issuerDid: "did:web:dim-static-prod.dis-cloud-prod.cfapps.eu10-004.hana.ondemand.com:dim-hosted:2f45795c-d6cc-4038-96c9-63cedc0cd266:holder-iatp"
issuerBpn: "BPNL00000003CRHK"
statusListUrl: "https://dim-static-prod.dis-cloud-prod.cfapps.eu10-004.hana.ondemand.com/credentials/status/c5f1d9bb-42d5-42b7-a80a-ccbda6891df3/3e6f1f74-56e3-443a-a75e-320c301aca07"
encryptionConfigs:
Expand Down
2 changes: 1 addition & 1 deletion consortia/environments/values-dev.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ issuer:
imagePullPolicy: "Always"
swaggerEnabled: true
credential:
issuerDid: "did:web:dim-static-prod.dis-cloud-prod.cfapps.eu10-004.hana.ondemand.com:dim-hosted:2f45795c-d6cc-4038-96c9-63cedc0cd266"
issuerDid: "did:web:dim-static-prod.dis-cloud-prod.cfapps.eu10-004.hana.ondemand.com:dim-hosted:2f45795c-d6cc-4038-96c9-63cedc0cd266:holder-iatp"
issuerBpn: "BPNL00000003CRHK"
statusListUrl: "https://dim-static-prod.dis-cloud-prod.cfapps.eu10-004.hana.ondemand.com/credentials/status/c5f1d9bb-42d5-42b7-a80a-ccbda6891df3/3e6f1f74-56e3-443a-a75e-320c301aca07"
encryptionConfigs:
Expand Down
2 changes: 1 addition & 1 deletion consortia/environments/values-int.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ ingress:
issuer:
swaggerEnabled: true
credential:
issuerDid: "did:web:dim-static-prod.dis-cloud-prod.cfapps.eu10-004.hana.ondemand.com:dim-hosted:2f45795c-d6cc-4038-96c9-63cedc0cd266"
issuerDid: "did:web:dim-static-prod.dis-cloud-prod.cfapps.eu10-004.hana.ondemand.com:dim-hosted:2f45795c-d6cc-4038-96c9-63cedc0cd266:holder-iatp"
issuerBpn: "BPNL00000003CRHK"
statusListUrl: "https://dim-static-prod.dis-cloud-prod.cfapps.eu10-004.hana.ondemand.com/credentials/status/c5f1d9bb-42d5-42b7-a80a-ccbda6891df3/3e6f1f74-56e3-443a-a75e-320c301aca07"
encryptionConfigs:
Expand Down
2 changes: 1 addition & 1 deletion consortia/environments/values-pen.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ ingress:
issuer:
swaggerEnabled: true
credential:
issuerDid: "did:web:dim-static-prod.dis-cloud-prod.cfapps.eu10-004.hana.ondemand.com:dim-hosted:2f45795c-d6cc-4038-96c9-63cedc0cd266"
issuerDid: "did:web:dim-static-prod.dis-cloud-prod.cfapps.eu10-004.hana.ondemand.com:dim-hosted:2f45795c-d6cc-4038-96c9-63cedc0cd266:holder-iatp"
issuerBpn: "BPNL00000003CRHK"
statusListUrl: "https://dim-static-prod.dis-cloud-prod.cfapps.eu10-004.hana.ondemand.com/credentials/status/c5f1d9bb-42d5-42b7-a80a-ccbda6891df3/3e6f1f74-56e3-443a-a75e-320c301aca07"
encryptionConfigs:
Expand Down
2 changes: 1 addition & 1 deletion consortia/environments/values-rc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ issuer:
imagePullPolicy: "Always"
swaggerEnabled: true
credential:
issuerDid: "did:web:dim-static-prod.dis-cloud-prod.cfapps.eu10-004.hana.ondemand.com:dim-hosted:2f45795c-d6cc-4038-96c9-63cedc0cd266"
issuerDid: "did:web:dim-static-prod.dis-cloud-prod.cfapps.eu10-004.hana.ondemand.com:dim-hosted:2f45795c-d6cc-4038-96c9-63cedc0cd266:holder-iatp"
issuerBpn: "BPNL00000003CRHK"
statusListUrl: "https://dim-static-prod.dis-cloud-prod.cfapps.eu10-004.hana.ondemand.com/credentials/status/c5f1d9bb-42d5-42b7-a80a-ccbda6891df3/3e6f1f74-56e3-443a-a75e-320c301aca07"
encryptionConfigs:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,54 +6,64 @@
"id": {
"type": "string"
},
"@context": {
"type": {
"type": "array",
"items": {
"type": "string"
},
"const": [
"https://www.w3.org/2018/credentials/v1",
"https://w3id.org/catenax/credentials/v1.0.0"
]
}
},
"type": {
"issuer": {
"type": "string"
},
"@context": {
"type": "array",
"items": {
"type": "string",
"enum": [
"VerifiableCredential",
"BpnCredential"
]
"type": "string"
}
},
},
"issuanceDate": {
"type": "string",
"pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(.\\d{6})?(Z|\\+\\d{2}:\\d{2})?$"
"format": "date-time"
},
"expirationDate": {
"type": "string",
"pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(.\\d{6})?(Z|\\+\\d{2}:\\d{2})?$"
"format": "date-time"
},
"issuer": {
"type": "string"
"credentialStatus": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"type": {
"type": "string"
},
"statusPurpose": {
"type": "string"
},
"statusListIndex": {
"type": "string"
},
"statusListCredential": {
"type": "string"
}
}
},
"credentialSubject": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"holderIdentifier": {
"bpn": {
"type": "string"
},
"bpn": {
"holderIndentifier": {
"type": "string"
}
},
"required": ["id", "holderIdentifier", "bpn"],
"additionalProperties": false
"required": ["id", "bpn", "holderIndentifier"]
}
},
"required": ["id", "@context", "type", "issuanceDate", "expirationDate", "issuer", "credentialSubject"],
"additionalProperties": true
"required": ["id", "@context", "type", "issuanceDate", "expirationDate", "issuer", "credentialSubject"]
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,32 +6,48 @@
"id": {
"type": "string"
},
"@context": {
"type": {
"type": "array",
"items": {
"type": "string"
},
"const": [
"https://www.w3.org/2018/credentials/v1",
"https://w3id.org/catenax/credentials/v1.0.0"
]
}
},
"type": {
"issuer": {
"type": "string"
},
"@context": {
"type": "array",
"items": {
"type": "string"
}
},
"issuanceDate": {
"type": "string",
"pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(.\\d{6})?(Z|\\+\\d{2}:\\d{2})?$"
"format": "date-time"
},
"expirationDate": {
"type": "string",
"pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(.\\d{6})?(Z|\\+\\d{2}:\\d{2})?$"
"format": "date-time"
},
"issuer": {
"type": "string"
"credentialStatus": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"type": {
"type": "string"
},
"statusPurpose": {
"type": "string"
},
"statusListIndex": {
"type": "string"
},
"statusListCredential": {
"type": "string"
}
}
},
"credentialSubject": {
"type": "object",
Expand All @@ -56,10 +72,8 @@
"type": "string"
}
},
"required": ["id", "holderIdentifier", "group", "useCase", "contractTemplate", "contractVersion"],
"additionalProperties": false
"required": ["id", "holderIdentifier", "group", "useCase", "contractTemplate", "contractVersion"]
}
},
"required": ["id", "@context", "type", "issuanceDate", "expirationDate", "issuer", "credentialSubject"],
"additionalProperties": true
"required": ["id", "@context", "type", "issuanceDate", "expirationDate", "issuer", "credentialSubject"]
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,39 +3,52 @@
"$id": "https://eclipse-tractusx.github.io/MembershipCredential.schema.json",
"type": "object",
"properties": {

"id": {
"type": "string"
},
"@context": {
"type": {
"type": "array",
"items": {
"type": "string"
},
"const": [
"https://www.w3.org/2018/credentials/v1",
"https://w3id.org/catenax/credentials/v1.0.0"
]
}
},
"type": {
"issuer": {
"type": "string"
},
"@context": {
"type": "array",
"items": {
"type": "string",
"enum": [
"VerifiableCredential",
"MembershipCredential"
]
"type": "string"
}
},
"issuanceDate": {
"type": "string",
"pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(.\\d{6})?(Z|\\+\\d{2}:\\d{2})?$"
"format": "date-time"
},
"expirationDate": {
"type": "string",
"pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(.\\d{6})?(Z|\\+\\d{2}:\\d{2})?$"
"format": "date-time"
},
"issuer": {
"type": "string"
"credentialStatus": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"type": {
"type": "string"
},
"statusPurpose": {
"type": "string"
},
"statusListIndex": {
"type": "string"
},
"statusListCredential": {
"type": "string"
}
}
},
"credentialSubject": {
"type": "object",
Expand All @@ -50,10 +63,8 @@
"type": "string"
}
},
"required": ["id", "holderIdentifier", "memberOf"],
"additionalProperties": false
"required": ["id", "holderIdentifier", "memberOf"]
}
},
"required": ["id", "@context", "type", "issuanceDate", "expirationDate", "issuer", "credentialSubject"],
"additionalProperties": true
"required": ["id", "@context", "type", "issuanceDate", "expirationDate", "issuer", "credentialSubject"]
}
Original file line number Diff line number Diff line change
Expand Up @@ -166,22 +166,29 @@ public async Task GetCredential_CallsExpected()
// Arrange
const string data = """
{
"id": "2e70ee49-5fae-438a-9435-0cce3854650d",
"@context": [
"https://www.w3.org/2018/credentials/v1",
"https://w3id.org/catenax/credentials/v1.0.0"
],
"id": "f2ee21e938e217f362d3e7edac9e59a2b17d34017ef0f842e1f48513",
"type": [
"VerifiableCredential",
"BpnCredential"
],
"issuanceDate": "2022-06-16T18:56:59Z",
"expirationDate": "2022-06-16T18:56:59Z",
"issuer": "2e70ee49-5fae-438a-9435-0cce3854650d",
"issuer": "did:web:example.org:dim-hosted:2f45795c-d6cc-4038-96c9-63cedc0cd266:holder-iatp",
"@context": [
"https://www.w3.org/2018/credentials/v1",
"https://w3id.org/catenax/credentials/v1.0.0"
],
"issuanceDate": "2024-04-22T17:02:33.568629+00:00",
"expirationDate": "2025-04-22T17:02:33.568629+00:00",
"credentialStatus": {
"id": "https://example.org/credentials/status/c5f1d9bb-42d5-42b7-a80a-ccbda6891df3/3e6f1f74-56e3-443a-a75e-320c301aca07#10",
"type": "StatusList2021Entry",
"statusPurpose": "revocation",
"statusListIndex": "10",
"statusListCredential": "https://example.org/credentials/status/c5f1d9bb-42d5-42b7-a80a-ccbda6891df3/3e6f1f74-56e3-443a-a75e-320c301aca07"
},
"credentialSubject": {
"id": "2e70ee49-5fae-438a-9435-0cce3854650d",
"holderIdentifier": "2e70ee49-5fae-438a-9435-0cce3854650d",
"bpn": "2e70ee49-5fae-438a-9435-0cce3854650d"
"id": "did:web:example.org:api:administration:staticdata:did:BPNL000001PS0000",
"bpn": "BPNL000001PS0000",
"holderIndentifier": "BPNL000001PS0000"
}
}
""";
Expand Down

0 comments on commit ba63179

Please sign in to comment.