From 546908b5e13ce4a0695fa5ade42a14a1abb88a2b Mon Sep 17 00:00:00 2001 From: Nitin Vavdiya Date: Mon, 9 Sep 2024 12:58:21 +0530 Subject: [PATCH] fix: status list changed to 2021 from bitstring --- miw/README.md | 62 +++++++++---------- .../config/RevocationSettings.java | 2 +- .../service/HoldersCredentialService.java | 4 +- .../service/IssuersCredentialService.java | 4 +- miw/src/main/resources/application.yaml | 2 +- .../utils/TestUtils.java | 2 +- .../src/main/resources/application.yaml | 2 +- 7 files changed, 39 insertions(+), 39 deletions(-) diff --git a/miw/README.md b/miw/README.md index 0ea651ac..d5a56ec1 100644 --- a/miw/README.md +++ b/miw/README.md @@ -287,37 +287,37 @@ This process ensures that any issues with the database schema are resolved by re # Environment Variables -| name | description | default value | -|-----------------------------------|----------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------| -| APPLICATION_PORT | port number of application | 8080 | -| APPLICATION_ENVIRONMENT | Environment of the application ie. local, dev, int and prod | local | -| DB_HOST | Database host | localhost | -| DB_PORT | Port of database | 5432 | -| DB_NAME | Database name | miw | -| USE_SSL | Whether SSL is enabled in database server | false | -| DB_USER_NAME | Database username | | -| DB_PASSWORD | Database password | | -| DB_POOL_SIZE | Max number of database connection acquired by application | 10 | -| KEYCLOAK_MIW_PUBLIC_CLIENT | Only needed if we want enable login with keyalock in swagger | miw_public | -| MANAGEMENT_PORT | Spring actuator port | 8090 | -| MIW_HOST_NAME | Application host name, this will be used in creation of did ie. did:web:MIW_HOST_NAME:BPN | localhost | -| ENCRYPTION_KEY | encryption key used to encrypt and decrypt private and public key of wallet | | -| AUTHORITY_WALLET_BPN | base wallet BPN number | BPNL000000000000 | -| AUTHORITY_WALLET_NAME | Base wallet name | Catena-X | -| AUTHORITY_WALLET_DID | Base wallet web did | web:did:host:BPNL000000000000 | -| VC_SCHEMA_LINK | Comma separated list of VC schema URL | https://www.w3.org/2018/credentials/v1, https://catenax-ng.github.io/product-core-schemas/businessPartnerData.json | -| VC_EXPIRY_DATE | Expiry date of VC (dd-MM-yyyy ie. 01-01-2025 expiry date will be 2024-12-31T18:30:00Z in VC) | 01-01-2025 | -| KEYCLOAK_REALM | Realm name of keycloak | miw_test | -| KEYCLOAK_CLIENT_ID | Keycloak private client id | | -| AUTH_SERVER_URL | Keycloak server url | | -| SUPPORTED_FRAMEWORK_VC_TYPES | Supported framework VC, provide values ie type1=value1,type2=value2 | cx-behavior-twin=Behavior Twin,cx-pcf=PCF,cx-quality=Quality,cx-resiliency=Resiliency,cx-sustainability=Sustainability,cx-traceability=ID_3.0_Trace | -| ENFORCE_HTTPS_IN_DID_RESOLUTION | Enforce https during web did resolution | true | -| CONTRACT_TEMPLATES_URL | Contract templates URL used in summary VC | https://public.catena-x.org/contracts/ | -| APP_LOG_LEVEL | Log level of application | INFO | -| AUTHORITY_SIGNING_SERVICE_TYPE | Base wallet signing type, Currency only LOCAL is supported | Local | -| LOCAL_SIGNING_KEY_STORAGE_TYPE | Key storage type, currently only DB is supported | DB | -| BITSTRING_STATUS_LIST_CONTEXT_URL | Context URI for bitstring status list | https://w3c.github.io/vc-bitstring-status-list/contexts/v1.jsonld | -| | | | +| name | description | default value | +|---------------------------------|----------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------| +| APPLICATION_PORT | port number of application | 8080 | +| APPLICATION_ENVIRONMENT | Environment of the application ie. local, dev, int and prod | local | +| DB_HOST | Database host | localhost | +| DB_PORT | Port of database | 5432 | +| DB_NAME | Database name | miw | +| USE_SSL | Whether SSL is enabled in database server | false | +| DB_USER_NAME | Database username | | +| DB_PASSWORD | Database password | | +| DB_POOL_SIZE | Max number of database connection acquired by application | 10 | +| KEYCLOAK_MIW_PUBLIC_CLIENT | Only needed if we want enable login with keyalock in swagger | miw_public | +| MANAGEMENT_PORT | Spring actuator port | 8090 | +| MIW_HOST_NAME | Application host name, this will be used in creation of did ie. did:web:MIW_HOST_NAME:BPN | localhost | +| ENCRYPTION_KEY | encryption key used to encrypt and decrypt private and public key of wallet | | +| AUTHORITY_WALLET_BPN | base wallet BPN number | BPNL000000000000 | +| AUTHORITY_WALLET_NAME | Base wallet name | Catena-X | +| AUTHORITY_WALLET_DID | Base wallet web did | web:did:host:BPNL000000000000 | +| VC_SCHEMA_LINK | Comma separated list of VC schema URL | https://www.w3.org/2018/credentials/v1, https://catenax-ng.github.io/product-core-schemas/businessPartnerData.json | +| VC_EXPIRY_DATE | Expiry date of VC (dd-MM-yyyy ie. 01-01-2025 expiry date will be 2024-12-31T18:30:00Z in VC) | 01-01-2025 | +| KEYCLOAK_REALM | Realm name of keycloak | miw_test | +| KEYCLOAK_CLIENT_ID | Keycloak private client id | | +| AUTH_SERVER_URL | Keycloak server url | | +| SUPPORTED_FRAMEWORK_VC_TYPES | Supported framework VC, provide values ie type1=value1,type2=value2 | cx-behavior-twin=Behavior Twin,cx-pcf=PCF,cx-quality=Quality,cx-resiliency=Resiliency,cx-sustainability=Sustainability,cx-traceability=ID_3.0_Trace | +| ENFORCE_HTTPS_IN_DID_RESOLUTION | Enforce https during web did resolution | true | +| CONTRACT_TEMPLATES_URL | Contract templates URL used in summary VC | https://public.catena-x.org/contracts/ | +| APP_LOG_LEVEL | Log level of application | INFO | +| AUTHORITY_SIGNING_SERVICE_TYPE | Base wallet signing type, Currency only LOCAL is supported | Local | +| LOCAL_SIGNING_KEY_STORAGE_TYPE | Key storage type, currently only DB is supported | DB | +| STATUS_LIST_2021_CONTEXT_URL | Context URI for status list 2021 | https://w3id.org/vc/status-list/2021/v1 | +| | | | # Technical Debts and Known issue diff --git a/miw/src/main/java/org/eclipse/tractusx/managedidentitywallets/config/RevocationSettings.java b/miw/src/main/java/org/eclipse/tractusx/managedidentitywallets/config/RevocationSettings.java index 43b2a3a1..78c418f1 100644 --- a/miw/src/main/java/org/eclipse/tractusx/managedidentitywallets/config/RevocationSettings.java +++ b/miw/src/main/java/org/eclipse/tractusx/managedidentitywallets/config/RevocationSettings.java @@ -26,5 +26,5 @@ import java.net.URI; @ConfigurationProperties(prefix = "miw.revocation") -public record RevocationSettings(URI url, URI bitStringStatusListContext) { +public record RevocationSettings(URI url, URI statusList2021Context) { } diff --git a/miw/src/main/java/org/eclipse/tractusx/managedidentitywallets/service/HoldersCredentialService.java b/miw/src/main/java/org/eclipse/tractusx/managedidentitywallets/service/HoldersCredentialService.java index db21186e..5de2569d 100644 --- a/miw/src/main/java/org/eclipse/tractusx/managedidentitywallets/service/HoldersCredentialService.java +++ b/miw/src/main/java/org/eclipse/tractusx/managedidentitywallets/service/HoldersCredentialService.java @@ -199,8 +199,8 @@ public CredentialsResponse issueCredential(Map data, String call //add revocation context if missing List uris = verifiableCredential.getContext(); - if (!uris.contains(revocationSettings.bitStringStatusListContext())) { - uris.add(revocationSettings.bitStringStatusListContext()); + if (!uris.contains(revocationSettings.statusList2021Context())) { + uris.add(revocationSettings.statusList2021Context()); builder.contexts(uris); } diff --git a/miw/src/main/java/org/eclipse/tractusx/managedidentitywallets/service/IssuersCredentialService.java b/miw/src/main/java/org/eclipse/tractusx/managedidentitywallets/service/IssuersCredentialService.java index fbdf58c6..6ed7a757 100644 --- a/miw/src/main/java/org/eclipse/tractusx/managedidentitywallets/service/IssuersCredentialService.java +++ b/miw/src/main/java/org/eclipse/tractusx/managedidentitywallets/service/IssuersCredentialService.java @@ -233,8 +233,8 @@ public CredentialsResponse issueCredentialUsingBaseWallet(String holderDid, Map< //add revocation context if missing List uris = miwSettings.vcContexts(); - if (!uris.contains(revocationSettings.bitStringStatusListContext())) { - uris.add(revocationSettings.bitStringStatusListContext()); + if (!uris.contains(revocationSettings.statusList2021Context())) { + uris.add(revocationSettings.statusList2021Context()); builder.contexts(uris); } diff --git a/miw/src/main/resources/application.yaml b/miw/src/main/resources/application.yaml index c40961bb..5f86542d 100644 --- a/miw/src/main/resources/application.yaml +++ b/miw/src/main/resources/application.yaml @@ -110,7 +110,7 @@ miw: refresh-token-url: ${miw.security.token-url} revocation: url: ${REVOCATION_SERVICE_URL:http://localhost:8081} - bitStringStatusListContext: ${BITSTRING_STATUS_LIST_CONTEXT_URL:https://w3c.github.io/vc-bitstring-status-list/contexts/v1.jsonld} + statusList2021Context: ${STATUS_LIST_2021_CONTEXT_URL:https://w3id.org/vc/status-list/2021/v1} sts: diff --git a/miw/src/test/java/org/eclipse/tractusx/managedidentitywallets/utils/TestUtils.java b/miw/src/test/java/org/eclipse/tractusx/managedidentitywallets/utils/TestUtils.java index 7e9e6289..39003371 100644 --- a/miw/src/test/java/org/eclipse/tractusx/managedidentitywallets/utils/TestUtils.java +++ b/miw/src/test/java/org/eclipse/tractusx/managedidentitywallets/utils/TestUtils.java @@ -135,7 +135,7 @@ public static void checkVC(VerifiableCredential verifiableCredential, MIWSetting } if (verifiableCredential.getVerifiableCredentialStatus() != null) { - Assertions.assertTrue(verifiableCredential.getContext().contains(revocationSettings.bitStringStatusListContext())); + Assertions.assertTrue(verifiableCredential.getContext().contains(revocationSettings.statusList2021Context())); } //check expiry date Assertions.assertEquals(0, verifiableCredential.getExpirationDate().compareTo(miwSettings.vcExpiryDate().toInstant())); diff --git a/revocation-service/src/main/resources/application.yaml b/revocation-service/src/main/resources/application.yaml index 35065c0b..3da1057f 100644 --- a/revocation-service/src/main/resources/application.yaml +++ b/revocation-service/src/main/resources/application.yaml @@ -50,7 +50,7 @@ revocation: refresh-token-url: ${revocation.security.keycloak.token-url} miw: url: ${MIW_URL:https://a888-203-129-213-107.ngrok-free.app} - vcContexts: ${VC_SCHEMA_LINK:https://www.w3.org/2018/credentials/v1, https://cofinity-x.github.io/schema-registry/w3c/v1.0/BitstringStatusList.json} + vcContexts: ${VC_SCHEMA_LINK:https://www.w3.org/2018/credentials/v1, https://w3id.org/vc/status-list/2021/v1} domain: url: ${DOMAIN_URL:https://977d-203-129-213-107.ngrok-free.app}