Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add issuer component #18

Merged
merged 31 commits into from
Mar 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
603c7b4
feat: add issuer component
Phil91 Mar 6, 2024
d6b25bd
feat: add issuer component
Phil91 Mar 6, 2024
ab909cc
build: add helm chart for issuer component
Phil91 Mar 12, 2024
77dab4f
chore: remove unneeded code
Phil91 Mar 14, 2024
9b1abdb
feat(notification): adjust notification endpoint
Phil91 Mar 14, 2024
85493a0
fix(build): enable build of docker images (#21)
evegufy Mar 14, 2024
3396177
chore: remove SsiCredentialIssuer.Expiry.App.app dir
Phil91 Mar 15, 2024
cd32ad2
feat: add callback process step
Phil91 Mar 15, 2024
9e147e3
chore: enable helm chart (#22)
evegufy Mar 18, 2024
db51e09
chore: recreate migration
Phil91 Mar 19, 2024
f80a0f3
chore: fix helm chart, improve workflows and docs (#23)
evegufy Mar 20, 2024
15f3f13
feat: add helm chart for issuer component #20
Phil91 Mar 20, 2024
43bc70c
chore: adjust expiry app settings
Phil91 Mar 20, 2024
5498609
fix: adjust migration docker image
Phil91 Mar 20, 2024
02d53a5
chore: fix cronjob templates
Phil91 Mar 20, 2024
1c15de2
chore: add configuration of process identity id to migration
Phil91 Mar 20, 2024
22b2a76
chore: set process identityId
Phil91 Mar 20, 2024
8e58954
chore: adjust controller naming
Phil91 Mar 20, 2024
0ae60e4
fix(cronjobs-images): add ENV COMPlus_EnableDiagnostics=0
evegufy Mar 20, 2024
add5468
fix trivial findings
ntruchsess Mar 20, 2024
3b37d4a
fix tests
ntruchsess Mar 20, 2024
ee662ac
chore: adjust cronjobs
Phil91 Mar 20, 2024
5e3f390
feat: adjust approval
Phil91 Mar 20, 2024
ba75b66
chore(helm): fix templating of db username
evegufy Mar 20, 2024
f50d996
chore: adjust jwt audience
Phil91 Mar 21, 2024
296a467
chore: adjust env audience
Phil91 Mar 21, 2024
93746d1
feat: add statuslist to credential creation
Phil91 Mar 21, 2024
213a0d5
chore: adjust holder validation
Phil91 Mar 22, 2024
03aac0b
chore: adjust url regex
Phil91 Mar 22, 2024
82f4fa8
chore: adjust holder validation
Phil91 Mar 22, 2024
749a9e4
add invalid path characters dedection to url validation
ntruchsess Mar 22, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 25 additions & 7 deletions .github/workflows/chart-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -102,8 +120,8 @@ jobs:
- name: Run chart-testing (lint)
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"
- name: Run chart-testing (install)
run: ct install --charts charts/ssi-credential-issuer --config charts/chart-testing-config.yaml --helm-extra-set-args "--set issuer.image.name=kind-registry:5000/credential-issuer-service --set issuer.image.tag=testing --set issuermigrations.image.name=kind-registry:5000/credential-issuer-migrations --set issuermigrations.image.tag=testing --set processesworker.image.name=kind-registry:5000/credential-issuer-processes-worker --set processesworker.image.tag=testing --set credentialExpiry.image.name=kind-registry:5000/credential-expiry-app --set credentialExpiry.image.tag=testing"
if: github.event_name != 'pull_request' || steps.list-changed.outputs.changed == 'true'

# TODO: re-add the step after the first version release
Expand All @@ -115,5 +133,5 @@ jobs:
# helm repo add tractusx-dev https://eclipse-tractusx.github.io/charts/dev
# helm install ssi-credential-issuer tractusx-dev/ssi-credential-issuer --version ${{ github.event.inputs.upgrade_from || 'tbd' }} --namespace upgrade --create-namespace
# helm dependency update charts/ssi-credential-issuer
# helm upgrade ssi-credential-issuer charts/ssi-credential-issuer --set issuer.image=kind-registry:5000/service:testing --set=issuermigrations.image=kind-registry:5000/migrations:testing --namespace upgrade
# helm upgrade ssi-credential-issuer charts/ssi-credential-issuer --set issuer.image.name=kind-registry:5000/credential-issuer-service --set issuer.image.tag=testing --set issuermigrations.image.name=kind-registry:5000/credential-issuer-migrations --set issuermigrations.image.tag=testing --set processesworker.image.name=kind-registry:5000/credential-issuer-processes-worker --set processesworker.image.tag=testing --set credentialExpiry.image.name=kind-registry:5000/credential-expiry-app --set credentialExpiry.image.tag=testing --namespace upgrade
# if: github.event_name != 'pull_request' || steps.list-changed.outputs.changed == 'true'
91 changes: 91 additions & 0 deletions .github/workflows/credential-expiry-app-docker.yml
Original file line number Diff line number Diff line change
@@ -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: Build Credential Expiry App Image

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"
2 changes: 1 addition & 1 deletion .github/workflows/dependencies.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ jobs:
run: dotnet list src package --include-transitive --interactive | grep ">" | grep -Pv "\s(Org.Eclipse.TractusX|Microsoft|NuGet|System|runtime|docker|Docker|NETStandard)" | sed -E -e "s/\s+> ([a-zA-Z\.\-]+).+\s([0-9]+\.[0-9]+\.[0-9]+)\s*/nuget\/nuget\/\-\/\1\/\2/g" | awk '!seen[$0]++' > PACKAGES

- name: Generate Dependencies file
run: java -jar ./scripts/download/org.eclipse.dash.licenses-1.1.1-20240213.065029-71.jar PACKAGES -project automotive.tractusx -summary DEPENDENCIES || true
run: java -jar ./scripts/download/org.eclipse.dash.licenses-1.1.1.jar PACKAGES -project automotive.tractusx -summary DEPENDENCIES || true

- name: Check if dependencies were changed
id: dependencies-changed
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/migrations-docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
# SPDX-License-Identifier: Apache-2.0
###############################################################

name: Migrations
name: Build Migrations Image

on:
push:
Expand All @@ -28,7 +28,7 @@ on:
# workflow file
- '.github/workflows/migrations-docker.yml'
# dockerfile
- 'docker/Dockerfile-migrations'
- 'docker/Dockerfile-credential-issuer-migrations'

branches:
- 'dev'
Expand Down Expand Up @@ -74,7 +74,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' }}
Expand Down
28 changes: 23 additions & 5 deletions .github/workflows/owasp-zap.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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.name=kind-registry:5000/credential-issuer-service --set issuer.image.tag=testing --set issuermigrations.image.name=kind-registry:5000/credential-issuer-migrations --set issuermigrations.image.tag=testing --set processesworker.image.name=kind-registry:5000/credential-issuer-processes-worker --set processesworker.image.tag=testing --set credentialExpiry.image.name=kind-registry:5000/credential-expiry-app --set credentialExpiry.image.tag=testing --set issuer.swaggerEnabled=true charts/ssi-credential-issuer

- name: Configure port forward to app in KinD
run: |
Expand Down
91 changes: 91 additions & 0 deletions .github/workflows/processes-worker-docker.yml
Original file line number Diff line number Diff line change
@@ -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: Build Processes Worker Image

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"
Loading
Loading