From ec492b4d42972ec8fa1ef5672e9465f90ad1478c Mon Sep 17 00:00:00 2001 From: Phil Schneider Date: Tue, 12 Mar 2024 14:38:33 +0100 Subject: [PATCH] build: add helm chart for issuer component Refs: #2 --- .github/workflows/chart-test.yml | 28 +- .../credential-expiry-app-docker.yml | 91 +++++ .github/workflows/migrations-docker.yml | 2 +- .github/workflows/owasp-zap.yml | 28 +- .github/workflows/processes-worker-docker.yml | 91 +++++ .github/workflows/release.yml | 71 +++- .github/workflows/release_candidate.yml | 119 ++++++- .github/workflows/service-docker.yml | 4 +- .github/workflows/trivy-dev.yml | 71 +++- .github/workflows/trivy.yml | 69 +++- charts/chart-testing-config.yaml | 23 ++ charts/ssi-credential-issuer/.helmignore | 27 ++ charts/ssi-credential-issuer/Chart.yaml | 31 ++ charts/ssi-credential-issuer/LICENSE | 201 +++++++++++ charts/ssi-credential-issuer/README.md | 123 +++++++ charts/ssi-credential-issuer/README.md.gotmpl | 37 +++ .../templates/_helpers.tpl | 98 ++++++ .../templates/configmap-postgres-init.yaml | 35 ++ .../templates/cronjob-expiry-app.yaml | 80 +++++ .../templates/cronjob-issuer-processes.yaml | 125 +++++++ .../templates/deployment-issuer-service.yaml | 171 ++++++++++ .../templates/ingress.yaml | 80 +++++ .../templates/job-issuer-migrations.yaml | 78 +++++ .../templates/secret-external-db.yaml | 39 +++ .../templates/secret-interfaces.yaml | 46 +++ .../templates/secret-postgres.yaml | 45 +++ .../templates/service-credential-issuer.yaml | 33 ++ charts/ssi-credential-issuer/values.yaml | 312 ++++++++++++++++++ .../argocd-app-templates/appsetup-beta.yaml | 38 +++ .../argocd-app-templates/appsetup-dev.yaml | 41 +++ .../argocd-app-templates/appsetup-int.yaml | 38 +++ .../argocd-app-templates/appsetup-pen.yaml | 38 +++ .../argocd-app-templates/appsetup-rc.yaml | 38 +++ .../argocd-app-templates/appsetup-stable.yaml | 77 +++++ .../appsetup-upgrade.yaml | 38 +++ consortia/environments/values-beta.yaml | 63 ++++ consortia/environments/values-dev.yaml | 77 +++++ consortia/environments/values-int.yaml | 70 ++++ consortia/environments/values-pen.yaml | 63 ++++ consortia/environments/values-rc.yaml | 71 ++++ consortia/environments/values-upgrade.yaml | 28 ++ docker/Dockerfile-credential-expiry-app | 35 ++ .../Dockerfile-credential-issuer-migrations | 35 ++ ...kerfile-credential-issuer-processes-worker | 36 ++ docker/Dockerfile-credential-issuer-service | 37 +++ docker/notice-credential-expiry-app.md | 22 ++ docker/notice-credential-issuer-migrations.md | 22 ++ ...tice-credential-issuer-processes-worker.md | 22 ++ docker/notice-credential-issuer-service.md | 22 ++ .../appsettings.json | 30 +- .../appsettings.json | 4 +- .../ExpiryCheckServiceTests.cs | 2 +- .../GlobalUsings.cs | 2 +- ...siCredentialIssuer.Expiry.App.Tests.csproj | 2 +- .../Setup/FakePolicyEvaluator.cs | 3 +- .../Setup/IntegrationTestFactory.cs | 2 +- .../Usings.cs | 2 +- .../ProcessExecutorTests.cs | 3 +- .../Processes.Worker.Library.Tests/Usings.cs | 3 +- 59 files changed, 3055 insertions(+), 67 deletions(-) create mode 100644 .github/workflows/credential-expiry-app-docker.yml create mode 100644 .github/workflows/processes-worker-docker.yml create mode 100644 charts/chart-testing-config.yaml create mode 100644 charts/ssi-credential-issuer/.helmignore create mode 100644 charts/ssi-credential-issuer/Chart.yaml create mode 100644 charts/ssi-credential-issuer/LICENSE create mode 100644 charts/ssi-credential-issuer/README.md create mode 100644 charts/ssi-credential-issuer/README.md.gotmpl create mode 100644 charts/ssi-credential-issuer/templates/_helpers.tpl create mode 100644 charts/ssi-credential-issuer/templates/configmap-postgres-init.yaml create mode 100644 charts/ssi-credential-issuer/templates/cronjob-expiry-app.yaml create mode 100644 charts/ssi-credential-issuer/templates/cronjob-issuer-processes.yaml create mode 100644 charts/ssi-credential-issuer/templates/deployment-issuer-service.yaml create mode 100644 charts/ssi-credential-issuer/templates/ingress.yaml create mode 100644 charts/ssi-credential-issuer/templates/job-issuer-migrations.yaml create mode 100644 charts/ssi-credential-issuer/templates/secret-external-db.yaml create mode 100644 charts/ssi-credential-issuer/templates/secret-interfaces.yaml create mode 100644 charts/ssi-credential-issuer/templates/secret-postgres.yaml create mode 100644 charts/ssi-credential-issuer/templates/service-credential-issuer.yaml create mode 100644 charts/ssi-credential-issuer/values.yaml create mode 100644 consortia/argocd-app-templates/appsetup-beta.yaml create mode 100644 consortia/argocd-app-templates/appsetup-dev.yaml create mode 100644 consortia/argocd-app-templates/appsetup-int.yaml create mode 100644 consortia/argocd-app-templates/appsetup-pen.yaml create mode 100644 consortia/argocd-app-templates/appsetup-rc.yaml create mode 100644 consortia/argocd-app-templates/appsetup-stable.yaml create mode 100644 consortia/argocd-app-templates/appsetup-upgrade.yaml create mode 100644 consortia/environments/values-beta.yaml create mode 100644 consortia/environments/values-dev.yaml create mode 100644 consortia/environments/values-int.yaml create mode 100644 consortia/environments/values-pen.yaml create mode 100644 consortia/environments/values-rc.yaml create mode 100644 consortia/environments/values-upgrade.yaml create mode 100644 docker/Dockerfile-credential-expiry-app create mode 100644 docker/Dockerfile-credential-issuer-migrations create mode 100644 docker/Dockerfile-credential-issuer-processes-worker create mode 100644 docker/Dockerfile-credential-issuer-service create mode 100644 docker/notice-credential-expiry-app.md create mode 100644 docker/notice-credential-issuer-migrations.md create mode 100644 docker/notice-credential-issuer-processes-worker.md create mode 100644 docker/notice-credential-issuer-service.md diff --git a/.github/workflows/chart-test.yml b/.github/workflows/chart-test.yml index 4c828b8c..9f09d671 100644 --- a/.github/workflows/chart-test.yml +++ b/.github/workflows/chart-test.yml @@ -65,19 +65,37 @@ jobs: uses: docker/build-push-action@v3 with: context: . - file: docker/Dockerfile-migrations + file: docker/Dockerfile-credential-issuer-migrations push: true - tags: kind-registry:5000/migrations:testing + tags: kind-registry:5000/credential-issuer-migrations:testing - name: Build service image id: build-service-image uses: docker/build-push-action@v3 with: context: . - file: docker/Dockerfile-service + file: docker/Dockerfile-credential-issuer-service push: true - tags: kind-registry:5000/service:testing + tags: kind-registry:5000/credential-issuer-service:testing + - name: Build expiry app + id: build-expiry-app-image + uses: docker/build-push-action@v3 + with: + context: . + file: docker/Dockerfile-credential-expiry-app + push: true + tags: kind-registry:5000/credential-expiry-app:testing + + - name: Build processes worker + id: build-processes-worker-image + uses: docker/build-push-action@v3 + with: + context: . + file: docker/Dockerfile-credential-issuer-processes-worker + push: true + tags: kind-registry:5000/credential-issuer-processes-worker:testing + - name: Set up Helm uses: azure/setup-helm@v3 with: @@ -103,7 +121,7 @@ jobs: run: ct lint --validate-maintainers=false --check-version-increment=false --target-branch ${{ github.event.repository.default_branch }} - name: Run service chart-testing (install) - run: ct install --charts charts/ssi-credential-issuer --config charts/chart-testing-config.yaml --helm-extra-set-args "--set=issuer.image=kind-registry:5000/service:testing --set=issuermigrations.image=kind-registry:5000/migrations:testing" + run: ct install --charts charts/ssi-credential-issuer --config charts/chart-testing-config.yaml --helm-extra-set-args "--set=issuer.image=kind-registry:5000/credential-issuer-service:testing --set=issuermigrations.image=kind-registry:5000/credential-issuer-migrations:testing --set=processesworker.image=kind-registry:5000/credential-issuer-processes-worker --set=credentialexpiry.image=kind-registry:5000/credential-expiry-app" if: github.event_name != 'pull_request' || steps.list-changed.outputs.changed == 'true' # TODO: re-add the step after the first version release diff --git a/.github/workflows/credential-expiry-app-docker.yml b/.github/workflows/credential-expiry-app-docker.yml new file mode 100644 index 00000000..2d77360e --- /dev/null +++ b/.github/workflows/credential-expiry-app-docker.yml @@ -0,0 +1,91 @@ +############################################################### +# Copyright (c) 2024 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: Credential Expiry App + +on: + push: + paths: + # service and transitive paths + - 'src/**' + # workflow file + - '.github/workflows/credential-expiry-app-docker.yml' + # dockerfile + - 'docker/Dockerfile-credential-expiry-app' + + branches: + - 'dev' + workflow_dispatch: + +env: + IMAGE_NAMESPACE: "tractusx" + IMAGE_NAME: "credential-expiry-app" + +jobs: + build-and-push-image: + runs-on: ubuntu-latest + permissions: + contents: read + + steps: + - name: Checkout repository + uses: actions/checkout@v3 + + - name: Login to DockerHub + if: github.event_name != 'pull_request' + uses: docker/login-action@v2 + with: + username: ${{ secrets.DOCKER_HUB_USER }} + password: ${{ secrets.DOCKER_HUB_TOKEN }} + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v2 + + - name: Set up QEMU + uses: docker/setup-qemu-action@v3 + + - name: Docker meta + id: meta + uses: docker/metadata-action@v4 + with: + images: ${{ env.IMAGE_NAMESPACE }}/${{ env.IMAGE_NAME }} + tags: | + type=raw,value=dev + type=raw,value=${{ github.sha }} + + - name: Build and push Docker image + uses: docker/build-push-action@v4 + with: + context: . + file: docker/Dockerfile-credential-expiry-app + platforms: linux/amd64, linux/arm64 + pull: true + push: ${{ github.event_name != 'pull_request' }} + tags: ${{ steps.meta.outputs.tags }} + labels: ${{ steps.meta.outputs.labels }} + + # https://github.com/peter-evans/dockerhub-description + - name: Update Docker Hub description + if: github.event_name != 'pull_request' + uses: peter-evans/dockerhub-description@v3 + with: + username: ${{ secrets.DOCKER_HUB_USER }} + password: ${{ secrets.DOCKER_HUB_TOKEN }} + repository: ${{ env.IMAGE_NAMESPACE }}/${{ env.IMAGE_NAME }} + readme-filepath: "./docker/notice-credential-expiry-app.md" diff --git a/.github/workflows/migrations-docker.yml b/.github/workflows/migrations-docker.yml index a6786d58..4b80cbc7 100644 --- a/.github/workflows/migrations-docker.yml +++ b/.github/workflows/migrations-docker.yml @@ -28,7 +28,7 @@ on: # workflow file - '.github/workflows/migrations-docker.yml' # dockerfile - - 'docker/Dockerfile-migrations' + - 'docker/Dockerfile-credential-issuer-migrations' branches: - 'dev' diff --git a/.github/workflows/owasp-zap.yml b/.github/workflows/owasp-zap.yml index f1cff0e8..24f3b49f 100644 --- a/.github/workflows/owasp-zap.yml +++ b/.github/workflows/owasp-zap.yml @@ -65,19 +65,37 @@ jobs: uses: docker/build-push-action@4a13e500e55cf31b7a5d59a38ab2040ab0f42f56 # v5.1.0 with: context: . - file: docker/Dockerfile-migrations + file: docker/Dockerfile-credential-issuer-migrations push: true - tags: kind-registry:5000/migrations:testing + tags: kind-registry:5000/credential-issuer-migrations:testing - name: Build service image id: build-service-image uses: docker/build-push-action@4a13e500e55cf31b7a5d59a38ab2040ab0f42f56 # v5.1.0 with: context: . - file: docker/Dockerfile-service + file: docker/Dockerfile-credential-issuer-service push: true - tags: kind-registry:5000/service:testing + tags: kind-registry:5000/credential-issuer-service:testing + - name: Build Worker image + id: build-worker-image + uses: docker/build-push-action@4a13e500e55cf31b7a5d59a38ab2040ab0f42f56 # v5.1.0 + with: + context: . + file: docker/Dockerfile-credential-issuer-processes-worker + push: true + tags: kind-registry:5000/credential-issuer-processes-worker:testing + + - name: Build Expiry image + id: build-expiry-image + uses: docker/build-push-action@4a13e500e55cf31b7a5d59a38ab2040ab0f42f56 # v5.1.0 + with: + context: . + file: docker/Dockerfile-credential-expiry-app + push: true + tags: kind-registry:5000/credential-expiry-app:testing + - name: Add bitnami repo run: | helm repo add bitnami https://charts.bitnami.com/bitnami @@ -89,7 +107,7 @@ jobs: helm dependency build - name: Install the chart on KinD cluster - run: helm install testing -n apps --create-namespace --wait --set issuer.image=kind-registry:5000/service:testing --set=issuermigrations.image=kind-registry:5000/migrations:testing --set=issuer.swaggerEnabled=true charts/ssi-credential-issuer + run: helm install testing -n apps --create-namespace --wait --set issuer.image=kind-registry:5000/credential-issuer-service:testing --set=issuermigrations.image=kind-registry:5000/credential-issuer-migrations:testing --set=processesworker.image=kind-registry:5000/credential-issuer-processes-worker:testing --set=credentialexpiry.image=kind-registry:5000/credential-expiry-app:testing --set=issuer.swaggerEnabled=true charts/ssi-credential-issuer - name: Configure port forward to app in KinD run: | diff --git a/.github/workflows/processes-worker-docker.yml b/.github/workflows/processes-worker-docker.yml new file mode 100644 index 00000000..ecb4615d --- /dev/null +++ b/.github/workflows/processes-worker-docker.yml @@ -0,0 +1,91 @@ +############################################################### +# Copyright (c) 2024 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: Processes Worker + +on: + push: + paths: + # service and transitive paths + - 'src/**' + # workflow file + - '.github/workflows/process-worker-docker.yml' + # dockerfile + - 'docker/Dockerfile-credential-issuer-process-worker' + + branches: + - 'dev' + workflow_dispatch: + +env: + IMAGE_NAMESPACE: "tractusx" + IMAGE_NAME: "credential-issuer-process-worker" + +jobs: + build-and-push-image: + runs-on: ubuntu-latest + permissions: + contents: read + + steps: + - name: Checkout repository + uses: actions/checkout@v3 + + - name: Login to DockerHub + if: github.event_name != 'pull_request' + uses: docker/login-action@v2 + with: + username: ${{ secrets.DOCKER_HUB_USER }} + password: ${{ secrets.DOCKER_HUB_TOKEN }} + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v2 + + - name: Set up QEMU + uses: docker/setup-qemu-action@v3 + + - name: Docker meta + id: meta + uses: docker/metadata-action@v4 + with: + images: ${{ env.IMAGE_NAMESPACE }}/${{ env.IMAGE_NAME }} + tags: | + type=raw,value=dev + type=raw,value=${{ github.sha }} + + - name: Build and push Docker image + uses: docker/build-push-action@v4 + with: + context: . + file: docker/Dockerfile-credential-issuer-process-worker + platforms: linux/amd64, linux/arm64 + pull: true + push: ${{ github.event_name != 'pull_request' }} + tags: ${{ steps.meta.outputs.tags }} + labels: ${{ steps.meta.outputs.labels }} + + # https://github.com/peter-evans/dockerhub-description + - name: Update Docker Hub description + if: github.event_name != 'pull_request' + uses: peter-evans/dockerhub-description@v3 + with: + username: ${{ secrets.DOCKER_HUB_USER }} + password: ${{ secrets.DOCKER_HUB_TOKEN }} + repository: ${{ env.IMAGE_NAMESPACE }}/${{ env.IMAGE_NAME }} + readme-filepath: "./docker/notice-credential-issuer-process-worker.md" diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 2f7c7c75..af15884c 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -29,6 +29,8 @@ env: IMAGE_NAMESPACE: "tractusx" IMAGE_NAME_SERVICE: "service" IMAGE_NAME_MIGRATIONS: "migrations" + IMAGE_NAME_WORKER: "credential-issuer-processes-worker" + IMAGE_NAME_EXPIRY: "credential-expiry-app" jobs: service-release: @@ -74,7 +76,7 @@ jobs: uses: docker/build-push-action@v4 with: context: . - file: docker/Dockerfile-service + file: docker/Dockerfile-credential-issuer-service platforms: linux/amd64, linux/arm64 pull: true push: ${{ github.event_name != 'pull_request' }} @@ -89,7 +91,7 @@ jobs: username: ${{ secrets.DOCKER_HUB_USER }} password: ${{ secrets.DOCKER_HUB_TOKEN }} repository: ${{ env.IMAGE_NAMESPACE }}/${{ env.IMAGE_NAME_SERVICE }} - readme-filepath: "./docker/notice-service.md" + readme-filepath: "./docker/notice-credential-issuer-service.md" migrations-release: runs-on: ubuntu-latest @@ -134,7 +136,7 @@ jobs: uses: docker/build-push-action@v4 with: context: . - file: docker/Dockerfile-migrations + file: docker/Dockerfile-credential-issuer-migrations platforms: linux/amd64, linux/arm64 pull: true push: ${{ github.event_name != 'pull_request' }} @@ -149,4 +151,65 @@ jobs: username: ${{ secrets.DOCKER_HUB_USER }} password: ${{ secrets.DOCKER_HUB_TOKEN }} repository: ${{ env.IMAGE_NAMESPACE }}/${{ env.IMAGE_NAME_MIGRATIONS }} - readme-filepath: "./docker/notice-migrations.md" + readme-filepath: "./docker/notice-credential-issuer-migrations.md" + + expiry-release: + runs-on: ubuntu-latest + permissions: + contents: read + + steps: + - name: Checkout repository + uses: actions/checkout@v3 + + - name: Login to DockerHub + if: github.event_name != 'pull_request' + uses: docker/login-action@v2 + with: + username: ${{ secrets.DOCKER_HUB_USER }} + password: ${{ secrets.DOCKER_HUB_TOKEN }} + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v2 + + - name: Set up QEMU + uses: docker/setup-qemu-action@v3 + + # Create SemVer or ref tags dependent of trigger event + - name: Docker meta + id: meta + uses: docker/metadata-action@v4 + with: + images: | + ${{ env.IMAGE_NAMESPACE }}/${{ env.IMAGE_NAME_EXPIRY }} + # 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=raw,value=latest + type=semver,pattern={{version}} + type=semver,pattern={{major}} + type=semver,pattern={{major}}.{{minor}} + + - name: Build and push Docker image + uses: docker/build-push-action@v4 + with: + context: . + file: docker/Dockerfile-credential-expiry-app + platforms: linux/amd64, linux/arm64 + pull: true + push: ${{ github.event_name != 'pull_request' }} + tags: ${{ steps.meta.outputs.tags }} + labels: ${{ steps.meta.outputs.labels }} + + # https://github.com/peter-evans/dockerhub-description + - name: Update Docker Hub description + if: github.event_name != 'pull_request' + uses: peter-evans/dockerhub-description@v3 + with: + username: ${{ secrets.DOCKER_HUB_USER }} + password: ${{ secrets.DOCKER_HUB_TOKEN }} + repository: ${{ env.IMAGE_NAMESPACE }}/${{ env.IMAGE_NAME_EXPIRY }} + readme-filepath: "./docker/notice-credential-expiry-app.md" + \ No newline at end of file diff --git a/.github/workflows/release_candidate.yml b/.github/workflows/release_candidate.yml index ffe2f55a..d8c38c97 100644 --- a/.github/workflows/release_candidate.yml +++ b/.github/workflows/release_candidate.yml @@ -27,8 +27,10 @@ on: env: IMAGE_NAMESPACE: "tractusx" - IMAGE_NAME_SERVICE: "service" - IMAGE_NAME_MIGRATIONS: "migrations" + IMAGE_NAME_SERVICE: "credential-issuer-service" + IMAGE_NAME_MIGRATIONS: "credential-issuer-migrations" + IMAGE_NAME_WORKER: "credential-issuer-processes-worker" + IMAGE_NAME_EXPIRY: "credential-expiry-app" jobs: service-release: @@ -66,7 +68,7 @@ jobs: uses: docker/build-push-action@v4 with: context: . - file: docker/Dockerfile-service + file: docker/Dockerfile-credential-issuer-service platforms: linux/amd64, linux/arm64 pull: true push: ${{ github.event_name != 'pull_request' }} @@ -81,7 +83,7 @@ jobs: username: ${{ secrets.DOCKER_HUB_USER }} password: ${{ secrets.DOCKER_HUB_TOKEN }} repository: ${{ env.IMAGE_NAMESPACE }}/${{ env.IMAGE_NAME_SERVICE }} - readme-filepath: "./docker/notice-ervice.md" + readme-filepath: "./docker/notice-credential-issuer-service.md" migrations-release: runs-on: ubuntu-latest @@ -118,7 +120,7 @@ jobs: uses: docker/build-push-action@v4 with: context: . - file: docker/Dockerfile-migrations + file: docker/Dockerfile-credential-issuer-migrations platforms: linux/amd64, linux/arm64 pull: true push: ${{ github.event_name != 'pull_request' }} @@ -133,4 +135,109 @@ jobs: username: ${{ secrets.DOCKER_HUB_USER }} password: ${{ secrets.DOCKER_HUB_TOKEN }} repository: ${{ env.IMAGE_NAMESPACE }}/${{ env.IMAGE_NAME_MIGRATIONS }} - readme-filepath: "./docker/notice-migrations.md" + readme-filepath: "./docker/notice-credential-issuer-migrations.md" + + expiry-release: + runs-on: ubuntu-latest + permissions: + contents: read + + steps: + - name: Checkout repository + uses: actions/checkout@v3 + + - name: Login to DockerHub + if: github.event_name != 'pull_request' + uses: docker/login-action@v2 + with: + username: ${{ secrets.DOCKER_HUB_USER }} + password: ${{ secrets.DOCKER_HUB_TOKEN }} + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v2 + + - name: Set up QEMU + uses: docker/setup-qemu-action@v3 + + - name: Docker meta + id: meta + uses: docker/metadata-action@v4 + with: + images: ${{ env.IMAGE_NAMESPACE }}/${{ env.IMAGE_NAME_EXPIRY }} + tags: | + type=raw,value=rc + type=raw,value=${{ github.sha }} + + - name: Build and push Docker image + uses: docker/build-push-action@v4 + with: + context: . + file: docker/Dockerfile-credential-expiry-app + platforms: linux/amd64, linux/arm64 + pull: true + push: ${{ github.event_name != 'pull_request' }} + tags: ${{ steps.meta.outputs.tags }} + labels: ${{ steps.meta.outputs.labels }} + + # https://github.com/peter-evans/dockerhub-description + - name: Update Docker Hub description + if: github.event_name != 'pull_request' + uses: peter-evans/dockerhub-description@v3 + with: + username: ${{ secrets.DOCKER_HUB_USER }} + password: ${{ secrets.DOCKER_HUB_TOKEN }} + repository: ${{ env.IMAGE_NAMESPACE }}/${{ env.IMAGE_NAME_EXPIRY }} + readme-filepath: "./docker/notice-credential-expiry-app.md" + + worker-release: + runs-on: ubuntu-latest + permissions: + contents: read + + steps: + - name: Checkout repository + uses: actions/checkout@v3 + + - name: Login to DockerHub + if: github.event_name != 'pull_request' + uses: docker/login-action@v2 + with: + username: ${{ secrets.DOCKER_HUB_USER }} + password: ${{ secrets.DOCKER_HUB_TOKEN }} + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v2 + + - name: Set up QEMU + uses: docker/setup-qemu-action@v3 + + - name: Docker meta + id: meta + uses: docker/metadata-action@v4 + with: + images: ${{ env.IMAGE_NAMESPACE }}/${{ env.IMAGE_NAME_WORKER }} + tags: | + type=raw,value=rc + type=raw,value=${{ github.sha }} + + - name: Build and push Docker image + uses: docker/build-push-action@v4 + with: + context: . + file: docker/Dockerfile-credential-issuer-processes-worker + platforms: linux/amd64, linux/arm64 + pull: true + push: ${{ github.event_name != 'pull_request' }} + tags: ${{ steps.meta.outputs.tags }} + labels: ${{ steps.meta.outputs.labels }} + + # https://github.com/peter-evans/dockerhub-description + - name: Update Docker Hub description + if: github.event_name != 'pull_request' + uses: peter-evans/dockerhub-description@v3 + with: + username: ${{ secrets.DOCKER_HUB_USER }} + password: ${{ secrets.DOCKER_HUB_TOKEN }} + repository: ${{ env.IMAGE_NAMESPACE }}/${{ env.IMAGE_NAME_WORKER }} + readme-filepath: "./docker/notice-credential-issuer-processes-worker.md" + \ No newline at end of file diff --git a/.github/workflows/service-docker.yml b/.github/workflows/service-docker.yml index f2bd5e7f..1b7c71ae 100644 --- a/.github/workflows/service-docker.yml +++ b/.github/workflows/service-docker.yml @@ -27,7 +27,7 @@ on: # workflow file - '.github/workflows/service-docker.yml' # dockerfile - - 'docker/Dockerfile-service' + - 'docker/Dockerfile-credential-issuer-service' branches: - 'dev' @@ -35,7 +35,7 @@ on: env: IMAGE_NAMESPACE: "tractusx" - IMAGE_NAME: "service" + IMAGE_NAME: "credential-issuer-service" jobs: build-and-push-image: diff --git a/.github/workflows/trivy-dev.yml b/.github/workflows/trivy-dev.yml index 9439f8bb..8e2af291 100644 --- a/.github/workflows/trivy-dev.yml +++ b/.github/workflows/trivy-dev.yml @@ -89,7 +89,7 @@ jobs: uses: aquasecurity/trivy-action@0.14.0 with: # Path to Docker image - image-ref: "${{ env.IMAGE_NAMESPACE }}/service:dev" + image-ref: "${{ env.IMAGE_NAMESPACE }}/credential-issuer-service:dev" format: "sarif" output: "trivy-results3.sarif" vuln-type: "os,library" @@ -121,7 +121,7 @@ jobs: uses: aquasecurity/trivy-action@0.14.0 with: # Path to Docker image - image-ref: "${{ env.IMAGE_NAMESPACE }}/migrations:dev" + image-ref: "${{ env.IMAGE_NAMESPACE }}/credential-issuer-migrations:dev" format: "sarif" output: "trivy-results9.sarif" vuln-type: "os,library" @@ -132,3 +132,70 @@ jobs: uses: github/codeql-action/upload-sarif@v2 with: sarif_file: "trivy-results9.sarif" + + analyze-ssi-credential-expiry-app: + runs-on: ubuntu-latest + permissions: + actions: read + contents: read + security-events: write + + steps: + - name: Checkout repository + uses: actions/checkout@v3 + + # It's also possible to scan your private registry with Trivy's built-in image scan. + # All you have to do is set ENV vars. + # Docker Hub needs TRIVY_USERNAME and TRIVY_PASSWORD. + # You don't need to set ENV vars when downloading from a public repository. + # For public images, no ENV vars must be set. + - name: Run Trivy vulnerability scanner + if: always() + uses: aquasecurity/trivy-action@0.14.0 + with: + # Path to Docker image + image-ref: "${{ env.IMAGE_NAMESPACE }}/credential-expiry-app:dev" + format: "sarif" + output: "trivy-results9.sarif" + vuln-type: "os,library" + skip-dirs: "docs/" + + - name: Upload Trivy scan results to GitHub Security tab + if: always() + uses: github/codeql-action/upload-sarif@v2 + with: + sarif_file: "trivy-results9.sarif" + + analyze-ssi-credential-issuer-processes-worker: + runs-on: ubuntu-latest + permissions: + actions: read + contents: read + security-events: write + + steps: + - name: Checkout repository + uses: actions/checkout@v3 + + # It's also possible to scan your private registry with Trivy's built-in image scan. + # All you have to do is set ENV vars. + # Docker Hub needs TRIVY_USERNAME and TRIVY_PASSWORD. + # You don't need to set ENV vars when downloading from a public repository. + # For public images, no ENV vars must be set. + - name: Run Trivy vulnerability scanner + if: always() + uses: aquasecurity/trivy-action@0.14.0 + with: + # Path to Docker image + image-ref: "${{ env.IMAGE_NAMESPACE }}/credential-issuer-processes-worker:dev" + format: "sarif" + output: "trivy-results9.sarif" + vuln-type: "os,library" + skip-dirs: "docs/" + + - name: Upload Trivy scan results to GitHub Security tab + if: always() + uses: github/codeql-action/upload-sarif@v2 + with: + sarif_file: "trivy-results9.sarif" + \ No newline at end of file diff --git a/.github/workflows/trivy.yml b/.github/workflows/trivy.yml index 38353107..0bb744ee 100644 --- a/.github/workflows/trivy.yml +++ b/.github/workflows/trivy.yml @@ -90,7 +90,7 @@ jobs: uses: aquasecurity/trivy-action@0.14.0 with: # Path to Docker image - image-ref: "${{ env.IMAGE_NAMESPACE }}/service:latest" + image-ref: "${{ env.IMAGE_NAMESPACE }}/credential-issuer-service:latest" format: "sarif" output: "trivy-results3.sarif" vuln-type: "os,library" @@ -122,7 +122,7 @@ jobs: uses: aquasecurity/trivy-action@0.14.0 with: # Path to Docker image - image-ref: "${{ env.IMAGE_NAMESPACE }}/migrations:latest" + image-ref: "${{ env.IMAGE_NAMESPACE }}/credential-issuer-migrations:latest" format: "sarif" output: "trivy-results9.sarif" vuln-type: "os,library" @@ -132,3 +132,68 @@ jobs: uses: github/codeql-action/upload-sarif@v2 with: sarif_file: "trivy-results9.sarif" + + analyze-ssi-credential-expiry-app: + runs-on: ubuntu-latest + permissions: + actions: read + contents: read + security-events: write + + steps: + - name: Checkout repository + uses: actions/checkout@v3 + + # It's also possible to scan your private registry with Trivy's built-in image scan. + # All you have to do is set ENV vars. + # Docker Hub needs TRIVY_USERNAME and TRIVY_PASSWORD. + # You don't need to set ENV vars when downloading from a public repository. + # For public images, no ENV vars must be set. + - name: Run Trivy vulnerability scanner + if: always() + uses: aquasecurity/trivy-action@0.14.0 + with: + # Path to Docker image + image-ref: "${{ env.IMAGE_NAMESPACE }}/credential-expiry-app:latest" + format: "sarif" + output: "trivy-results9.sarif" + vuln-type: "os,library" + + - name: Upload Trivy scan results to GitHub Security tab + if: always() + uses: github/codeql-action/upload-sarif@v2 + with: + sarif_file: "trivy-results9.sarif" + + analyze-ssi-credential-issuer-processes-worker: + runs-on: ubuntu-latest + permissions: + actions: read + contents: read + security-events: write + + steps: + - name: Checkout repository + uses: actions/checkout@v3 + + # It's also possible to scan your private registry with Trivy's built-in image scan. + # All you have to do is set ENV vars. + # Docker Hub needs TRIVY_USERNAME and TRIVY_PASSWORD. + # You don't need to set ENV vars when downloading from a public repository. + # For public images, no ENV vars must be set. + - name: Run Trivy vulnerability scanner + if: always() + uses: aquasecurity/trivy-action@0.14.0 + with: + # Path to Docker image + image-ref: "${{ env.IMAGE_NAMESPACE }}/credential-issuer-processes-worker:latest" + format: "sarif" + output: "trivy-results9.sarif" + vuln-type: "os,library" + + - name: Upload Trivy scan results to GitHub Security tab + if: always() + uses: github/codeql-action/upload-sarif@v2 + with: + sarif_file: "trivy-results9.sarif" + \ No newline at end of file diff --git a/charts/chart-testing-config.yaml b/charts/chart-testing-config.yaml new file mode 100644 index 00000000..f70d8a6a --- /dev/null +++ b/charts/chart-testing-config.yaml @@ -0,0 +1,23 @@ +############################################################### +# Copyright (c) 2024 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 +############################################################### + +validate-maintainers: false +chart-repos: + - bitnami=https://charts.bitnami.com/bitnami + - tractusx-dev=https://eclipse-tractusx.github.io/charts/dev diff --git a/charts/ssi-credential-issuer/.helmignore b/charts/ssi-credential-issuer/.helmignore new file mode 100644 index 00000000..0bffc69f --- /dev/null +++ b/charts/ssi-credential-issuer/.helmignore @@ -0,0 +1,27 @@ +# Patterns to ignore when building packages. +# This supports shell glob matching, relative path matching, and +# negation (prefixed with !). Only one pattern per line. +.DS_Store +# Common VCS dirs +.git/ +.gitignore +.bzr/ +.bzrignore +.hg/ +.hgignore +.svn/ +# Common backup files +*.swp +*.bak +*.tmp +*.orig +*~ +# Various IDEs +.project +.idea/ +*.tmproj +.vscode/ + +# Custom dirs and files +argocd/ +*.gotmpl diff --git a/charts/ssi-credential-issuer/Chart.yaml b/charts/ssi-credential-issuer/Chart.yaml new file mode 100644 index 00000000..2cf71c8b --- /dev/null +++ b/charts/ssi-credential-issuer/Chart.yaml @@ -0,0 +1,31 @@ +############################################################### +# Copyright (c) 2024 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 +############################################################### + +apiVersion: v2 +name: ssi-credential-issuer +type: application +version: 0.1.0-rc.1 +appVersion: 0.1.0-rc.1 +description: Helm chart for Catena-X SSI Credential Issuer +home: https://github.com/eclipse-tractusx/ssi-credential-issuer +dependencies: + - condition: postgresql.enabled + name: postgresql + repository: https://charts.bitnami.com/bitnami + version: 12.12.x diff --git a/charts/ssi-credential-issuer/LICENSE b/charts/ssi-credential-issuer/LICENSE new file mode 100644 index 00000000..f49a4e16 --- /dev/null +++ b/charts/ssi-credential-issuer/LICENSE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://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. \ No newline at end of file diff --git a/charts/ssi-credential-issuer/README.md b/charts/ssi-credential-issuer/README.md new file mode 100644 index 00000000..ecfc2df0 --- /dev/null +++ b/charts/ssi-credential-issuer/README.md @@ -0,0 +1,123 @@ +# Helm chart for Catena-X SSI Credential Issuer + +This helm chart installs the Catena-X SSI Credential Issuer application. + +For further information please refer to [Technical Documentation](./docs/technical-documentation). + +The referenced container images are for demonstration purposes only. + +## Installation + +To install the chart with the release name `ssi-credential-issuer`: + +```shell +$ helm repo add tractusx-dev https://eclipse-tractusx.github.io/charts/dev +$ helm install ssi-credential-issuer tractusx-dev/ssi-credential-issuer +``` + +To install the helm chart into your cluster with your values: + +```shell +$ helm install -f your-values.yaml ssi-credential-issuer tractusx-dev/ssi-credential-issuer +``` + +To use the helm chart as a dependency: + +```yaml +dependencies: + - name: ssi-credential-issuer + repository: https://eclipse-tractusx.github.io/charts/dev + version: 0.1.0-rc.1 +``` + +## Requirements + +| Repository | Name | Version | +|------------|------|---------| +| https://charts.bitnami.com/bitnami | postgresql | 12.12.x | + +## Values + +| Key | Type | Default | Description | +|-----|------|---------|-------------| +| centralidpAddress | string | `"https://centralidp.example.org"` | Provide centralidp base address (CX IAM), without trailing '/auth'. | +| ingress.enabled | bool | `false` | Policy Hub ingress parameters, enable ingress record generation for policy-hub. | +| ingress.name | string | `"policy-hub"` | | +| ingress.className | string | `"nginx"` | | +| ingress.annotations."nginx.ingress.kubernetes.io/use-regex" | string | `"true"` | | +| ingress.annotations."nginx.ingress.kubernetes.io/enable-cors" | string | `"true"` | | +| ingress.annotations."nginx.ingress.kubernetes.io/proxy-body-size" | string | `"8m"` | | +| ingress.annotations."nginx.ingress.kubernetes.io/cors-allow-origin" | string | `"https://*.example.org"` | Provide CORS allowed origin. | +| ingress.tls[0] | object | `{"hosts":["policy-hub.example.org"],"secretName":""}` | Provide tls secret. | +| ingress.tls[0].hosts | list | `["policy-hub.example.org"]` | Provide host for tls secret. | +| ingress.hosts[0] | object | `{"host":"policy-hub.example.org","paths":[{"backend":{"port":8080},"path":"/api/policy-hub","pathType":"Prefix"}]}` | Provide default path for the ingress record. | +| dotnetEnvironment | string | `"Production"` | | +| dbConnection.schema | string | `"hub"` | | +| dbConnection.sslMode | string | `"Disable"` | | +| keycloak.central.authRealm | string | `"CX-Central"` | | +| keycloak.central.jwtBearerOptions.requireHttpsMetadata | string | `"true"` | | +| keycloak.central.jwtBearerOptions.metadataPath | string | `"/auth/realms/CX-Central/.well-known/openid-configuration"` | | +| keycloak.central.jwtBearerOptions.tokenValidationParameters.validIssuerPath | string | `"/auth/realms/CX-Central"` | | +| keycloak.central.jwtBearerOptions.tokenValidationParameters.validAudience | string | `"Cl23-CX-Policy-Hub"` | | +| keycloak.central.jwtBearerOptions.refreshInterval | string | `"00:00:30"` | | +| keycloak.central.tokenPath | string | `"/auth/realms/CX-Central/protocol/openid-connect/token"` | | +| keycloak.central.useAuthTrail | bool | `true` | Flag if the api should be used with an leading /auth path | +| healthChecks.startup.path | string | `"/health/startup"` | | +| healthChecks.liveness.path | string | `"/healthz"` | | +| healthChecks.readyness.path | string | `"/ready"` | | +| policyhub.image | string | `"docker.io/tractusx/policy-hub-service:0.1.0-rc.3"` | | +| policyhub.imagePullPolicy | string | `"IfNotPresent"` | | +| policyhub.resources | object | `{"requests":{"cpu":"15m","memory":"300M"}}` | We recommend not to specify default resource limits and to leave this as a conscious choice for the user. If you do want to specify resource limits, uncomment the following lines and adjust them as necessary. | +| policyhub.logging.businessLogic | string | `"Information"` | | +| policyhub.logging.default | string | `"Information"` | | +| policyhub.healthChecks.startup.tags[0].name | string | `"HEALTHCHECKS__0__TAGS__1"` | | +| policyhub.healthChecks.startup.tags[0].value | string | `"policyhubdb"` | | +| policyhub.swaggerEnabled | bool | `false` | | +| policyhubmigrations.image | string | `"docker.io/tractusx/policy-hub-migrations:0.1.0-rc.3"` | | +| policyhubmigrations.imagePullPolicy | string | `"IfNotPresent"` | | +| policyhubmigrations.resources | object | `{"requests":{"cpu":"15m","memory":"105M"}}` | We recommend not to specify default resource limits and to leave this as a conscious choice for the user. If you do want to specify resource limits, uncomment the following lines and adjust them as necessary. | +| policyhubmigrations.seeding.testDataEnvironments | string | `""` | | +| policyhubmigrations.seeding.testDataPaths | string | `"Seeder/Data"` | | +| policyhubmigrations.logging.default | string | `"Information"` | | +| postgresql.enabled | bool | `true` | PostgreSQL chart configuration; default configurations: host: "policy-hub-postgresql-primary", port: 5432; Switch to enable or disable the PostgreSQL helm chart. | +| postgresql.auth.username | string | `"hub"` | Non-root username. | +| postgresql.auth.database | string | `"policy-hub"` | Database name. | +| postgresql.auth.existingSecret | string | `"{{ .Release.Name }}-phub-postgres"` | Secret containing the passwords for root usernames postgres and non-root username hub. Should not be changed without changing the "phub-postgresSecretName" template as well. | +| postgresql.architecture | string | `"replication"` | | +| postgresql.audit.pgAuditLog | string | `"write, ddl"` | | +| postgresql.audit.logLinePrefix | string | `"%m %u %d "` | | +| postgresql.primary.extendedConfiguration | string | `""` | Extended PostgreSQL Primary configuration (increase of max_connections recommended - default is 100) | +| postgresql.primary.initdb.scriptsConfigMap | string | `"{{ .Release.Name }}-phub-cm-postgres"` | | +| postgresql.readReplicas.extendedConfiguration | string | `""` | Extended PostgreSQL read only replicas configuration (increase of max_connections recommended - default is 100) | +| externalDatabase.host | string | `"phub-postgres-ext"` | External PostgreSQL configuration IMPORTANT: non-root db user needs to be created beforehand on external database. And the init script (02-init-db.sql) available in templates/configmap-postgres-init.yaml needs to be executed beforehand. Database host ('-primary' is added as postfix). | +| externalDatabase.port | int | `5432` | Database port number. | +| externalDatabase.user | string | `"hub"` | Non-root username for policy-hub. | +| externalDatabase.database | string | `"policy-hub"` | Database name. | +| externalDatabase.password | string | `""` | Password for the non-root username (default 'hub'). Secret-key 'password'. | +| externalDatabase.existingSecret | string | `"policy-hub-external-db"` | Secret containing the password non-root username, (default 'hub'). | +| externalDatabase.existingSecretPasswordKey | string | `"password"` | Name of an existing secret key containing the database credentials. | +| secrets.postgresql.auth.existingSecret.postgrespassword | string | `""` | Password for the root username 'postgres'. Secret-key 'postgres-password'. | +| secrets.postgresql.auth.existingSecret.password | string | `""` | Password for the non-root username 'hub'. Secret-key 'password'. | +| secrets.postgresql.auth.existingSecret.replicationPassword | string | `""` | Password for the non-root username 'repl_user'. Secret-key 'replication-password'. | +| portContainer | int | `8080` | | +| portService | int | `8080` | | +| replicaCount | int | `3` | | +| nodeSelector | object | `{}` | Node labels for pod assignment | +| tolerations | list | `[]` | Tolerations for pod assignment | +| affinity.podAntiAffinity | object | `{"preferredDuringSchedulingIgnoredDuringExecution":[{"podAffinityTerm":{"labelSelector":{"matchExpressions":[{"key":"app.kubernetes.io/name","operator":"DoesNotExist"}]},"topologyKey":"kubernetes.io/hostname"},"weight":100}]}` | Following Catena-X Helm Best Practices, [reference](https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#affinity-and-anti-affinity). | +| updateStrategy.type | string | `"RollingUpdate"` | Update strategy type, rolling update configuration parameters, [reference](https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/#update-strategies). | +| updateStrategy.rollingUpdate.maxSurge | int | `1` | | +| updateStrategy.rollingUpdate.maxUnavailable | int | `0` | | +| startupProbe | object | `{"failureThreshold":30,"initialDelaySeconds":10,"periodSeconds":10,"successThreshold":1,"timeoutSeconds":1}` | Following Catena-X Helm Best Practices, [reference](https://github.com/helm/charts/blob/master/stable/nginx-ingress/values.yaml#L210). | +| livenessProbe.failureThreshold | int | `3` | | +| livenessProbe.initialDelaySeconds | int | `10` | | +| livenessProbe.periodSeconds | int | `10` | | +| livenessProbe.successThreshold | int | `1` | | +| livenessProbe.timeoutSeconds | int | `10` | | +| readinessProbe.failureThreshold | int | `3` | | +| readinessProbe.initialDelaySeconds | int | `10` | | +| readinessProbe.periodSeconds | int | `10` | | +| readinessProbe.successThreshold | int | `1` | | +| readinessProbe.timeoutSeconds | int | `1` | | + +Autogenerated with [helm docs](https://github.com/norwoodj/helm-docs) diff --git a/charts/ssi-credential-issuer/README.md.gotmpl b/charts/ssi-credential-issuer/README.md.gotmpl new file mode 100644 index 00000000..e352f42b --- /dev/null +++ b/charts/ssi-credential-issuer/README.md.gotmpl @@ -0,0 +1,37 @@ +# {{ template "chart.description" . }} + +This helm chart installs the Catena-X SSI Credential Issuer application. + +For further information please refer to [Technical Documentation](./docs/technical-documentation). + +The referenced container images are for demonstration purposes only. + +## Installation + +To install the chart with the release name `{{ template "chart.name" . }}`: + +```shell +$ helm repo add tractusx-dev https://eclipse-tractusx.github.io/charts/dev +$ helm install {{ template "chart.name" . }} tractusx-dev/{{ template "chart.name" . }} +``` + +To install the helm chart into your cluster with your values: + +```shell +$ helm install -f your-values.yaml {{ template "chart.name" . }} tractusx-dev/{{ template "chart.name" . }} +``` + +To use the helm chart as a dependency: + +```yaml +dependencies: + - name: {{ template "chart.name" . }} + repository: https://eclipse-tractusx.github.io/charts/dev + version: {{ template "chart.version" . }} +``` + +{{ template "chart.requirementsSection" . }} + +{{ template "chart.valuesSection" . }} + +Autogenerated with [helm docs](https://github.com/norwoodj/helm-docs) diff --git a/charts/ssi-credential-issuer/templates/_helpers.tpl b/charts/ssi-credential-issuer/templates/_helpers.tpl new file mode 100644 index 00000000..412bcaf7 --- /dev/null +++ b/charts/ssi-credential-issuer/templates/_helpers.tpl @@ -0,0 +1,98 @@ +{{/* +Expand the name of the chart. +*/}} +{{- define "issuer.name" -}} +{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }} +{{- end }} + +{{/* +Create a default fully qualified app name. +We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). +If release name contains chart name it will be used as a full name. +*/}} +{{- define "issuer.fullname" -}} +{{- if .Values.fullnameOverride }} +{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }} +{{- else }} +{{- $name := default .Chart.Name .Values.nameOverride }} +{{- if contains $name .Release.Name }} +{{- .Release.Name | trunc 63 | trimSuffix "-" }} +{{- else }} +{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" }} +{{- end }} +{{- end }} +{{- end }} + +{{/* +Create chart name and version as used by the chart label. +*/}} +{{- define "issuer.chart" -}} +{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }} +{{- end }} + +{{/* +Define secret name of postgres dependency. +*/}} +{{- define "issuer.postgresSecretName" -}} +{{- printf "%s-%s" .Release.Name "issuer-postgres" }} +{{- end }} + +{{/* +Common labels +*/}} +{{- define "issuer.labels" -}} +helm.sh/chart: {{ include "issuer.chart" . }} +{{ include "issuer.selectorLabels" . }} +{{- if .Chart.AppVersion }} +app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} +{{- end }} +app.kubernetes.io/managed-by: {{ .Release.Service }} +{{- end }} + +{{/* +Selector labels +*/}} +{{- define "issuer.selectorLabels" -}} +app.kubernetes.io/name: {{ include "issuer.name" . }} +app.kubernetes.io/instance: {{ .Release.Name }} +{{- end }} + +{{/* +Create the name of the service account to use +*/}} +{{- define "issuer.serviceAccountName" -}} +{{- if .Values.serviceAccount.create }} +{{- default (include "issuer.fullname" .) .Values.serviceAccount.name }} +{{- else }} +{{- default "default" .Values.serviceAccount.name }} +{{- end }} +{{- end }} + +{{/* +Determine database hostname for subchart +*/}} + +{{- define "postgresql.primary.fullname" -}} +{{- if eq .Values.postgresql.architecture "replication" }} +{{- printf "%s-primary" (include "chart-name-postgresql-dependency" .) | trunc 63 | trimSuffix "-" -}} +{{- else -}} + {{- include "chart-name-postgresql-dependency" . -}} +{{- end -}} +{{- end -}} + +{{- define "postgresql.readReplica.fullname" -}} +{{- printf "%s-read" (include "chart-name-postgresql-dependency" .) | trunc 63 | trimSuffix "-" -}} +{{- end -}} + +{{- define "chart-name-postgresql-dependency" -}} +{{- if .Values.postgresql.fullnameOverride -}} +{{- .Values.postgresql.fullnameOverride | trunc 63 | trimSuffix "-" -}} +{{- else -}} +{{- $name := default "postgresql" .Values.postgresql.nameOverride -}} +{{- if contains $name .Release.Name -}} +{{- .Release.Name | trunc 63 | trimSuffix "-" -}} +{{- else -}} +{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}} +{{- end -}} +{{- end -}} +{{- end -}} diff --git a/charts/ssi-credential-issuer/templates/configmap-postgres-init.yaml b/charts/ssi-credential-issuer/templates/configmap-postgres-init.yaml new file mode 100644 index 00000000..c614ac34 --- /dev/null +++ b/charts/ssi-credential-issuer/templates/configmap-postgres-init.yaml @@ -0,0 +1,35 @@ +{{- /* +* Copyright (c) 2024 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 +*/}} + +{{- if .Values.postgresql.enabled -}} +apiVersion: v1 +kind: ConfigMap +metadata: + name: {{ .Release.Name }}-issuer-cm-postgres + namespace: {{ .Release.Namespace }} +data: + 02-init-db.sql: | + CREATE SCHEMA issuer; + ALTER SCHEMA issuer OWNER TO issuer; + CREATE TABLE public.issuer ( + migration_id character varying(150) NOT NULL, + product_version character varying(32) NOT NULL + ); + ALTER TABLE public.__efmigrations_history_issuer OWNER TO issuer; +{{- end -}} diff --git a/charts/ssi-credential-issuer/templates/cronjob-expiry-app.yaml b/charts/ssi-credential-issuer/templates/cronjob-expiry-app.yaml new file mode 100644 index 00000000..34255855 --- /dev/null +++ b/charts/ssi-credential-issuer/templates/cronjob-expiry-app.yaml @@ -0,0 +1,80 @@ +############################################################### +# Copyright (c) 2024 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 +############################################################### + +apiVersion: batch/v1 +kind: CronJob +metadata: + name: {{ include "issuer.fullname" . }}-expiry + annotations: + "batch.kubernetes.io/job-tracking": "true" + "helm.sh/hook": post-install,post-upgrade + "helm.sh/hook-weight": "-5" +spec: + schedule: "0 0 * * *" + concurrencyPolicy: Forbid + jobTemplate: + metadata: + labels: + {{- include "issuer.selectorLabels" . | nindent 8 }} + spec: + restartPolicy: OnFailure + containers: + - name: {{ include "issuer.fullname" . }}-expiry + securityContext: + allowPrivilegeEscalation: false + capabilities: + drop: + - ALL + readOnlyRootFilesystem: true + runAsNonRoot: true + image: "{{ .Values.credentialexpiry.image }}" + imagePullPolicy: "{{ .Values.credentialexpiry.imagePullPolicy }}" + env: + - name: DOTNET_ENVIRONMENT + value: "{{ .Values.dotnetEnvironment }}" + {{- if .Values.postgresql.enabled }} + - name: "ISSUER_PASSWORD" + valueFrom: + secretKeyRef: + name: "{{ .Values.postgresql.auth.existingSecret }}" + key: "issuer-password" + - name: "CONNECTIONSTRINGS__ISSUERDB" + value: "Server={{ template "postgresql.primary.fullname" . }};Database={{ .Values.postgresql.auth.database }};Port={{ .Values.postgresql.auth.port }};User Id={{ .Values.postgresql.auth.issuerUser }};Password=$(ISSUER_PASSWORD);Ssl Mode={{ .Values.dbConnection.sslMode }};" + {{- end }} + {{- if not .Values.postgresql.enabled }} + - name: "ISSUER_PASSWORD" + valueFrom: + secretKeyRef: + name: "{{ .Values.externalDatabase.secret }}" + key: "issuer-password" + - name: "CONNECTIONSTRINGS__ISSUERDB" + value: "Server={{ .Values.externalDatabase.host }};Database={{ .Values.externalDatabase.database }};Port={{ .Values.externalDatabase.port }};User Id={{ .Values.externalDatabase.issuerUser }};Password=$(ISSUER_PASSWORD);Ssl Mode={{ .Values.dbConnection.sslMode }};" + {{- end }} + - name: "EXPIRY__EXPIREDVCSTODELETEINMONTH" + value: "{{ .Values.credentialexpiry.expiry.expiredVcsToDeleteInMonth }}" + - name: "EXPIRY__INACTIVEVCSTODELETEINWEEKS" + value: "{{ .Values.credentialexpiry.expiry.inactiveVcsToDeleteInWeeks }}" + - name: "PROCESSES__IDENTITYID" + value: "{{ .Values.credentialexpiry.processIdentity.identityId }}" + ports: + - name: http + containerPort: {{ .Values.portContainer }} + protocol: TCP + resources: + {{- toYaml .Values.credentialexpiry.resources | nindent 14 }} diff --git a/charts/ssi-credential-issuer/templates/cronjob-issuer-processes.yaml b/charts/ssi-credential-issuer/templates/cronjob-issuer-processes.yaml new file mode 100644 index 00000000..b8c11b01 --- /dev/null +++ b/charts/ssi-credential-issuer/templates/cronjob-issuer-processes.yaml @@ -0,0 +1,125 @@ +############################################################### +# Copyright (c) 2024 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 +############################################################### + +apiVersion: batch/v1 +kind: CronJob +metadata: + name: {{ include "processesworker.fullname" . }}-worker + annotations: + "batch.kubernetes.io/job-tracking": "true" + "helm.sh/hook": post-install,post-upgrade + "helm.sh/hook-weight": "-5" +spec: + schedule: "*/5 * * * *" + concurrencyPolicy: Forbid + jobTemplate: + metadata: + labels: + {{- include "issuer.selectorLabels" . | nindent 8 }} + spec: + restartPolicy: OnFailure + containers: + - name: {{ include "issuer.fullname" . }}-worker + securityContext: + allowPrivilegeEscalation: false + capabilities: + drop: + - ALL + readOnlyRootFilesystem: true + runAsNonRoot: true + image: "{{ .Values.processesworker.image }}" + imagePullPolicy: "{{ .Values.processesworker.imagePullPolicy }}" + env: + - name: DOTNET_ENVIRONMENT + value: "{{ .Values.dotnetEnvironment }}" + {{- if .Values.postgresql.enabled }} + - name: "ISSUER_PASSWORD" + valueFrom: + secretKeyRef: + name: "{{ .Values.postgresql.auth.existingSecret }}" + key: "issuer-password" + - name: "CONNECTIONSTRINGS__ISSUERDB" + value: "Server={{ template "postgresql.primary.fullname" . }};Database={{ .Values.postgresql.auth.database }};Port={{ .Values.postgresql.auth.port }};User Id={{ .Values.postgresql.auth.issuerUser }};Password=$(ISSUER_PASSWORD);Ssl Mode={{ .Values.dbConnection.sslMode }};" + {{- end }} + {{- if not .Values.postgresql.enabled }} + - name: "ISSUER_PASSWORD" + valueFrom: + secretKeyRef: + name: "{{ .Values.externalDatabase.secret }}" + key: "issuer-password" + - name: "CONNECTIONSTRINGS__ISSUERDB" + value: "Server={{ .Values.externalDatabase.host }};Database={{ .Values.externalDatabase.database }};Port={{ .Values.externalDatabase.port }};User Id={{ .Values.externalDatabase.issuerUser }};Password=$(ISSUER_PASSWORD);Ssl Mode={{ .Values.dbConnection.sslMode }};" + {{- end }} + - name: "PORTAL__CLIENTSECRET" + valueFrom: + secretKeyRef: + name: "{{ .Values.interfaces.secret }}" + key: "portal-client-secret" + - name: "PORTAL__GRANTTYPE" + value: "{{ .Values.processesworker.portal.grantType }}" + - name: "PORTAL__TOKENADDRESS" + value: "{{ .Values.centralidpAddress }}{{ .Values.keycloak.central.tokenPath }}" + - name: "PORTAL__PASSWORD" + value: "{{ .Values.placeholder }}" + - name: "PORTAL__SCOPE" + value: "{{ .Values.processesworker.portal.scope }}" + - name: "PORTAL__USERNAME" + value: "{{ .Values.placeholder }}" + - name: "WALLET__BASEADDRESS" + value: "{{ .Values.walletAddress }}" + - name: "WALLET__CLIENTID" + value: "{{ .Values.processesworker.wallet.clientId }}" + - name: "WALLET__CLIENTSECRET" + valueFrom: + secretKeyRef: + name: "{{ .Values.interfaces.secret }}" + key: "wallet-client-secret" + - name: "WALLET__GRANTTYPE" + value: "{{ .Values.processesworker.wallet.grantType }}" + - name: "WALLET__TOKENADDRESS" + value: "{{ .Values.walletTokenAddress }}" + - name: "WALLET__PASSWORD" + value: "{{ .Values.placeholder }}" + - name: "WALLET__SCOPE" + value: "{{ .Values.processesworker.wallet.scope }}" + - name: "WALLET__USERNAME" + value: "{{ .Values.placeholder }}" + - name: "WALLET__ENCRYPTIONCONFIG__ENCRYPTIONCONFIGINDEX" + value: "{{ .Values.processesworker.wallet.encryptionConfigIndex }}" + - name: "WALLET__ENCRYPTIONCONFIGS__0__INDEX" + value: "{{ .Values.processesworker.wallet.encryptionConfigs.index0.index}}" + - name: "WALLET__ENCRYPTIONCONFIGS__0__CIPHERMODE" + value: "{{ .Values.processesworker.wallet.encryptionConfigs.index0.cipherMode}}" + - name: "WALLET__ENCRYPTIONCONFIGS__0__PADDINGMODE" + value: "{{ .Values.processesworker.wallet.encryptionConfigs.index0.paddingMode}}" + - name: "WALLET__ENCRYPTIONCONFIGS__0__ENCRYPTIONKEY" + valueFrom: + secretKeyRef: + name: "{{ .Values.interfaces.secret }}" + key: "process-wallet-encryption-key0" + - name: "SERILOG__MINIMUMLEVEL__Default" + value: "{{ .Values.processesworker.logging.default }}" + - name: "PROCESSES__IDENTITYID" + value: "{{ .Values.processesworker.processIdentity.identityId }}" + ports: + - name: http + containerPort: {{ .Values.portContainer }} + protocol: TCP + resources: + {{- toYaml .Values.processesworker.resources | nindent 14 }} diff --git a/charts/ssi-credential-issuer/templates/deployment-issuer-service.yaml b/charts/ssi-credential-issuer/templates/deployment-issuer-service.yaml new file mode 100644 index 00000000..9091ff8e --- /dev/null +++ b/charts/ssi-credential-issuer/templates/deployment-issuer-service.yaml @@ -0,0 +1,171 @@ +############################################################### +# Copyright (c) 2024 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 +############################################################### + +apiVersion: apps/v1 +kind: Deployment +metadata: + name: {{ include "issuer.fullname" . }} + namespace: {{ .Values.namespace }} + labels: + {{- include "issuer.labels" . | nindent 4 }} +spec: + replicas: {{ .Values.replicaCount }} + strategy: + {{- toYaml .Values.updateStrategy | nindent 4 }} + selector: + matchLabels: + {{- include "issuer.selectorLabels" . | nindent 6 }} + template: + metadata: + labels: + {{- include "issuer.selectorLabels" . | nindent 8 }} + spec: + containers: + - name: {{ .Chart.Name }} + securityContext: + allowPrivilegeEscalation: false + capabilities: + drop: + - ALL + readOnlyRootFilesystem: true + runAsNonRoot: true + image: "{{ .Values.issuer.image }}" + imagePullPolicy: "{{ .Values.issuer.imagePullPolicy }}" + env: + - name: DOTNET_ENVIRONMENT + value: "{{ .Values.dotnetEnvironment }}" + {{- if .Values.postgresql.enabled }} + - name: "ISSUER_PASSWORD" + valueFrom: + secretKeyRef: + name: "{{ template "issuer.postgresSecretName" . }}" + key: "password" + - name: "CONNECTIONSTRINGS__ISSUERDB" + value: "Server={{ template "postgresql.primary.fullname" . }};Database={{ .Values.postgresql.auth.database }};Port={{ .Values.postgresql.auth.port }};User Id={{ .Values.postgresql.auth.username }};Password=$(ISSUER_PASSWORD);Ssl Mode={{ .Values.dbConnection.sslMode }};" + {{- end }} + {{- if not .Values.postgresql.enabled }} + - name: "ISSUER_PASSWORD" + valueFrom: + secretKeyRef: + name: "{{ .Values.externalDatabase.existingSecret }}" + key: "password" + - name: "CONNECTIONSTRINGS__ISSUERDB" + value: "Server={{ .Values.externalDatabase.host }};Database={{ .Values.externalDatabase.database }};Port={{ .Values.externalDatabase.port }};User Id={{ .Values.externalDatabase.username }};Password=$(ISSUER_PASSWORD);Ssl Mode={{ .Values.dbConnection.sslMode }};" + {{- end }} + - name: "HEALTHCHECKS__0__PATH" + value: "{{ .Values.healthChecks.startup.path}}" + {{- if .Values.issuer.healthChecks.startup.tags }} + {{- toYaml .Values.issuer.healthChecks.startup.tags | nindent 8 }} + {{- end }} + - name: "HEALTHCHECKS__1__PATH" + value: "{{ .Values.healthChecks.readyness.path}}" + - name: "HEALTHCHECKS__2__PATH" + value: "{{ .Values.healthChecks.liveness.path}}" + - name: "JWTBEAREROPTIONS__METADATAADDRESS" + value: "{{ .Values.centralidpAddress }}{{ .Values.keycloak.central.jwtBearerOptions.metadataPath }}" + - name: "JWTBEAREROPTIONS__REQUIREHTTPSMETADATA" + value: "{{ .Values.keycloak.central.jwtBearerOptions.requireHttpsMetadata }}" + - name: "JWTBEAREROPTIONS__TOKENVALIDATIONPARAMETERS__VALIDAUDIENCE" + value: "{{ .Values.keycloak.central.jwtBearerOptions.tokenValidationParameters.validAudience }}" + - name: "JWTBEAREROPTIONS__TOKENVALIDATIONPARAMETERS__VALIDISSUER" + value: "{{ .Values.centralidpAddress }}{{ .Values.keycloak.central.jwtBearerOptions.tokenValidationParameters.validIssuerPath }}" + - name: "JWTBEAREROPTIONS__REFRESHINTERVAL" + value: "{{ .Values.keycloak.central.jwtBearerOptions.refreshInterval }}" + - name: "SERILOG__MINIMUMLEVEL__Default" + value: "{{ .Values.issuer.logging.default }}" + - name: "SERILOG__MINIMUMLEVEL__OVERRIDE__Org.Eclipse.TractusX.SsiCredentialIssuer.Service" + value: "{{ .Values.issuer.logging.businessLogic }}" + - name: "SWAGGERENABLED" + value: "{{ .Values.issuer.swaggerEnabled }}" + - name: "PORTAL__CLIENTSECRET" + valueFrom: + secretKeyRef: + name: "{{ .Values.interfaces.secret }}" + key: "portal-client-secret" + - name: "PORTAL__GRANTTYPE" + value: "{{ .Values.issuer.portal.grantType }}" + - name: "PORTAL__TOKENADDRESS" + value: "{{ .Values.centralidpAddress }}{{ .Values.keycloak.central.tokenPath }}" + - name: "PORTAL__PASSWORD" + value: "{{ .Values.placeholder }}" + - name: "PORTAL__SCOPE" + value: "{{ .Values.issuer.portal.scope }}" + - name: "PORTAL__USERNAME" + value: "{{ .Values.placeholder }}" + - name: "CREDENTIAL__ENCRYPTIONCONFIG__ENCRYPTIONCONFIGINDEX" + value: "{{ .Values.issuer.credential.encryptionConfigIndex }}" + - name: "CREDENTIAL__ENCRYPTIONCONFIGS__0__INDEX" + value: "{{ .Values.issuer.credential.encryptionConfigs.index0.index}}" + - name: "CREDENTIAL__ENCRYPTIONCONFIGS__0__CIPHERMODE" + value: "{{ .Values.issuer.credential.encryptionConfigs.index0.cipherMode}}" + - name: "CREDENTIAL__ENCRYPTIONCONFIGS__0__PADDINGMODE" + value: "{{ .Values.issuer.credential.encryptionConfigs.index0.paddingMode}}" + - name: "CREDENTIAL__ENCRYPTIONCONFIGS__0__ENCRYPTIONKEY" + valueFrom: + secretKeyRef: + name: "{{ .Values.interfaces.secret }}" + key: "credential-encryption-key0" + ports: + - name: http + containerPort: {{ .Values.portContainer }} + protocol: TCP + startupProbe: + httpGet: + path: {{ .Values.healthChecks.startup.path }} + port: {{ .Values.portContainer }} + scheme: HTTP + initialDelaySeconds: {{ .Values.startupProbe.initialDelaySeconds }} + periodSeconds: {{ .Values.startupProbe.periodSeconds }} + timeoutSeconds: {{ .Values.startupProbe.timeoutSeconds }} + successThreshold: {{ .Values.startupProbe.successThreshold }} + failureThreshold: {{ .Values.startupProbe.failureThreshold }} + livenessProbe: + httpGet: + path: {{ .Values.healthChecks.liveness.path }} + port: {{ .Values.portContainer }} + scheme: HTTP + initialDelaySeconds: {{ .Values.livenessProbe.initialDelaySeconds }} + periodSeconds: {{ .Values.livenessProbe.periodSeconds }} + timeoutSeconds: {{ .Values.livenessProbe.timeoutSeconds }} + successThreshold: {{ .Values.livenessProbe.successThreshold }} + failureThreshold: {{ .Values.livenessProbe.failureThreshold }} + readinessProbe: + httpGet: + path: {{ .Values.healthChecks.readyness.path }} + port: {{ .Values.portContainer }} + scheme: HTTP + initialDelaySeconds: {{ .Values.readinessProbe.initialDelaySeconds }} + periodSeconds: {{ .Values.readinessProbe.periodSeconds }} + timeoutSeconds: {{ .Values.readinessProbe.timeoutSeconds }} + successThreshold: {{ .Values.readinessProbe.successThreshold }} + failureThreshold: {{ .Values.readinessProbe.failureThreshold }} + resources: + {{- toYaml .Values.policyhub.resources | nindent 10 }} + {{- with .Values.nodeSelector }} + nodeSelector: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.affinity }} + affinity: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.tolerations }} + tolerations: + {{- toYaml . | nindent 8 }} + {{- end }} diff --git a/charts/ssi-credential-issuer/templates/ingress.yaml b/charts/ssi-credential-issuer/templates/ingress.yaml new file mode 100644 index 00000000..260cf005 --- /dev/null +++ b/charts/ssi-credential-issuer/templates/ingress.yaml @@ -0,0 +1,80 @@ +{{- /* +* Copyright (c) 2024 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 +*/}} + +{{- if .Values.ingress.enabled -}} +{{- $fullName := include "issuer.fullname" . -}} +{{- $svcPort := .Values.portService -}} +{{- if and .Values.ingress.className (not (semverCompare ">=1.18-0" .Capabilities.KubeVersion.GitVersion)) }} + {{- if not (hasKey .Values.ingress.annotations "kubernetes.io/ingress.class") }} + {{- $_ := set .Values.ingress.annotations "kubernetes.io/ingress.class" .Values.ingress.className}} + {{- end }} +{{- end }} +{{- if semverCompare ">=1.19-0" .Capabilities.KubeVersion.GitVersion -}} +apiVersion: networking.k8s.io/v1 +{{- else if semverCompare ">=1.14-0" .Capabilities.KubeVersion.GitVersion -}} +apiVersion: networking.k8s.io/v1beta1 +{{- else -}} +apiVersion: extensions/v1beta1 +{{- end }} +kind: Ingress +metadata: + name: {{ $fullName }} + labels: + {{- include "issuer.labels" . | nindent 4 }} + {{- with .Values.ingress.annotations }} + annotations: + {{- toYaml . | nindent 4 }} + {{- end }} +spec: + {{- if and .Values.ingress.className (semverCompare ">=1.18-0" .Capabilities.KubeVersion.GitVersion) }} + ingressClassName: {{ .Values.ingress.className }} + {{- end }} + {{- if .Values.ingress.tls }} + tls: + {{- range .Values.ingress.tls }} + - hosts: + {{- range .hosts }} + - {{ . | quote }} + {{- end }} + secretName: {{ .secretName }} + {{- end }} + {{- end }} + rules: + {{- range .Values.ingress.hosts }} + - host: {{ .host | quote }} + http: + paths: + {{- range .paths }} + - path: {{ .path }} + {{- if and .pathType (semverCompare ">=1.18-0" $.Capabilities.KubeVersion.GitVersion) }} + pathType: {{ .pathType }} + {{- end }} + backend: + {{- if semverCompare ">=1.19-0" $.Capabilities.KubeVersion.GitVersion }} + service: + name: {{ $fullName }} + port: + number: {{ $svcPort }} + {{- else }} + serviceName: {{ $fullName }} + servicePort: {{ .backend.port }} + {{- end }} + {{- end }} + {{- end }} +{{- end }} diff --git a/charts/ssi-credential-issuer/templates/job-issuer-migrations.yaml b/charts/ssi-credential-issuer/templates/job-issuer-migrations.yaml new file mode 100644 index 00000000..483942d7 --- /dev/null +++ b/charts/ssi-credential-issuer/templates/job-issuer-migrations.yaml @@ -0,0 +1,78 @@ +############################################################### +# Copyright (c) 2024 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 +############################################################### + +apiVersion: batch/v1 +kind: Job +metadata: + name: {{ include "issuer.fullname" . }}-migrations + annotations: + "batch.kubernetes.io/job-tracking": "true" + "helm.sh/hook": post-install,post-upgrade + "helm.sh/hook-weight": "-5" +spec: + template: + metadata: + labels: + {{- include "issuer.selectorLabels" . | nindent 8 }} + spec: + restartPolicy: Never + containers: + - name: {{ include "issuer.fullname" . }}-migrations + securityContext: + allowPrivilegeEscalation: false + capabilities: + drop: + - ALL + readOnlyRootFilesystem: true + runAsNonRoot: true + image: "{{ .Values.issuermigrations.image }}" + imagePullPolicy: "{{ .Values.issuermigrations.imagePullPolicy }}" + env: + - name: DOTNET_ENVIRONMENT + value: "{{ .Values.dotnetEnvironment }}" + {{- if .Values.postgresql.enabled }} + - name: "ISSUER_PASSWORD" + valueFrom: + secretKeyRef: + name: "{{ template "issuer.postgresSecretName" . }}" + key: "password" + - name: "CONNECTIONSTRINGS__ISSUERDB" + value: "Server={{ template "postgresql.primary.fullname" . }};Database={{ .Values.postgresql.auth.database }};Port={{ .Values.postgresql.auth.port }};User Id={{ .Values.postgresql.auth.username }};Password=$(ISSUER_PASSWORD);Ssl Mode={{ .Values.dbConnection.sslMode }};" + {{- end }} + {{- if not .Values.postgresql.enabled }} + - name: "ISSUER_PASSWORD" + valueFrom: + secretKeyRef: + name: "{{ .Values.externalDatabase.existingSecret }}" + key: "password" + - name: "CONNECTIONSTRINGS__ISSUERDB" + value: "Server={{ .Values.externalDatabase.host }};Database={{ .Values.externalDatabase.database }};Port={{ .Values.externalDatabase.port }};User Id={{ .Values.externalDatabase.username }};Password=$(ISSUER_PASSWORD);Ssl Mode={{ .Values.dbConnection.sslMode }};" + {{- end }} + - name: "SEEDING__TESTDATAENVIRONMENTS__0" + value: "{{ .Values.issuermigrations.seeding.testDataEnvironments }}" + - name: "SEEDING__DATAPATHS__0" + value: "{{ .Values.issuermigrations.seeding.testDataPaths }}" + - name: "SERILOG__MINIMUMLEVEL__Default" + value: "{{ .Values.issuermigrations.logging.default }}" + ports: + - name: http + containerPort: {{ .Values.portContainer }} + protocol: TCP + resources: + {{- toYaml .Values.issuermigrations.resources | nindent 10 }} diff --git a/charts/ssi-credential-issuer/templates/secret-external-db.yaml b/charts/ssi-credential-issuer/templates/secret-external-db.yaml new file mode 100644 index 00000000..e0449e7d --- /dev/null +++ b/charts/ssi-credential-issuer/templates/secret-external-db.yaml @@ -0,0 +1,39 @@ +{{- /* +* Copyright (c) 2024 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 +*/}} + +{{- if not .Values.postgresql.enabled -}} +apiVersion: v1 +kind: Secret +metadata: + name: {{ .Values.externalDatabase.existingSecret }} + namespace: {{ .Release.Namespace }} +type: Opaque +# use lookup function to check if secret exists +{{- $secret := (lookup "v1" "Secret" .Release.Namespace .Values.externalDatabase.existingSecret) }} +{{ if $secret -}} +data: + # if secret exists, use value provided from values file (to cover update scenario) or existing value from secret + # use data map instead of stringData to prevent base64 encoding of already base64-encoded existing value from secret + password: {{ ( .Values.externalDatabase.password | b64enc ) | default $secret.data.password | quote }} +{{ else -}} +stringData: + # if secret doesn't exist, use provided value from values file or generate a random one + password: {{ .Values.externalDatabase.password | default ( randAlphaNum 32 ) | quote }} +{{ end }} +{{- end -}} diff --git a/charts/ssi-credential-issuer/templates/secret-interfaces.yaml b/charts/ssi-credential-issuer/templates/secret-interfaces.yaml new file mode 100644 index 00000000..07b7e859 --- /dev/null +++ b/charts/ssi-credential-issuer/templates/secret-interfaces.yaml @@ -0,0 +1,46 @@ +############################################################### +# Copyright (c) 2024 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 +############################################################### + +apiVersion: v1 +kind: Secret +metadata: + name: {{ .Values.interfaces.secret }} + namespace: {{ .Release.Namespace }} + labels: + {{- include "portal.labels" . | nindent 4 }} +type: Opaque +# use lookup function to check if secret exists +{{- $secret := (lookup "v1" "Secret" .Release.Namespace .Values.interfaces.secret) }} +{{ if $secret -}} +data: + # if secret exists, use value provided from values file (to cover update scenario) or existing value from secret or generate a random one (if keys are added later on) + # use data map instead of stringData to prevent base64 encoding of already base64-encoded existing value from secret + # use index function for secret keys with hyphen otherwise '$secret.data.secretKey' works too + portal-client-secret: {{ coalesce ( .Values.processesworker.portal.clientSecret | b64enc ) ( index $secret.data "portal-client-secret" ) | default ( randAlphaNum 32 ) | quote }} + wallet-client-secret: {{ coalesce ( .Values.processesworker.wallet.clientSecret | b64enc ) ( index $secret.data "wallet-client-secret" ) | default ( randAlphaNum 32 ) | quote }} + credential-encryption-key0: {{ coalesce ( .Values.issuer.credential.encryptionConfigs.index0.encryptionKey | b64enc ) ( index $secret.data "credential-encryption-key" ) | default ( randAlphaNum 32 ) | quote }} + process-wallet-encryption-key0: {{ coalesce ( .Values.processesworker.wallet.encryptionConfigs.index0.encryptionKey | b64enc ) ( index $secret.data "process-wallet-encryption-key" ) | default ( randAlphaNum 32 ) | quote }} +{{ else -}} +stringData: + # if secret doesn't exist, use provided value from values file or generate a random one + portal-client-secret: {{ .Values.processesworker.portal.clientSecret | default ( randAlphaNum 32 ) | quote }} + wallet-client-secret: {{ .Values.processesworker.wallet.clientSecret | default ( randAlphaNum 32 ) | quote }} + credential-encryption-key0: {{ .Values.service.credential.encryptionConfigs.index0.encryptionKey | default ( randAlphaNum 32 ) | quote }} + process-wallet-encryption-key0: {{ .Values.processesworker.wallet.encryptionConfigs.index0.encryptionKey | default ( randAlphaNum 32 ) | quote }} +{{ end }} diff --git a/charts/ssi-credential-issuer/templates/secret-postgres.yaml b/charts/ssi-credential-issuer/templates/secret-postgres.yaml new file mode 100644 index 00000000..62c6cf82 --- /dev/null +++ b/charts/ssi-credential-issuer/templates/secret-postgres.yaml @@ -0,0 +1,45 @@ +{{- /* +* Copyright (c) 2024 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 +*/}} + +{{- if .Values.postgresql.enabled -}} +{{- $secretName := include "issuer.postgresSecretName" . -}} +apiVersion: v1 +kind: Secret +metadata: + name: {{ $secretName }} + namespace: {{ .Release.Namespace }} +type: Opaque +# use lookup function to check if secret exists +{{- $secret := (lookup "v1" "Secret" .Release.Namespace $secretName) }} +{{ if $secret -}} +data: + # if secret exists, use value provided from values file (to cover update scenario) or existing value from secret + # use data map instead of stringData to prevent base64 encoding of already base64-encoded existing value from secret + # use index function for secret keys with hyphen otherwise '$secret.data.secretKey' works too + postgres-password: {{ ( .Values.secrets.postgresql.auth.existingSecret.postgrespassword | b64enc ) | default ( index $secret.data "postgres-password" ) | quote }} + password: {{ ( .Values.secrets.postgresql.auth.existingSecret.password | b64enc ) | default $secret.data.password | quote }} + replication-password: {{ ( .Values.secrets.postgresql.auth.existingSecret.replicationPassword | b64enc ) | default ( index $secret.data "replication-password" ) | quote}} +{{ else -}} +stringData: + # if secret doesn't exist, use provided value from values file or generate a random one + postgres-password: {{ .Values.secrets.postgresql.auth.existingSecret.postgrespassword | default ( randAlphaNum 32 ) | quote }} + password: {{ .Values.secrets.postgresql.auth.existingSecret.password | default ( randAlphaNum 32 ) | quote }} + replication-password: {{ .Values.secrets.postgresql.auth.existingSecret.replicationPassword | default ( randAlphaNum 32 ) | quote }} +{{ end }} +{{- end -}} diff --git a/charts/ssi-credential-issuer/templates/service-credential-issuer.yaml b/charts/ssi-credential-issuer/templates/service-credential-issuer.yaml new file mode 100644 index 00000000..58a131e3 --- /dev/null +++ b/charts/ssi-credential-issuer/templates/service-credential-issuer.yaml @@ -0,0 +1,33 @@ +############################################################### +# Copyright (c) 2024 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 +############################################################### + +apiVersion: v1 +kind: Service +metadata: + name: {{ include "issuer.fullname" . }} + namespace: {{ .Values.namespace }} + labels: + {{- include "issuer.labels" . | nindent 4 }} +spec: + type: ClusterIP + ports: + - port: {{ .Values.portService }} + targetPort: {{ .Values.portContainer }} + selector: + {{- include "issuer.selectorLabels" . | nindent 4 }} diff --git a/charts/ssi-credential-issuer/values.yaml b/charts/ssi-credential-issuer/values.yaml new file mode 100644 index 00000000..14703db5 --- /dev/null +++ b/charts/ssi-credential-issuer/values.yaml @@ -0,0 +1,312 @@ +############################################################### +# Copyright (c) 2024 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 +############################################################### + +# -- Provide centralidp base address (CX IAM), without trailing '/auth'. +centralidpAddress: "https://centralidp.example.org" + +ingress: + # -- SSI Credential Issuer ingress parameters, + # enable ingress record generation for ssi-credential-issuer. + enabled: false + name: "ssi-credential-issuer" + className: "nginx" + annotations: + nginx.ingress.kubernetes.io/use-regex: "true" + nginx.ingress.kubernetes.io/enable-cors: "true" + nginx.ingress.kubernetes.io/proxy-body-size: "8m" + # -- Provide CORS allowed origin. + nginx.ingress.kubernetes.io/cors-allow-origin: "https://*.example.org" + tls: + # -- Provide tls secret. + - secretName: "" + # -- Provide host for tls secret. + hosts: + - "ssi-credential-issuer.example.org" + hosts: + # -- Provide default path for the ingress record. + - host: "ssi-credential-issuer.example.org" + paths: + - path: "/api/issuer" + pathType: "Prefix" + backend: + port: 8080 +dotnetEnvironment: "Production" +dbConnection: + schema: "issuer" + sslMode: "Disable" + +placeholder: "empty" + +keycloak: + central: + authRealm: "CX-Central" + jwtBearerOptions: + requireHttpsMetadata: "true" + metadataPath: "/auth/realms/CX-Central/.well-known/openid-configuration" + tokenValidationParameters: + validIssuerPath: "/auth/realms/CX-Central" + # -- TODO: Add Client + validAudience: "ClXX-CX-SSI" + refreshInterval: "00:00:30" + tokenPath: "/auth/realms/CX-Central/protocol/openid-connect/token" + # -- Flag if the api should be used with an leading /auth path + useAuthTrail: true +healthChecks: + startup: + path: "/health/startup" + liveness: + path: "/healthz" + readyness: + path: "/ready" + +issuer: + image: "docker.io/tractusx/credential-issuer-service:0.1.0-rc.1" + imagePullPolicy: "IfNotPresent" + # -- We recommend not to specify default resource limits and to leave this as a conscious choice for the user. + # If you do want to specify resource limits, uncomment the following lines and adjust them as necessary. + resources: + requests: + cpu: 15m + memory: 300M + # limits: + # cpu: 45m + # memory: 400M + logging: + businessLogic: "Information" + default: "Information" + healthChecks: + startup: + tags: + - name: "HEALTHCHECKS__0__TAGS__1" + value: "issuerdb" + swaggerEnabled: false + portal: + scope: "openid" + grantType: "client_credentials" + # -- Provide portal client-id from CX IAM centralidp. + clientId: "portal-client-id" + # -- Client-secret for portal client-id. Secret-key 'portal-client-secret'. + clientSecret: "" + credential: + issuerDid: "" + encryptionConfigIndex: 0 + encryptionConfigs: + index0: + index: 0 + cipherMode: "CBC" + paddingMode: "PKCS7" + # -- EncryptionKey for wallet. Secret-key 'credential-encryption-key0'. + # Expected format is 256 bit (64 digits) hex. + encryptionKey: "" + +issuermigrations: + image: "docker.io/tractusx/credential-issuer-migrations:0.1.0-rc.1" + imagePullPolicy: "IfNotPresent" + # -- We recommend not to specify default resource limits and to leave this as a conscious choice for the user. + # If you do want to specify resource limits, uncomment the following lines and adjust them as necessary. + resources: + requests: + cpu: 15m + memory: 105M + # limits: + # cpu: 45m + # memory: 105M + seeding: + testDataEnvironments: "" + testDataPaths: "Seeder/Data" + logging: + default: "Information" + +processesworker: + image: "docker.io/tractusx/credential-issuer-processes-worker:0.1.0-rc.1" + imagePullPolicy: "IfNotPresent" + # -- We recommend not to specify default resource limits and to leave this as a conscious choice for the user. + # If you do want to specify resource limits, uncomment the following lines and adjust them as necessary. + resources: + requests: + cpu: 15m + memory: 105M + # limits: + # cpu: 45m + # memory: 105M + logging: + default: "Information" + portal: + scope: "openid" + grantType: "client_credentials" + # -- Provide portal client-id from CX IAM centralidp. + clientId: "portal-client-id" + # -- Client-secret for portal client-id. Secret-key 'portal-client-secret'. + clientSecret: "" + processIdentity: + identityId: d21d2e8a-fe35-483c-b2b8-4100ed7f0953 + wallet: + scope: "openid" + grantType: "client_credentials" + # -- Provide wallet client-id from CX IAM centralidp. + clientId: "wallet-client-id" + # -- Client-secret for wallet client-id. Secret-key 'wallet-client-secret'. + clientSecret: "" + encryptionConfigIndex: 0 + encryptionConfigs: + index0: + index: 0 + cipherMode: "CBC" + paddingMode: "PKCS7" + # -- EncryptionKey for wallet. Secret-key 'process-wallet-encryption-key0'. + # Expected format is 256 bit (64 digits) hex. + encryptionKey: "" + +credentialexpiry: + image: "docker.io/tractusx/credential-expiry-app:0.1.0-rc.1" + imagePullPolicy: "IfNotPresent" + # -- We recommend not to specify default resource limits and to leave this as a conscious choice for the user. + # If you do want to specify resource limits, uncomment the following lines and adjust them as necessary. + resources: + requests: + cpu: 15m + memory: 105M + # limits: + # cpu: 45m + # memory: 105M + processIdentity: + identityId: d21d2e8a-fe35-483c-b2b8-4100ed7f0953 + logging: + default: "Information" + expiry: + expiredVcsToDeleteInMonth: 12 + inactiveVcsToDeleteInWeeks: 12 + +postgresql: + # -- PostgreSQL chart configuration; + # default configurations: + # host: "issuer-postgresql-primary", + # port: 5432; + # Switch to enable or disable the PostgreSQL helm chart. + enabled: true + auth: + # -- Non-root username. + username: issuer + # -- Database name. + database: issuer + # -- Secret containing the passwords for root usernames postgres and non-root username issuer. + # Should not be changed without changing the "issuer-postgresSecretName" template as well. + existingSecret: "{{ .Release.Name }}-issuer-postgres" + architecture: replication + audit: + pgAuditLog: "write, ddl" + logLinePrefix: "%m %u %d " + primary: + # -- Extended PostgreSQL Primary configuration (increase of max_connections recommended - default is 100) + extendedConfiguration: "" + initdb: + scriptsConfigMap: "{{ .Release.Name }}-issuer-cm-postgres" + readReplicas: + # -- Extended PostgreSQL read only replicas configuration (increase of max_connections recommended - default is 100) + extendedConfiguration: "" + +externalDatabase: + # -- External PostgreSQL configuration + # IMPORTANT: non-root db user needs to be created beforehand on external database. + # And the init script (02-init-db.sql) available in templates/configmap-postgres-init.yaml + # needs to be executed beforehand. + # Database host ('-primary' is added as postfix). + host: "issuer-postgres-ext" + # -- Database port number. + port: 5432 + # -- Non-root username for issuer. + user: "issuer" + # -- Database name. + database: "issuer" + # -- Password for the non-root username (default 'issuer'). Secret-key 'password'. + password: "" + # -- Secret containing the password non-root username, (default 'issuer'). + existingSecret: "issuer-external-db" + # -- Name of an existing secret key containing the database credentials. + existingSecretPasswordKey: "password" + +secrets: + postgresql: + auth: + existingSecret: + # -- Password for the root username 'postgres'. Secret-key 'postgres-password'. + postgrespassword: "" + # -- Password for the non-root username 'issuer'. Secret-key 'password'. + password: "" + # -- Password for the non-root username 'repl_user'. Secret-key 'replication-password'. + replicationPassword: "" + +interfaces: + # -- Secret containing the client-secrets for the connection to portal and wallet. + secret: "secret-interfaces" + +portContainer: 8080 + +portService: 8080 + +replicaCount: 3 + +# -- Node labels for pod assignment +nodeSelector: {} + +# -- Tolerations for pod assignment +tolerations: [] + +affinity: +# -- Following Catena-X Helm Best Practices, +# [reference](https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#affinity-and-anti-affinity). + podAntiAffinity: + preferredDuringSchedulingIgnoredDuringExecution: + - weight: 100 + podAffinityTerm: + labelSelector: + matchExpressions: + - key: app.kubernetes.io/name + operator: DoesNotExist + topologyKey: kubernetes.io/hostname + +updateStrategy: +# -- Update strategy type, +# rolling update configuration parameters, +# [reference](https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/#update-strategies). + type: RollingUpdate + rollingUpdate: + maxSurge: 1 + maxUnavailable: 0 + +# -- Following Catena-X Helm Best Practices, +# [reference](https://github.com/helm/charts/blob/master/stable/nginx-ingress/values.yaml#L210). +startupProbe: + failureThreshold: 30 + initialDelaySeconds: 10 + periodSeconds: 10 + successThreshold: 1 + timeoutSeconds: 1 +livenessProbe: + failureThreshold: 3 + initialDelaySeconds: 10 + periodSeconds: 10 + successThreshold: 1 + timeoutSeconds: 10 +readinessProbe: + failureThreshold: 3 + initialDelaySeconds: 10 + periodSeconds: 10 + successThreshold: 1 + timeoutSeconds: 1 diff --git a/consortia/argocd-app-templates/appsetup-beta.yaml b/consortia/argocd-app-templates/appsetup-beta.yaml new file mode 100644 index 00000000..e2c1676b --- /dev/null +++ b/consortia/argocd-app-templates/appsetup-beta.yaml @@ -0,0 +1,38 @@ +############################################################### +# Copyright (c) 2024 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 +############################################################### + +apiVersion: argoproj.io/v1alpha1 +kind: Application +metadata: + name: ssi-credential-issuer +spec: + destination: + namespace: product-portal + server: 'https://kubernetes.default.svc' + source: + path: charts/ssi-credential-issuer + repoURL: 'https://github.com/eclipse-tractusx/ssi-credential-issuer.git' + targetRevision: ssi-credential-issuer-1.0.0 + plugin: + env: + - name: AVP_SECRET + value: vault-secret + - name: helm_args + value: '-f values.yaml -f ../../consortia/environments/values-beta.yaml' + project: project-portal diff --git a/consortia/argocd-app-templates/appsetup-dev.yaml b/consortia/argocd-app-templates/appsetup-dev.yaml new file mode 100644 index 00000000..26edc4fa --- /dev/null +++ b/consortia/argocd-app-templates/appsetup-dev.yaml @@ -0,0 +1,41 @@ +############################################################### +# Copyright (c) 2024 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 +############################################################### + +apiVersion: argoproj.io/v1alpha1 +kind: Application +metadata: + name: ssi-credential-issuer +spec: + destination: + namespace: product-portal + server: 'https://kubernetes.default.svc' + source: + path: charts/ssi-credential-issuer + repoURL: 'https://github.com/eclipse-tractusx/ssi-credential-issuer.git' + targetRevision: dev + plugin: + env: + - name: AVP_SECRET + value: vault-secret + - name: helm_args + value: '-f values.yaml -f ../../consortia/environments/values-dev.yaml' + project: project-portal + syncPolicy: + automated: + prune: true diff --git a/consortia/argocd-app-templates/appsetup-int.yaml b/consortia/argocd-app-templates/appsetup-int.yaml new file mode 100644 index 00000000..4935920b --- /dev/null +++ b/consortia/argocd-app-templates/appsetup-int.yaml @@ -0,0 +1,38 @@ +############################################################### +# Copyright (c) 2024 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 +############################################################### + +apiVersion: argoproj.io/v1alpha1 +kind: Application +metadata: + name: ssi-credential-issuer +spec: + destination: + namespace: product-portal + server: 'https://kubernetes.default.svc' + source: + path: charts/ssi-credential-issuer + repoURL: 'https://github.com/eclipse-tractusx/ssi-credential-issuer.git' + targetRevision: ssi-credential-issuer-0.1.0-rc.1 + plugin: + env: + - name: AVP_SECRET + value: vault-secret + - name: helm_args + value: '-f values.yaml -f ../../consortia/environments/values-int.yaml' + project: project-portal diff --git a/consortia/argocd-app-templates/appsetup-pen.yaml b/consortia/argocd-app-templates/appsetup-pen.yaml new file mode 100644 index 00000000..d0080389 --- /dev/null +++ b/consortia/argocd-app-templates/appsetup-pen.yaml @@ -0,0 +1,38 @@ +############################################################### +# Copyright (c) 2024 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 +############################################################### + +apiVersion: argoproj.io/v1alpha1 +kind: Application +metadata: + name: ssi-credential-issuer-pen +spec: + destination: + namespace: product-portal-pen + server: 'https://kubernetes.default.svc' + source: + path: charts/ssi-credential-issuer + repoURL: 'https://github.com/eclipse-tractusx/ssi-credential-issuer.git' + targetRevision: ssi-credential-issuer-0.1.0-rc.1 + plugin: + env: + - name: AVP_SECRET + value: vault-secret + - name: helm_args + value: '-f values.yaml -f ../../consortia/environments/values-pen.yaml' + project: project-portal diff --git a/consortia/argocd-app-templates/appsetup-rc.yaml b/consortia/argocd-app-templates/appsetup-rc.yaml new file mode 100644 index 00000000..5809c12a --- /dev/null +++ b/consortia/argocd-app-templates/appsetup-rc.yaml @@ -0,0 +1,38 @@ +############################################################### +# Copyright (c) 2024 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 +############################################################### + +apiVersion: argoproj.io/v1alpha1 +kind: Application +metadata: + name: ssi-credential-issuer-rc +spec: + destination: + namespace: product-iam + server: 'https://kubernetes.default.svc' + source: + path: charts/ssi-credential-issuer + repoURL: 'https://github.com/eclipse-tractusx/ssi-credential-issuer.git' + targetRevision: release-candidate + plugin: + env: + - name: AVP_SECRET + value: vault-secret + - name: helm_args + value: '-f values.yaml -f ../../consortia/environments/values-rc.yaml' + project: project-portal diff --git a/consortia/argocd-app-templates/appsetup-stable.yaml b/consortia/argocd-app-templates/appsetup-stable.yaml new file mode 100644 index 00000000..431a5c5b --- /dev/null +++ b/consortia/argocd-app-templates/appsetup-stable.yaml @@ -0,0 +1,77 @@ +############################################################### +# Copyright (c) 2024 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 +############################################################### + +apiVersion: argoproj.io/v1alpha1 +kind: Application +metadata: + name: ssi-credential-issuer +spec: + destination: + name: '' + namespace: product-portal + server: 'https://kubernetes.default.svc' + source: + path: '' + repoURL: 'https://eclipse-tractusx.github.io/charts/dev' + targetRevision: ssi-credential-issuer-0.1.0-rc.1 + plugin: + env: + - name: HELM_VALUES + value: | + issuerBackendAddress: "https://ssi-credential-issuer.stable.demo.catena-x.net" + ingress: + enabled: true + className: "nginx" + annotations: + nginx.ingress.kubernetes.io/use-regex: "true" + nginx.ingress.kubernetes.io/enable-cors: "true" + nginx.ingress.kubernetes.io/proxy-body-size: "8m" + nginx.ingress.kubernetes.io/cors-allow-origin: "http://localhost:3000, https://*.stable.demo.catena-x.net" + tls: + - secretName: "tls-secret" + hosts: + - "ssi-credential-issuer.stable.demo.catena-x.net" + hosts: + - host: "ssi-credential-issuer.stable.demo.catena-x.net" + paths: + - path: "/api/issuer" + pathType: "Prefix" + backend: + service: "issuer-service" + port: 8080 + issuermigrations: + logging: + default: "Debug" + postgresql: + primary: + extendedConfiguration: | + max_connections = 200 + readReplicas: + extendedConfiguration: | + max_connections = 200 + secrets: + postgresql: + auth: + existingSecret: + postgrespassword: "" + password: "" + replicationPassword: "" + chart: ssi-credential-issuer + sources: [] + project: project-portal diff --git a/consortia/argocd-app-templates/appsetup-upgrade.yaml b/consortia/argocd-app-templates/appsetup-upgrade.yaml new file mode 100644 index 00000000..1b6c83fd --- /dev/null +++ b/consortia/argocd-app-templates/appsetup-upgrade.yaml @@ -0,0 +1,38 @@ +############################################################### +# Copyright (c) 2024 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 +############################################################### + +apiVersion: argoproj.io/v1alpha1 +kind: Application +metadata: + name: ssi-credential-issuer +spec: + destination: + namespace: product-portal + server: 'https://kubernetes.default.svc' + source: + path: charts/ssi-credential-issuer + repoURL: 'https://github.com/eclipse-tractusx/ssi-credential-issuer.git' + targetRevision: ssi-credential-issuer-1.0.0 + plugin: + env: + - name: AVP_SECRET + value: vault-secret + - name: helm_args + value: '-f values.yaml -f ../../consortia/environments/values-upgrade.yaml' + project: project-portal diff --git a/consortia/environments/values-beta.yaml b/consortia/environments/values-beta.yaml new file mode 100644 index 00000000..d6daf091 --- /dev/null +++ b/consortia/environments/values-beta.yaml @@ -0,0 +1,63 @@ +############################################################### +# Copyright (c) 2024 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 +############################################################### + +centralidpAddress: "https://centralidp.beta.demo.catena-x.net" + +ingress: + enabled: true + className: "nginx" + annotations: + nginx.ingress.kubernetes.io/use-regex: "true" + nginx.ingress.kubernetes.io/enable-cors: "true" + nginx.ingress.kubernetes.io/proxy-body-size: "8m" + nginx.ingress.kubernetes.io/cors-allow-origin: "http://localhost:3000, https://*.beta.demo.catena-x.net" + tls: + - secretName: "tls-secret" + hosts: + - "ssi-credential-issuer.beta.demo.catena-x.net" + hosts: + - host: "ssi-credential-issuer.beta.demo.catena-x.net" + paths: + - path: "/api/issuer" + pathType: "Prefix" + backend: + port: 8080 + +issuer: + swaggerEnabled: true + +issuermigrations: + logging: + default: "Debug" + +processesworker: + logging: + default: "Debug" + +credentialexpiry: + logging: + default: "Debug" + +secrets: + postgresql: + auth: + existingSecret: + postgrespassword: "" + password: "" + replicationPassword: "" diff --git a/consortia/environments/values-dev.yaml b/consortia/environments/values-dev.yaml new file mode 100644 index 00000000..71435d3a --- /dev/null +++ b/consortia/environments/values-dev.yaml @@ -0,0 +1,77 @@ +############################################################### +# Copyright (c) 2024 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 +############################################################### + +centralidpAddress: "https://centralidp.dev.demo.catena-x.net" + +ingress: + enabled: true + className: "nginx" + annotations: + nginx.ingress.kubernetes.io/use-regex: "true" + nginx.ingress.kubernetes.io/enable-cors: "true" + nginx.ingress.kubernetes.io/proxy-body-size: "8m" + nginx.ingress.kubernetes.io/cors-allow-origin: "http://localhost:3000, https://*.dev.demo.catena-x.net" + tls: + - secretName: "tls-secret" + hosts: + - "ssi-credential-issuer.dev.demo.catena-x.net" + hosts: + - host: "ssi-credential-issuer.dev.demo.catena-x.net" + paths: + - path: "/api/issuer" + pathType: "Prefix" + backend: + port: 8080 + +keycloak: + central: + jwtBearerOptions: + tokenValidationParameters: + validAudience: "ClXX-CX-ISSUER" + +issuer: + image: "docker.io/tractusx/ssi-credential-issuer-service:dev" + imagePullPolicy: "Always" + swaggerEnabled: true + +issuermigrations: + image: "docker.io/tractusx/ssi-credential-issuer-migrations:dev" + imagePullPolicy: "Always" + logging: + default: "Debug" + +processesworker: + image: "docker.io/tractusx/ssi-credential-issuer-processes-worker:dev" + imagePullPolicy: "Always" + logging: + default: "Debug" + +credentialexpiry: + image: "docker.io/tractusx/ssi-credential-expiry-app:dev" + imagePullPolicy: "Always" + logging: + default: "Debug" + +secrets: + postgresql: + auth: + existingSecret: + postgrespassword: "" + password: "" + replicationPassword: "" diff --git a/consortia/environments/values-int.yaml b/consortia/environments/values-int.yaml new file mode 100644 index 00000000..591f698f --- /dev/null +++ b/consortia/environments/values-int.yaml @@ -0,0 +1,70 @@ +############################################################### +# Copyright (c) 2024 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 +############################################################### + + +centralidpAddress: "https://centralidp.int.demo.catena-x.net" + +ingress: + enabled: true + className: "nginx" + annotations: + nginx.ingress.kubernetes.io/use-regex: "true" + nginx.ingress.kubernetes.io/enable-cors: "true" + nginx.ingress.kubernetes.io/proxy-body-size: "8m" + nginx.ingress.kubernetes.io/cors-allow-origin: "http://localhost:3000, https://*.int.demo.catena-x.net" + tls: + - secretName: "tls-secret" + hosts: + - "ssi-credential-issuer.int.demo.catena-x.net" + hosts: + - host: "ssi-credential-issuer.int.demo.catena-x.net" + paths: + - path: "/api/issuer" + pathType: "Prefix" + backend: + port: 8080 + +keycloak: + central: + jwtBearerOptions: + tokenValidationParameters: + validAudience: "ClXX-CX-Issuer" + +issuer: + swaggerEnabled: true + +issuermigrations: + logging: + default: "Debug" + +processesworker: + logging: + default: "Debug" + +credentialexpiry: + logging: + default: "Debug" + +secrets: + postgresql: + auth: + existingSecret: + postgrespassword: "" + password: "" + replicationPassword: "" diff --git a/consortia/environments/values-pen.yaml b/consortia/environments/values-pen.yaml new file mode 100644 index 00000000..2d364dfd --- /dev/null +++ b/consortia/environments/values-pen.yaml @@ -0,0 +1,63 @@ +############################################################### +# Copyright (c) 2024 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 +############################################################### + +centralidpAddress: "https://centralidp-pen.dev.demo.catena-x.net" + +ingress: + enabled: true + className: "nginx" + annotations: + nginx.ingress.kubernetes.io/use-regex: "true" + nginx.ingress.kubernetes.io/enable-cors: "true" + nginx.ingress.kubernetes.io/proxy-body-size: "8m" + nginx.ingress.kubernetes.io/cors-allow-origin: "http://localhost:3000, https://*.dev.demo.catena-x.net" + tls: + - secretName: "tls-secret" + hosts: + - "ssi-credential-issuer-backend-pen.dev.demo.catena-x.net" + hosts: + - host: "ssi-credential-issuer-backend-pen.dev.demo.catena-x.net" + paths: + - path: "/api/issuer" + pathType: "Prefix" + backend: + port: 8080 + +issuer: + swaggerEnabled: true + +issuermigrations: + logging: + default: "Debug" + +processesworker: + logging: + default: "Debug" + +credentialexpiry: + logging: + default: "Debug" + +secrets: + postgresql: + auth: + existingSecret: + postgrespassword: "" + password: "" + replicationPassword: "" diff --git a/consortia/environments/values-rc.yaml b/consortia/environments/values-rc.yaml new file mode 100644 index 00000000..d620f21a --- /dev/null +++ b/consortia/environments/values-rc.yaml @@ -0,0 +1,71 @@ +############################################################### +# Copyright (c) 2024 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 +############################################################### + +centralidpAddress: "https://centralidp-rc.dev.demo.catena-x.net" + +ingress: + enabled: true + className: "nginx" + annotations: + nginx.ingress.kubernetes.io/use-regex: "true" + nginx.ingress.kubernetes.io/enable-cors: "true" + nginx.ingress.kubernetes.io/proxy-body-size: "8m" + nginx.ingress.kubernetes.io/cors-allow-origin: "http://localhost:3000, https://*.dev.demo.catena-x.net" + tls: + - secretName: "tls-secret" + hosts: + - "ssi-credential-issuer-backend-rc.dev.demo.catena-x.net" + hosts: + - host: "ssi-credential-issuer-backend-rc.dev.demo.catena-x.net" + paths: + - path: "/api/issuer" + pathType: "Prefix" + backend: + port: 8080 + +issuer: + image: "docker.io/tractusx/ssi-credential-issuer-service:rc" + imagePullPolicy: "Always" + swaggerEnabled: true + +issuermigrations: + image: "docker.io/tractusx/ssi-credential-issuer-migrations:rc" + imagePullPolicy: "Always" + logging: + default: "Debug" + +processesworker: + image: "docker.io/tractusx/ssi-credential-issuer-processes-worker:rc" + imagePullPolicy: "Always" + logging: + default: "Debug" + +credentialexpiry: + image: "docker.io/tractusx/ssi-credential-expiry-app:rc" + imagePullPolicy: "Always" + logging: + default: "Debug" + +secrets: + postgresql: + auth: + existingSecret: + postgrespassword: "" + password: "" + replicationPassword: "" diff --git a/consortia/environments/values-upgrade.yaml b/consortia/environments/values-upgrade.yaml new file mode 100644 index 00000000..6acf1c37 --- /dev/null +++ b/consortia/environments/values-upgrade.yaml @@ -0,0 +1,28 @@ +############################################################### +# Copyright (c) 2024 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 +############################################################### + +replicaCount: 0 + +secrets: + postgresql: + auth: + existingSecret: + postgrespassword: "" + password: "" + replicationPassword: "" diff --git a/docker/Dockerfile-credential-expiry-app b/docker/Dockerfile-credential-expiry-app new file mode 100644 index 00000000..d9205364 --- /dev/null +++ b/docker/Dockerfile-credential-expiry-app @@ -0,0 +1,35 @@ +############################################################### +# Copyright (c) 2024 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 +############################################################### + +FROM mcr.microsoft.com/dotnet/runtime:7.0-alpine AS base + +FROM mcr.microsoft.com/dotnet/sdk:7.0-alpine-amd64 AS publish +WORKDIR / +COPY LICENSE NOTICE.md DEPENDENCIES / +COPY src/ src/ +RUN dotnet restore "src/credentials/SsiCredentialIssuer.Expiry.App/SsiCredentialIssuer.Expiry.csproj" +WORKDIR /src/credentials/Credential.App +RUN dotnet publish "SsiCredentialIssuer.Expiry.csproj" -c Release -o /app/publish + +FROM base AS final +WORKDIR /app +COPY --from=publish /app/publish . +RUN chown -R 1000:3000 /app +USER 1000:3000 +ENTRYPOINT ["dotnet", "Org.Eclipse.TractusX.SsiCredentialIssuer.Credential.App.dll"] diff --git a/docker/Dockerfile-credential-issuer-migrations b/docker/Dockerfile-credential-issuer-migrations new file mode 100644 index 00000000..b0dbbc67 --- /dev/null +++ b/docker/Dockerfile-credential-issuer-migrations @@ -0,0 +1,35 @@ +############################################################### +# Copyright (c) 2024 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 +############################################################### + +FROM mcr.microsoft.com/dotnet/runtime:7.0-alpine AS base + +FROM mcr.microsoft.com/dotnet/sdk:7.0-alpine-amd64 AS publish +WORKDIR / +COPY LICENSE NOTICE.md DEPENDENCIES / +COPY /src/database /src/database +WORKDIR /src/database/SsiCredentialIssuer.Migrations +RUN dotnet publish "SsiCredentialIssuer.Migrations.csproj" -c Release -o /migrations/publish + +FROM base AS final +ENV COMPlus_EnableDiagnostics=0 +WORKDIR /migrations +COPY --from=publish /migrations/publish . +RUN chown -R 1000:3000 /migrations +USER 1000:3000 +ENTRYPOINT ["dotnet", "Org.Eclipse.TractusX.SsiCredentialIssuer.Migrations.dll"] diff --git a/docker/Dockerfile-credential-issuer-processes-worker b/docker/Dockerfile-credential-issuer-processes-worker new file mode 100644 index 00000000..68a10ee8 --- /dev/null +++ b/docker/Dockerfile-credential-issuer-processes-worker @@ -0,0 +1,36 @@ +############################################################### +# Copyright (c) 2024 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 +############################################################### + +FROM mcr.microsoft.com/dotnet/runtime:7.0-alpine AS base + +FROM mcr.microsoft.com/dotnet/sdk:7.0-alpine-amd64 AS publish +WORKDIR / +COPY LICENSE NOTICE.md DEPENDENCIES / +COPY src/ src/ +RUN dotnet restore "src/processes/Processes.Worker/Processes.Worker.csproj" +WORKDIR /src/processes/Processes.Worker +RUN dotnet publish "Processes.Worker.csproj" -c Release -o /app/publish + +FROM base AS final +WORKDIR /app +COPY --from=publish /app/publish . + +RUN chown -R 1000:3000 /app +USER 1000:3000 +ENTRYPOINT ["dotnet", "Org.Eclipse.TractusX.SsiCredentialIssuer.Processes.Worker.dll"] diff --git a/docker/Dockerfile-credential-issuer-service b/docker/Dockerfile-credential-issuer-service new file mode 100644 index 00000000..6747b1e0 --- /dev/null +++ b/docker/Dockerfile-credential-issuer-service @@ -0,0 +1,37 @@ +############################################################### +# Copyright (c) 2024 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 +############################################################### + +FROM mcr.microsoft.com/dotnet/aspnet:7.0-alpine AS base + +FROM mcr.microsoft.com/dotnet/sdk:7.0-alpine-amd64 AS publish +WORKDIR / +COPY LICENSE NOTICE.md DEPENDENCIES / +COPY src/ src/ +WORKDIR /src/issuer/SsiCredentialIssuer.Service +RUN dotnet publish "SsiCredentialIssuer.Service.csproj" -c Release -o /app/publish + +FROM base AS final +ENV COMPlus_EnableDiagnostics=0 +WORKDIR /app +COPY --from=publish /app/publish . +ENV ASPNETCORE_URLS http://+:8080 +EXPOSE 8080 +RUN chown -R 1000:3000 /app +USER 1000:3000 +ENTRYPOINT ["dotnet", "Org.Eclipse.TractusX.SsiCredentialIssuer.Service.dll"] diff --git a/docker/notice-credential-expiry-app.md b/docker/notice-credential-expiry-app.md new file mode 100644 index 00000000..3cecccb3 --- /dev/null +++ b/docker/notice-credential-expiry-app.md @@ -0,0 +1,22 @@ +## Notice for Docker image + +DockerHub: [https://hub.docker.com/r/tractusx/credential-expiry-app](https://hub.docker.com/r/tractusx/credential-expiry-app) + +Eclipse Tractus-X product(s) installed within the image: + +__Credential Expiry App__ + +- GitHub: https://github.com/eclipse-tractusx/ssi-credential-issuer +- Project home: https://projects.eclipse.org/projects/automotive.tractusx +- Dockerfile: https://github.com/eclipse-tractusx/ssi-credential-issuer/blob/main/docker/Dockerfile-credential-expiry-app +- Project license: [Apache License, Version 2.0](https://github.com/eclipse-tractusx/ssi-credential-issuer/blob/main/LICENSE) + +__Used base images__ + +- Dockerfile: [mcr.microsoft.com/dotnet/runtime:7.0-alpine](https://github.com/dotnet/dotnet-docker/blob/main/src/runtime/7.0/alpine3.19/amd64/Dockerfile) +- GitHub project: [https://github.com/dotnet/dotnet-docker](https://github.com/dotnet/dotnet-docker) +- DockerHub: [https://hub.docker.com/_/microsoft-dotnet-runtime](https://hub.docker.com/_/microsoft-dotnet-runtime) + +As with all Docker images, these likely also contain other software which may be under other licenses (such as Bash, etc from the base distribution, along with any direct or indirect dependencies of the primary software being contained). + +As for any pre-built image usage, it is the image user's responsibility to ensure that any use of this image complies with any relevant licenses for all software contained within. diff --git a/docker/notice-credential-issuer-migrations.md b/docker/notice-credential-issuer-migrations.md new file mode 100644 index 00000000..41bc069c --- /dev/null +++ b/docker/notice-credential-issuer-migrations.md @@ -0,0 +1,22 @@ +## Notice for Docker image + +DockerHub: [https://hub.docker.com/r/tractusx/credential-issuer-migrations](https://hub.docker.com/r/tractusx/credential-issuer-migrations) + +Eclipse Tractus-X product(s) installed within the image: + +__Credential Issuer Migrations__ + +- GitHub: https://github.com/eclipse-tractusx/ssi-credential-issuer +- Project home: https://projects.eclipse.org/projects/automotive.tractusx +- Dockerfile: https://github.com/eclipse-tractusx/ssi-credential-issuer/blob/main/docker/Dockerfile-credential-issuer-migrations +- Project license: [Apache License, Version 2.0](https://github.com/eclipse-tractusx/ssi-credential-issuer/blob/main/LICENSE) + +__Used base images__ + +- Dockerfile: [mcr.microsoft.com/dotnet/runtime:7.0-alpine](https://github.com/dotnet/dotnet-docker/blob/main/src/runtime/7.0/alpine3.19/amd64/Dockerfile) +- GitHub project: [https://github.com/dotnet/dotnet-docker](https://github.com/dotnet/dotnet-docker) +- DockerHub: [https://hub.docker.com/_/microsoft-dotnet-runtime](https://hub.docker.com/_/microsoft-dotnet-runtime) + +As with all Docker images, these likely also contain other software which may be under other licenses (such as Bash, etc from the base distribution, along with any direct or indirect dependencies of the primary software being contained). + +As for any pre-built image usage, it is the image user's responsibility to ensure that any use of this image complies with any relevant licenses for all software contained within. diff --git a/docker/notice-credential-issuer-processes-worker.md b/docker/notice-credential-issuer-processes-worker.md new file mode 100644 index 00000000..451c764d --- /dev/null +++ b/docker/notice-credential-issuer-processes-worker.md @@ -0,0 +1,22 @@ +## Notice for Docker image + +DockerHub: [https://hub.docker.com/r/tractusx/credential-issuer-processes-worker](https://hub.docker.com/r/tractusx/credential-issuer-processes-worker) + +Eclipse Tractus-X product(s) installed within the image: + +Issuer Checklist Worker__ + +- GitHub: https://github.com/eclipse-tractusx/ssi-credential-issuer +- Project home: https://projects.eclipse.org/projects/automotive.tractusx +- Dockerfile: https://github.com/eclipse-tractusx/ssi-credential-issuer/blob/main/docker/Dockerfile-credential-issuer-processes-worker +- Project license: [Apache License, Version 2.0](https://github.com/eclipse-tractusx/ssi-credential-issuer/blob/main/LICENSE) + +__Used base images__ + +- Dockerfile: [mcr.microsoft.com/dotnet/runtime:7.0-alpine](https://github.com/dotnet/dotnet-docker/blob/main/src/runtime/7.0/alpine3.17/amd64/Dockerfile) +- GitHub project: [https://github.com/dotnet/dotnet-docker](https://github.com/dotnet/dotnet-docker) +- DockerHub: [https://hub.docker.com/_/microsoft-dotnet-runtime](https://hub.docker.com/_/microsoft-dotnet-runtime) + +As with all Docker images, these likely also contain other software which may be under other licenses (such as Bash, etc from the base distribution, along with any direct or indirect dependencies of the primary software being contained). + +As for any pre-built image usage, it is the image user's responsibility to ensure that any use of this image complies with any relevant licenses for all software contained within. diff --git a/docker/notice-credential-issuer-service.md b/docker/notice-credential-issuer-service.md new file mode 100644 index 00000000..138a4597 --- /dev/null +++ b/docker/notice-credential-issuer-service.md @@ -0,0 +1,22 @@ +## Notice for Docker image + +DockerHub: [https://hub.docker.com/r/tractusx/ssi-credential-issuer-service](https://hub.docker.com/r/tractusx/ssi-credential-issuer-service) + +Eclipse Tractus-X product(s) installed within the image: + +__Policy Hub Service__ + +- GitHub: https://github.com/eclipse-tractusx/ssi-credential-issuer +- Project home: https://projects.eclipse.org/projects/automotive.tractusx +- Dockerfile: https://github.com/eclipse-tractusx/ssi-credential-issuer/blob/main/docker/Dockerfile-credential-issuer-service +- Project license: [Apache License, Version 2.0](https://github.com/eclipse-tractusx/ssi-credential-issuer/blob/main/LICENSE) + +__Used base images__ + +- Dockerfile: [mcr.microsoft.com/dotnet/aspnet:7.0-alpine](https://github.com/dotnet/dotnet-docker/blob/main/src/aspnet/7.0/alpine3.19/amd64/Dockerfile) +- GitHub project: [https://github.com/dotnet/dotnet-docker](https://github.com/dotnet/dotnet-docker) +- DockerHub: [https://hub.docker.com/_/microsoft-dotnet-aspnet](https://hub.docker.com/_/microsoft-dotnet-aspnet) + +As with all Docker images, these likely also contain other software which may be under other licenses (such as Bash, etc from the base distribution, along with any direct or indirect dependencies of the primary software being contained). + +As for any pre-built image usage, it is the image user's responsibility to ensure that any use of this image complies with any relevant licenses for all software contained within. diff --git a/src/credentials/SsiCredentialIssuer.Expiry.App.app/appsettings.json b/src/credentials/SsiCredentialIssuer.Expiry.App.app/appsettings.json index d559eeb4..1dc77f56 100644 --- a/src/credentials/SsiCredentialIssuer.Expiry.App.app/appsettings.json +++ b/src/credentials/SsiCredentialIssuer.Expiry.App.app/appsettings.json @@ -7,7 +7,7 @@ "Microsoft": "Warning", "System": "Information", "Microsoft.Hosting.Lifetime": "Information", - "Org.Eclipse.TractusX.Portal.Backend": "Information" + "Org.Eclipse.TractusX.SsiCredentialIssuer": "Information" } }, "WriteTo": [ @@ -17,40 +17,16 @@ "FromLogContext" ], "Properties": { - "Application": "Org.Eclipse.TractusX.Portal.Backend.Maintenance.App" + "Application": "Org.Eclipse.TractusX.SsiCredentialIssuer.Expiry.App" } }, "ConnectionStrings": { - "PortalDb": "Server=placeholder;Database=placeholder;Port=5432;User Id=placeholder;Password=placeholder;Ssl Mode=Disable;" + "IssuerDb": "Server=placeholder;Database=placeholder;Port=5432;User Id=placeholder;Password=placeholder;Ssl Mode=Disable;" }, "Expiry": { "ExpiredVcsToDeleteInMonth": 12, "InactiveVcsToDeleteInWeeks": 12 }, - "MailingService": { - "Templates": [ - { - "Name": "CredentialRejected", - "Setting": { - "Subject": "Company Wallet - SSI Credential Request Rejected", - "EmailTemplateType": "CredentialRejected" - } - }, - { - "Name": "CredentialExpiry", - "Setting": { - "Subject": "Company Wallet - SSI Credential Expired", - "EmailTemplateType": "CredentialExpiry" - } - } - ], - "Mail": { - "SmtpHost": "", - "SmtpPort": 587, - "SmtpUser": "", - "SmtpPassword": "" - } - }, "ProcessIdentity": { "ProcessUserId": "" } diff --git a/src/issuer/SsiCredentialIssuer.Service/appsettings.json b/src/issuer/SsiCredentialIssuer.Service/appsettings.json index 477b3766..067a0d57 100644 --- a/src/issuer/SsiCredentialIssuer.Service/appsettings.json +++ b/src/issuer/SsiCredentialIssuer.Service/appsettings.json @@ -18,7 +18,7 @@ "WithCorrelationId" ], "Properties": { - "Application": "SsiCredentialIssuer" + "Application": "SsiCredentialIssuer.Service" } }, "SwaggerEnabled": "", @@ -56,7 +56,7 @@ "Credential": { "IssuerDid": "", "MaxPageSize": 15, - "EncrptionConfigIndex": 0, + "EncryptionConfigIndex": 0, "EncryptionConfigs": [ { "Index": 0, diff --git a/tests/credentials/SsiCredentialIssuer.Expiry.App.Tests/ExpiryCheckServiceTests.cs b/tests/credentials/SsiCredentialIssuer.Expiry.App.Tests/ExpiryCheckServiceTests.cs index 705a7298..470def16 100644 --- a/tests/credentials/SsiCredentialIssuer.Expiry.App.Tests/ExpiryCheckServiceTests.cs +++ b/tests/credentials/SsiCredentialIssuer.Expiry.App.Tests/ExpiryCheckServiceTests.cs @@ -1,5 +1,5 @@ /******************************************************************************** - * Copyright (c) 2021, 2024 Contributors to the Eclipse Foundation + * Copyright (c) 2024 Contributors to the Eclipse Foundation * * See the NOTICE file(s) distributed with this work for additional * information regarding copyright ownership. diff --git a/tests/credentials/SsiCredentialIssuer.Expiry.App.Tests/GlobalUsings.cs b/tests/credentials/SsiCredentialIssuer.Expiry.App.Tests/GlobalUsings.cs index cee81f54..1fb85d28 100644 --- a/tests/credentials/SsiCredentialIssuer.Expiry.App.Tests/GlobalUsings.cs +++ b/tests/credentials/SsiCredentialIssuer.Expiry.App.Tests/GlobalUsings.cs @@ -1,5 +1,5 @@ /******************************************************************************** - * Copyright (c) 2021, 2024 Contributors to the Eclipse Foundation + * Copyright (c) 2024 Contributors to the Eclipse Foundation * * See the NOTICE file(s) distributed with this work for additional * information regarding copyright ownership. diff --git a/tests/credentials/SsiCredentialIssuer.Expiry.App.Tests/SsiCredentialIssuer.Expiry.App.Tests.csproj b/tests/credentials/SsiCredentialIssuer.Expiry.App.Tests/SsiCredentialIssuer.Expiry.App.Tests.csproj index f6c3e3e3..b8f099c2 100644 --- a/tests/credentials/SsiCredentialIssuer.Expiry.App.Tests/SsiCredentialIssuer.Expiry.App.Tests.csproj +++ b/tests/credentials/SsiCredentialIssuer.Expiry.App.Tests/SsiCredentialIssuer.Expiry.App.Tests.csproj @@ -1,5 +1,5 @@