From 00a86d50be726936dfe2857d23142021dfe87509 Mon Sep 17 00:00:00 2001 From: Nitin Vavdiya Date: Wed, 25 Sep 2024 17:44:27 +0530 Subject: [PATCH] docs: README and sample in API doc are updated --- .github/workflows/release.yml | 250 ------------------ charts/managed-identity-wallet/README.md | 2 +- charts/managed-identity-wallet/values.yaml | 2 +- docs/api/revocation-service/openapi_v001.json | 14 +- docs/arc42/revocation-service/main.md | 30 +-- .../apidocs/RevocationAPIDoc.java | 3 +- revocation-service/README.md | 15 +- .../RevocationApiControllerApiDocs.java | 14 +- .../revocation/TestUtil.java | 4 +- 9 files changed, 42 insertions(+), 292 deletions(-) delete mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml deleted file mode 100644 index e760bd4b..00000000 --- a/.github/workflows/release.yml +++ /dev/null @@ -1,250 +0,0 @@ -# Copyright (c) 2021-2023 Contributors to the Eclipse Foundation - -# See the NOTICE file(s) distributed with this work for additional -# information regarding copyright ownership. - -# This program and the accompanying materials are made available under the -# terms of the Apache License, Version 2.0 which is available at -# https://www.apache.org/licenses/LICENSE-2.0. - -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. - -# SPDX-License-Identifier: Apache-2.0 ---- - - name: Semantic Release - on: - push: - branches: - - main - - develop - pull_request: - branches: - - main - - develop - - env: - IMAGE_NAMESPACE: "tractusx" - IMAGE_NAME: "managed-identity-wallet" - - jobs: - - semantic_release: - name: Repository Release - runs-on: ubuntu-latest - permissions: - # see https://docs.github.com/en/actions/using-jobs/assigning-permissions-to-jobs - contents: write - pull-requests: write - packages: write - outputs: - next_release: ${{ steps.semantic-release.outputs.next_release }} - will_create_new_release: ${{ steps.semantic-release.outputs.will_create_new_release }} - steps: - - name: Checkout repository - uses: actions/checkout@v4 - - - name: Validate Gradle wrapper - uses: gradle/wrapper-validation-action@v2 - - - name: Setup Helm - uses: azure/setup-helm@v4.1.0 - - - name: Setup JDK 17 - uses: actions/setup-java@v4 - with: - java-version: '17' - distribution: 'temurin' - - - name: Setup Node.js - uses: actions/setup-node@v4 - with: - node-version: 20 - - # setup helm-docs as it is needed during semantic-release - - uses: gabe565/setup-helm-docs-action@v1 - name: Setup helm-docs - if: github.event_name != 'pull_request' - with: - version: v1.11.3 - - - name: Run semantic release - id: semantic-release - if: github.event_name != 'pull_request' - env: - GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} - GIT_AUTHOR_EMAIL: ${{ github.actor }}@users.noreply.github.com - GIT_COMMITTER_EMAIL: ${{ github.actor }}@users.noreply.github.com - run: | - npx --yes -p @semantic-release/exec -p @semantic-release/changelog -p @semantic-release/git -p @semantic-release/commit-analyzer -p @semantic-release/release-notes-generator semantic-release - - - name: Run semantic release (dry run) - if: github.event_name == 'pull_request' - env: - GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} - GIT_AUTHOR_EMAIL: ${{ github.actor }}@users.noreply.github.com - GIT_COMMITTER_EMAIL: ${{ github.actor }}@users.noreply.github.com - run: | - npx --yes -p @semantic-release/exec -p @semantic-release/github -p @semantic-release/changelog -p @semantic-release/git -p @semantic-release/commit-analyzer -p @semantic-release/release-notes-generator semantic-release --dry-run - - - name: Execute Gradle build - run: ./gradlew build - - - name: Upload build artifact - uses: actions/upload-artifact@v4 - with: - name: build - path: ./miw/build - if-no-files-found: error - retention-days: 1 - - - name: Upload Helm chart artifact - uses: actions/upload-artifact@v4 - with: - name: charts - path: ./charts - if-no-files-found: error - retention-days: 1 - - - name: Report semantic-release outputs - run: | - echo "::notice::${{ env.next_release }}" - echo "::notice::${{ env.will_create_new_release }}" - - - name: Upload jar to GitHub release - if: github.event_name != 'pull_request' && steps.semantic-release.outputs.will_create_new_release == 'true' - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - RELEASE_VERSION: ${{ steps.semantic-release.outputs.next_release }} - run: | - echo "::notice::Uploading jar to GitHub release" - gh release upload "v$RELEASE_VERSION" ./miw/build/libs/miw-latest.jar - - docker: - name: Docker Release - needs: semantic_release - runs-on: ubuntu-latest - steps: - - name: Checkout repository - uses: actions/checkout@v4 - - name: Download build artifact - uses: actions/download-artifact@v4 - with: - name: build - path: ./miw/build - - - name: Download Helm chart artifact - uses: actions/download-artifact@v4 - with: - name: charts - path: ./charts - - # Create SemVer or ref tags dependent of trigger event - - name: Docker meta - id: meta - uses: docker/metadata-action@v5 - with: - images: | - ${{ env.IMAGE_NAMESPACE }}/${{ env.IMAGE_NAME }} - # Automatically prepare image tags; See action docs for more examples. - # semver patter will generate tags like these for example :1 :1.2 :1.2.3 - tags: | - type=ref,event=branch - type=ref,event=pr - type=semver,pattern={{version}},value=${{ needs.semantic_release.outputs.next_release }} - type=semver,pattern={{major}},value=${{ needs.semantic_release.outputs.next_release }} - type=semver,pattern={{major}}.{{minor}},value=${{ needs.semantic_release.outputs.next_release }} - type=raw,value=latest,enable=${{ github.ref == format('refs/heads/{0}', 'main') }} - - - name: DockerHub login - if: github.event_name != 'pull_request' - uses: docker/login-action@v3 - with: - # Use existing DockerHub credentials present as secrets - username: ${{ secrets.DOCKER_HUB_USER }} - password: ${{ secrets.DOCKER_HUB_TOKEN }} - - - name: Push image - uses: docker/build-push-action@v5 - with: - context: . - push: ${{ github.event_name != 'pull_request' }} - tags: ${{ steps.meta.outputs.tags }} - labels: ${{ steps.meta.outputs.labels }} - - # https://github.com/peter-evans/dockerhub-description - # Important step to push image description to DockerHub - - name: Update Docker Hub description - if: github.event_name != 'pull_request' - uses: peter-evans/dockerhub-description@v3 - with: - # readme-filepath defaults to toplevel README.md, Only necessary if you have a dedicated file with your 'Notice for docker images' - readme-filepath: Docker-hub-notice.md - username: ${{ secrets.DOCKER_HUB_USER }} - password: ${{ secrets.DOCKER_HUB_TOKEN }} - repository: ${{ env.IMAGE_NAMESPACE }}/${{ env.IMAGE_NAME }} - - helm: - name: Helm Release - needs: semantic_release - runs-on: ubuntu-latest - permissions: - contents: write - steps: - - name: Checkout repository - uses: actions/checkout@v4 - - - name: Download Helm chart artifact - uses: actions/download-artifact@v4 - with: - name: charts - path: ./charts - - - name: Install Helm - uses: azure/setup-helm@v4.1.0 - - - name: Add Helm dependency repositories - run: | - helm repo add bitnami https://charts.bitnami.com/bitnami - - - name: Configure Git - run: | - git config user.name "$GITHUB_ACTOR" - git config user.email "$GITHUB_ACTOR@users.noreply.github.com" - - - name: Release chart - if: github.event_name != 'pull_request' && needs.semantic_release.outputs.will_create_new_release == 'true' - run: | - # Package MIW chart - helm_package_path=$(helm package -u -d helm-charts ./charts/managed-identity-wallet | grep -o 'to: .*' | cut -d' ' -f2-) - echo "HELM_PACKAGE_PATH=$helm_package_path" >> $GITHUB_ENV - - # Commit and push to gh-pages - git add helm-charts - git stash -- helm-charts - git reset --hard - git fetch origin - git checkout gh-pages - git stash pop - - # Generate helm repo index.yaml - helm repo index . --merge index.yaml --url https://${GITHUB_REPOSITORY_OWNER}.github.io/${GITHUB_REPOSITORY#*/}/ - git add index.yaml - - git commit -s -m "Release ${{ needs.semantic_release.outputs.next_release }}" - - git push origin gh-pages - - - name: Upload chart to GitHub release - if: github.event_name != 'pull_request' && needs.semantic_release.outputs.will_create_new_release == 'true' - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - RELEASE_VERSION: ${{ needs.semantic_release.outputs.next_release }} - HELM_PACKAGE_PATH: ${{ env.HELM_PACKAGE_PATH }} - run: | - echo "::notice::Uploading chart to GitHub release" - gh release upload "v$RELEASE_VERSION" "$HELM_PACKAGE_PATH" \ No newline at end of file diff --git a/charts/managed-identity-wallet/README.md b/charts/managed-identity-wallet/README.md index 537db4c9..9c524424 100644 --- a/charts/managed-identity-wallet/README.md +++ b/charts/managed-identity-wallet/README.md @@ -201,7 +201,7 @@ See [helm upgrade](https://helm.sh/docs/helm/helm_upgrade/) for command document | serviceAccount.create | bool | `true` | Enable creation of ServiceAccount | | serviceAccount.name | string | `""` | The name of the ServiceAccount to use. | | tolerations | list | `[]` | Tolerations configuration | -| vcrs | object | `{"affinity":{},"autoscaling":{"enabled":false,"maxReplicas":2,"minReplicas":1,"targetCPUUtilizationPercentage":80,"targetMemoryUtilizationPercentage":80},"configName":"verifiable-credential-revocation-service","database":{"encryptionKey":{"secret":"","secretKey":"","value":""}},"env":{"APPLICATION_LOG_LEVEL":"DEBUG","APPLICATION_NAME":"verifiable-credential-revocation-service","APPLICATION_PORT":8081,"APPLICATION_PROFILE":"local","APP_LOG_LEVEL":"INFO","AUTH_SERVER_URL":"http://{{ .Release.Name }}-keycloak","DATABASE_CONNECTION_POOL_SIZE":10,"DATABASE_HOST":"managed-identity-wallet-postgresql","DATABASE_NAME":"vcrs_app","DATABASE_PORT":5432,"DATABASE_USERNAME":"vcrs","DATABASE_USE_SSL_COMMUNICATION":false,"DOMAIN_URL":"https://977d-203-129-213-107.ngrok-free.app","ENABLE_API_DOC":true,"ENABLE_SWAGGER_UI":true,"KEYCLOAK_CLIENT_ID":"miw_private_client","KEYCLOAK_PUBLIC_CLIENT_ID":"miw_public_client","KEYCLOAK_REALM":"miw_test","MIW_URL":"https://a888-203-129-213-107.ngrok-free.app","SERVICE_SECURITY_ENABLED":true,"VC_SCHEMA_LINK":"https://www.w3.org/2018/credentials/v1, https://cofinity-x.github.io/schema-registry/w3c/v1.0/BitstringStatusList.json"},"fullnameOverride":"verifiable-credential-revocation-service","host":"localhost","image":{"pullPolicy":"IfNotPresent","repository":"tractusx/verifiable-credential-revocation-service","tag":"latest"},"imagePullSecrets":[],"ingress":{"annotations":{},"className":"","enabled":false,"hosts":null,"service":{"port":8081,"type":"ClusterIP"},"tls":[]},"ingressName":"verifiable-credential-revocation-service-ingress","livenessProbe":{"enabled":true,"failureThreshold":3,"initialDelaySeconds":60,"periodSeconds":5,"timeoutSeconds":30},"nameOverride":"verifiable-credential-revocation-service","nodeSelector":{},"podAnnotations":{},"podLabels":{},"podSecurityContext":{},"readinessProbe":{"enabled":true,"failureThreshold":3,"initialDelaySeconds":60,"periodSeconds":30,"timeoutSeconds":30},"replicaCount":1,"resources":{},"rollingUpdate":{"enabled":true,"rollingUpdateMaxSurge":1,"rollingUpdateMaxUnavailable":0},"secretName":"verifiable-credential-revocation-service","secrets":{"DATABASE_PASSWORD":"defaultpassword","password":"defaultpassword","postgres-password":"defaultpassword"},"securityContext":{"allowPrivilegeEscalation":false},"serviceName":"verifiable-credential-revocation-service","tolerations":[],"volumeMounts":[],"volumes":[]}` | Values for Verifiable Credential Revocation Service application | +| vcrs | object | `{"affinity":{},"autoscaling":{"enabled":false,"maxReplicas":2,"minReplicas":1,"targetCPUUtilizationPercentage":80,"targetMemoryUtilizationPercentage":80},"configName":"verifiable-credential-revocation-service","database":{"encryptionKey":{"secret":"","secretKey":"","value":""}},"env":{"APPLICATION_LOG_LEVEL":"DEBUG","APPLICATION_NAME":"verifiable-credential-revocation-service","APPLICATION_PORT":8081,"APPLICATION_PROFILE":"local","APP_LOG_LEVEL":"INFO","AUTH_SERVER_URL":"http://{{ .Release.Name }}-keycloak","DATABASE_CONNECTION_POOL_SIZE":10,"DATABASE_HOST":"managed-identity-wallet-postgresql","DATABASE_NAME":"vcrs_app","DATABASE_PORT":5432,"DATABASE_USERNAME":"vcrs","DATABASE_USE_SSL_COMMUNICATION":false,"DOMAIN_URL":"https://977d-203-129-213-107.ngrok-free.app","ENABLE_API_DOC":true,"ENABLE_SWAGGER_UI":true,"KEYCLOAK_CLIENT_ID":"miw_private_client","KEYCLOAK_PUBLIC_CLIENT_ID":"miw_public_client","KEYCLOAK_REALM":"miw_test","MIW_URL":"https://a888-203-129-213-107.ngrok-free.app","SERVICE_SECURITY_ENABLED":true,"VC_SCHEMA_LINK":"https://www.w3.org/2018/credentials/v1, https://w3id.org/vc/status-list/2021/v1"},"fullnameOverride":"verifiable-credential-revocation-service","host":"localhost","image":{"pullPolicy":"IfNotPresent","repository":"tractusx/verifiable-credential-revocation-service","tag":"latest"},"imagePullSecrets":[],"ingress":{"annotations":{},"className":"","enabled":false,"hosts":null,"service":{"port":8081,"type":"ClusterIP"},"tls":[]},"ingressName":"verifiable-credential-revocation-service-ingress","livenessProbe":{"enabled":true,"failureThreshold":3,"initialDelaySeconds":60,"periodSeconds":5,"timeoutSeconds":30},"nameOverride":"verifiable-credential-revocation-service","nodeSelector":{},"podAnnotations":{},"podLabels":{},"podSecurityContext":{},"readinessProbe":{"enabled":true,"failureThreshold":3,"initialDelaySeconds":60,"periodSeconds":30,"timeoutSeconds":30},"replicaCount":1,"resources":{},"rollingUpdate":{"enabled":true,"rollingUpdateMaxSurge":1,"rollingUpdateMaxUnavailable":0},"secretName":"verifiable-credential-revocation-service","secrets":{"DATABASE_PASSWORD":"defaultpassword","password":"defaultpassword","postgres-password":"defaultpassword"},"securityContext":{"allowPrivilegeEscalation":false},"serviceName":"verifiable-credential-revocation-service","tolerations":[],"volumeMounts":[],"volumes":[]}` | Values for Verifiable Credential Revocation Service application | | vcrs.configName | string | `"verifiable-credential-revocation-service"` | ConfigMap Name | | vcrs.database.encryptionKey.secret | string | `""` | Existing secret for database encryption key | | vcrs.database.encryptionKey.secretKey | string | `""` | Existing secret key for database encryption key | diff --git a/charts/managed-identity-wallet/values.yaml b/charts/managed-identity-wallet/values.yaml index 96e70c47..16849bd3 100644 --- a/charts/managed-identity-wallet/values.yaml +++ b/charts/managed-identity-wallet/values.yaml @@ -398,7 +398,7 @@ vcrs: AUTH_SERVER_URL: "http://{{ .Release.Name }}-keycloak" # -- Revocation application configuration MIW_URL: https://a888-203-129-213-107.ngrok-free.app - VC_SCHEMA_LINK: https://www.w3.org/2018/credentials/v1, https://cofinity-x.github.io/schema-registry/w3c/v1.0/BitstringStatusList.json + VC_SCHEMA_LINK: https://www.w3.org/2018/credentials/v1, https://w3id.org/vc/status-list/2021/v1 DOMAIN_URL: https://977d-203-129-213-107.ngrok-free.app # Application logging configurations APP_LOG_LEVEL: INFO diff --git a/docs/api/revocation-service/openapi_v001.json b/docs/api/revocation-service/openapi_v001.json index 423ead47..0e95ff5a 100644 --- a/docs/api/revocation-service/openapi_v001.json +++ b/docs/api/revocation-service/openapi_v001.json @@ -47,7 +47,7 @@ "statusPurpose" : "revocation", "statusListIndex" : "12", "statusListCredential" : "https://977d-203-129-213-107.ngrok-free.app/api/v1/revocations/credentials/BPNL000000000000/revocation/1", - "type" : "BitstringStatusListEntry" + "type" : "StatusList2021" } } }, @@ -122,7 +122,7 @@ "statusPurpose" : "revocation", "statusListIndex" : "17", "statusListCredential" : "https://977d-203-129-213-107.ngrok-free.app/api/v1/revocations/credentials/BPNL000000000000/revocation/1", - "type" : "BitstringStatusListEntry" + "type" : "StatusList2021" } } } @@ -155,7 +155,7 @@ "statusPurpose" : "revocation", "statusListIndex" : "12", "statusListCredential" : "https://977d-203-129-213-107.ngrok-free.app/api/v1/revocations/credentials/BPNL000000000000/revocation/1", - "type" : "BitstringStatusListEntry" + "type" : "StatusList2021" } } }, @@ -170,7 +170,7 @@ "content" : { "application/json" : { "example" : { - "type" : "BitstringStatusListEntry", + "type" : "StatusList2021", "title" : "Revocation service error", "status" : "409", "detail" : "Credential already revoked", @@ -240,13 +240,13 @@ "example" : { "@context" : [ "https://www.w3.org/2018/credentials/v1", - "https://eclipse-tractusx.github.io/schema-registry/w3c/v1.0/BitstringStatusList.json", + "https://w3id.org/vc/status-list/2021/v1", "https://w3id.org/security/suites/jws-2020/v1" ], "id" : "http://localhost/api/v1/revocations/credentials/BPNL000000000000/revocation/1", "type" : [ "VerifiableCredential", - "BitstringStatusListCredential" + "StatusList2021Credential" ], "issuer" : "did:web:localhost:BPNL000000000000", "issuanceDate" : "2024-02-05T09:39:58Z", @@ -254,7 +254,7 @@ { "statusPurpose" : "revocation", "id" : "http://localhost/api/v1/revocations/credentials/BPNL000000000000/revocation/1", - "type" : "BitstringStatusList", + "type" : "StatusList2021", "encodedList" : "H4sIAAAAAAAA/wMAAAAAAAAAAAA=" } ], diff --git a/docs/arc42/revocation-service/main.md b/docs/arc42/revocation-service/main.md index 3c334cf3..8afdad6e 100644 --- a/docs/arc42/revocation-service/main.md +++ b/docs/arc42/revocation-service/main.md @@ -13,7 +13,7 @@ not work. Simply deleting credentials will not work as there might be possible that holder save credentials in other location and present it to verifier. -When any business partner deboarded from Cofinity-X +When any business partner deboarded from Catena-X When there a any changes in credentials or updates needed in credentials. In this case, we need to revoke the older VC and need to reissue it. @@ -26,17 +26,17 @@ The core functionalities are: ## Cross-cutting Concepts -Please refer to this for more information: [Bitstring Status List v1.0](https://www.w3.org/TR/vc-bitstring-status-list/) +Please refer to this for more information: [Status List 2021](https://www.w3.org/TR/2023/WD-vc-status-list-20230427) ## Requirements Overview The basic requirements for the Managed Identity Wallet are as follows: -- issue status list to all issuer using REST API +- issue status list to all issuers using REST API - Manage status list index for each issuer -- Allow issuer to revoke credential using REST API +- Allow issuers to revoke credentials using REST API - Allow verifier to verify status of credential using REST API @@ -48,7 +48,7 @@ The basic requirements for the Managed Identity Wallet are as follows: 2. The current index should be created for each issued revocable VC 3. while revocation, the correct index should be revoked 4. The application should work in case of horizontal scanning -5. Only Authorizae user/client can access the revocation API +5. Only Authorize user/client can access the revocation API 6. One status list index should be created for one VC 7. Sonar quality gate should be passed 8. No issues in veracode scanning @@ -58,7 +58,7 @@ The basic requirements for the Managed Identity Wallet are as follows: The key stakeholders of the component are: -- Issuer: Issuer should able to issue revocable credentials and able to revoke issued credentials when there a need +- Issuer: Issuer should be able to issue revocable credentials and able to revoke issued credentials when there a need - Verifier: Verify status of credential(active/revoked) along with signature and expiry date verification @@ -139,7 +139,7 @@ Response Body: "statusPurpose": "revocation", "statusListIndex": "12", "statusListCredential": "https://977d-203-129-213-107.ngrok-free.app/api/v1/revocations/credentials/BPNL000000000000/revocation/1", - "type": "BitstringStatusListEntry" + "type": "StatusList2021" } ``` @@ -159,13 +159,13 @@ Response: { "@context": [ "https://www.w3.org/2018/credentials/v1", - "https://eclipse-tractusx.github.io/schema-registry/w3c/v1.0/BitstringStatusList.json", + "https://w3id.org/vc/status-list/2021/v1", "https://w3id.org/security/suites/jws-2020/v1" ], "id": "http://localhost/api/v1/revocations/credentials/BPNL000000000000/revocation/1", "type": [ "VerifiableCredential", - "BitstringStatusListCredential" + "StatusList2021Credential" ], "issuer": "did:web:localhost:BPNL000000000000", "issuanceDate": "2024-02-05T09:39:58Z", @@ -173,7 +173,7 @@ Response: { "statusPurpose": "revocation", "id": "http://localhost/api/v1/revocations/credentials/BPNL000000000000/revocation/1", - "type": "BitstringStatusList", + "type": "StatusList2021", "encodedList": "H4sIAAAAAAAA/wMAAAAAAAAAAAA=" } ], @@ -203,7 +203,7 @@ Request: "statusPurpose": "revocation", "statusListIndex": "12", "statusListCredential": "https://977d-203-129-213-107.ngrok-free.app/api/v1/revocations/credentials/BPNL000000000000/revocation/1", - "type": "BitstringStatusListEntry" + "type": "StatusList2021" } ``` @@ -227,7 +227,7 @@ Request: "statusPurpose": "revocation", "statusListIndex": "12", "statusListCredential": "https://977d-203-129-213-107.ngrok-free.app/api/v1/revocations/credentials/BPNL000000000000/revocation/1", - "type": "BitstringStatusListEntry" + "type": "StatusList2021" } ``` @@ -333,11 +333,11 @@ For local setup, instruction will be added in README.md file # Guiding Concepts -Please refer: https://www.w3.org/TR/vc-bitstring-status-list/ +Please refer: https://www.w3.org/TR/2023/WD-vc-status-list-20230427 # Design Decisions -Revocation service is developed at Cofinity-X and as per discussion with product owner of MIW cofinity-x has decided to +Revocation service is developed at Cofinity-X and as per discussion with a product owner of MIW cofinity-x has decided to contribute to the eclipse tractus-x # Quality Requirements @@ -389,7 +389,7 @@ requirements where relevant and applicable: | VC | Verifiable Credential | | VP | Verifiable Presentation | | Wallet | Virtual placeholder for business partner which holds VCs | -| Base wallet | Wallet for Cofinity-X. CX type of VC will be issued using this wallet | +| Base wallet | Wallet for Operating company . CX type of VC will be issued using this wallet | | Status list credential | [https://www.w3.org/TR/vc-status-list/#statuslist2021credential](https://www.w3.org/TR/vc-status-list/#statuslist2021credential) | | Status list entry | [https://www.w3.org/TR/vc-status-list/#statuslist2021credential](https://www.w3.org/TR/vc-status-list/#statuslist2021credential) | | Status list index | [https://www.w3.org/TR/vc-status-list/#statuslist2021entry](https://www.w3.org/TR/vc-status-list/#statuslist2021entry) | diff --git a/miw/src/main/java/org/eclipse/tractusx/managedidentitywallets/apidocs/RevocationAPIDoc.java b/miw/src/main/java/org/eclipse/tractusx/managedidentitywallets/apidocs/RevocationAPIDoc.java index ed03dbaf..d631047f 100644 --- a/miw/src/main/java/org/eclipse/tractusx/managedidentitywallets/apidocs/RevocationAPIDoc.java +++ b/miw/src/main/java/org/eclipse/tractusx/managedidentitywallets/apidocs/RevocationAPIDoc.java @@ -134,7 +134,6 @@ public class RevocationAPIDoc { "@context": [ "https://www.w3.org/2018/credentials/v1", - "https://cofinity-x.github.io/schema-registry/v1.1/SummaryVC.json", "https://w3id.org/security/suites/jws-2020/v1", "https://w3id.org/vc/status-list/2021/v1" ], @@ -146,7 +145,7 @@ public class RevocationAPIDoc { "statusPurpose": "revocation", "statusListIndex": "1", "statusListCredential": "https://7337-203-129-213-107.ngrok-free.app/api/v1/revocations/credentials?issuerId=did:web:localhost:BPNL000000000000", - "type": "BitstringStatusListEntry" + "type": "StatusList2021" } } """)) diff --git a/revocation-service/README.md b/revocation-service/README.md index 2f27eec6..9130d099 100644 --- a/revocation-service/README.md +++ b/revocation-service/README.md @@ -1,6 +1,7 @@ -# Bitstring Statuslist Service +# Statuslist2021 revocation service Service -This service is responsible for managing the status of credentials using a Bitstring status list. It supports operations such as creating, revoking, and retrieving credential statuses. +This service is responsible for managing the status of credentials using a status list 2021. +It supports operations such as creating, revoking, and retrieving credential statuses. ## Prerequisites @@ -11,7 +12,7 @@ Before you begin, ensure you have met the following requirements: - Keycloak service is operational and accessible. - Postgres database service is running and accessible. - Environment variables are configured according to the application's requirements. -- MIW is deployed and accessable +- MIW is deployed and accessible - Be sure the right ssi-lib version is installed ## Environment Configuration @@ -47,7 +48,7 @@ The application can be configured using environment variables. Below are the ava The application integrates with Keycloak for OAuth2 authentication and authorization: -- **SERVICE_SECURITY_ENABLED**: Flag to enable or disable Servive Security integration for Disabling Swagger and other Endpoints. Defaults to true, false only for test purposes recommended. +- **SERVICE_SECURITY_ENABLED**: Flag to enable or disable service Security integration for Disabling Swagger and other Endpoints. Defaults to true, false only for test purposes recommended. The application integrates with Keycloak for OAuth2 authentication and authorization: @@ -80,15 +81,15 @@ Be sure to replace placeholder values in the environment variables with actual d Ensure that the middleware (MIW) is running, as it is used to sign the status list credentials. -An Overview how to start the middleware can be found under the Readme.md in here:[README.md](..%2Fmiw%2FREADME.md) +An Overview of how to start the middleware can be found under the Readme.md in here:[README.md](..%2Fmiw%2FREADME.md) ## Starting Services -To start the Bitstring Statuslist Service, follow these steps: +To start the Statuslist2021 Service, follow these steps: 1. **Start Keycloak and Postgres:** - Ensure that both Keycloak and Postgres services are running. For development purposes the Keycloak and + Ensure that both Keycloak and Postgres services are running. For development purposes, the Keycloak and Postgres from the MIW Dev Setup can be used if not already running with the MIW Task deployment. diff --git a/revocation-service/src/main/java/org/eclipse/tractusx/managedidentitywallets/revocation/apidocs/RevocationApiControllerApiDocs.java b/revocation-service/src/main/java/org/eclipse/tractusx/managedidentitywallets/revocation/apidocs/RevocationApiControllerApiDocs.java index 0f63fc68..c93c0794 100644 --- a/revocation-service/src/main/java/org/eclipse/tractusx/managedidentitywallets/revocation/apidocs/RevocationApiControllerApiDocs.java +++ b/revocation-service/src/main/java/org/eclipse/tractusx/managedidentitywallets/revocation/apidocs/RevocationApiControllerApiDocs.java @@ -81,7 +81,7 @@ public class RevocationApiControllerApiDocs { "statusPurpose": "revocation", "statusListIndex": "12", "statusListCredential": "https://977d-203-129-213-107.ngrok-free.app/api/v1/revocations/credentials/BPNL000000000000/revocation/1", - "type": "BitstringStatusListEntry" + "type": "StatusList2021" } """), mediaType = "application/json") @@ -117,7 +117,7 @@ public class RevocationApiControllerApiDocs { @ExampleObject( value = """ { - "type": "BitstringStatusListEntry", + "type": "StatusList2021", "title": "Revocation service error", "status": "409", "detail": "Credential already revoked", @@ -142,7 +142,7 @@ public class RevocationApiControllerApiDocs { "statusPurpose": "revocation", "statusListIndex": "12", "statusListCredential": "https://977d-203-129-213-107.ngrok-free.app/api/v1/revocations/credentials/BPNL000000000000/revocation/1", - "type": "BitstringStatusListEntry" + "type": "StatusList2021" } """), mediaType = "application/json") @@ -170,7 +170,7 @@ public class RevocationApiControllerApiDocs { "statusPurpose": "revocation", "statusListIndex": "17", "statusListCredential": "https://977d-203-129-213-107.ngrok-free.app/api/v1/revocations/credentials/BPNL000000000000/revocation/1", - "type": "BitstringStatusListEntry" + "type": "StatusList2021" } """), mediaType = "application/json") @@ -223,14 +223,14 @@ public class RevocationApiControllerApiDocs { "@context": [ "https://www.w3.org/2018/credentials/v1", - "https://eclipse-tractusx.github.io/schema-registry/w3c/v1.0/BitstringStatusList.json", + "https://w3id.org/vc/status-list/2021/v1", "https://w3id.org/security/suites/jws-2020/v1" ], "id": "http://localhost/api/v1/revocations/credentials/BPNL000000000000/revocation/1", "type": [ "VerifiableCredential", - "BitstringStatusListCredential" + "StatusList2021Credential" ], "issuer": "did:web:localhost:BPNL000000000000", "issuanceDate": "2024-02-05T09:39:58Z", @@ -239,7 +239,7 @@ public class RevocationApiControllerApiDocs { { "statusPurpose": "revocation", "id": "http://localhost/api/v1/revocations/credentials/BPNL000000000000/revocation/1", - "type": "BitstringStatusList", + "type": "StatusList2021", "encodedList": "H4sIAAAAAAAA/wMAAAAAAAAAAAA=" } ], diff --git a/revocation-service/src/test/java/org/eclipse/tractusx/managedidentitywallets/revocation/TestUtil.java b/revocation-service/src/test/java/org/eclipse/tractusx/managedidentitywallets/revocation/TestUtil.java index 6dc27476..69df4ade 100644 --- a/revocation-service/src/test/java/org/eclipse/tractusx/managedidentitywallets/revocation/TestUtil.java +++ b/revocation-service/src/test/java/org/eclipse/tractusx/managedidentitywallets/revocation/TestUtil.java @@ -93,7 +93,7 @@ public static VerifiableCredentialBuilder mockStatusListVC( new VerifiableCredentialBuilder() .context(VC_CONTEXTS) .id(URI.create(issuer + "#" + index)) - .type(List.of("VerifiableCredential", "BitstringStatusListCredential")) + .type(List.of("VerifiableCredential", "StatusList2021Credential")) .issuer(URI.create(issuer)) .expirationDate(Instant.now().plusSeconds(200000000L)) .issuanceDate(Instant.now()) @@ -149,7 +149,7 @@ public static Map mockStatusList(String encodedList) { Map credentialSubjectMap = new HashMap(); credentialSubjectMap.put( StatusListCredentialSubject.SUBJECT_ID, STATUS_LIST_CREDENTIAL_SUBJECT_ID); - credentialSubjectMap.put(StatusListCredentialSubject.SUBJECT_TYPE, "BitstringStatusList"); + credentialSubjectMap.put(StatusListCredentialSubject.SUBJECT_TYPE, "StatusList2021"); credentialSubjectMap.put(StatusListCredentialSubject.SUBJECT_STATUS_PURPOSE, "revocation"); credentialSubjectMap.put(StatusListCredentialSubject.SUBJECT_ENCODED_LIST, encodedList); return credentialSubjectMap;