diff --git a/consortia/environments/values-beta.yaml b/consortia/environments/values-beta.yaml index dbded838..435aae17 100644 --- a/consortia/environments/values-beta.yaml +++ b/consortia/environments/values-beta.yaml @@ -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: diff --git a/consortia/environments/values-dev.yaml b/consortia/environments/values-dev.yaml index 64bd93ba..a9cfa18c 100644 --- a/consortia/environments/values-dev.yaml +++ b/consortia/environments/values-dev.yaml @@ -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: diff --git a/consortia/environments/values-int.yaml b/consortia/environments/values-int.yaml index f2c6f9b1..81c0a05b 100644 --- a/consortia/environments/values-int.yaml +++ b/consortia/environments/values-int.yaml @@ -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: diff --git a/consortia/environments/values-pen.yaml b/consortia/environments/values-pen.yaml index d0b08dd8..7a536dfe 100644 --- a/consortia/environments/values-pen.yaml +++ b/consortia/environments/values-pen.yaml @@ -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: diff --git a/consortia/environments/values-rc.yaml b/consortia/environments/values-rc.yaml index 954bd2eb..4c17ffc1 100644 --- a/consortia/environments/values-rc.yaml +++ b/consortia/environments/values-rc.yaml @@ -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: diff --git a/src/externalservices/Wallet.Service/Schemas/BPNCredential.schema.json b/src/externalservices/Wallet.Service/Schemas/BPNCredential.schema.json index f7fd53c7..ba43ad65 100644 --- a/src/externalservices/Wallet.Service/Schemas/BPNCredential.schema.json +++ b/src/externalservices/Wallet.Service/Schemas/BPNCredential.schema.json @@ -6,36 +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", - "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", @@ -43,17 +55,15 @@ "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"] } diff --git a/src/externalservices/Wallet.Service/Schemas/FRAMEWORKCredential.schema.json b/src/externalservices/Wallet.Service/Schemas/FRAMEWORKCredential.schema.json index 915bc138..024ebff5 100644 --- a/src/externalservices/Wallet.Service/Schemas/FRAMEWORKCredential.schema.json +++ b/src/externalservices/Wallet.Service/Schemas/FRAMEWORKCredential.schema.json @@ -6,17 +6,16 @@ "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" @@ -24,14 +23,31 @@ }, "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", @@ -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"] } diff --git a/src/externalservices/Wallet.Service/Schemas/MEMBERSHIPCredential.schema.json b/src/externalservices/Wallet.Service/Schemas/MEMBERSHIPCredential.schema.json index 18091e88..1e453e87 100644 --- a/src/externalservices/Wallet.Service/Schemas/MEMBERSHIPCredential.schema.json +++ b/src/externalservices/Wallet.Service/Schemas/MEMBERSHIPCredential.schema.json @@ -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", @@ -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"] } diff --git a/tests/externalservices/Wallet.Service.Tests/BusinessLogic/WalletBusinessLogicTests.cs b/tests/externalservices/Wallet.Service.Tests/BusinessLogic/WalletBusinessLogicTests.cs index 4c4aa337..1ed9d7db 100644 --- a/tests/externalservices/Wallet.Service.Tests/BusinessLogic/WalletBusinessLogicTests.cs +++ b/tests/externalservices/Wallet.Service.Tests/BusinessLogic/WalletBusinessLogicTests.cs @@ -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" } } """;