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

OWF migration prep #690

Merged
merged 11 commits into from
Dec 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
4 changes: 2 additions & 2 deletions .github/actions/chart_releaser/cr.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
owner: bcgov
git-repo: vc-authn-oidc
owner: openwallet-foundation
git-repo: acapy-vc-authn-oidc
git-base-url: https://api.github.com/
git-upload-url: https://uploads.github.com/
74 changes: 0 additions & 74 deletions .github/workflows/chart_release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,77 +27,3 @@ jobs:
config: .github/actions/chart_releaser/cr.yaml
env:
CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}"

update-configs-and-sync:
runs-on: ubuntu-latest
name: Update Configs and Sync
needs:
- chart-release
steps:
- uses: actions/checkout@v4

- name: Set up Git
run: |
git config --global user.name "github-actions[bot]"
git config --global user.email "github-actions[bot]@users.noreply.github.com"

- name: Checkout services directory from the trust-over-ip-configurations repo
uses: actions/checkout@v4
with:
repository: bcgov/trust-over-ip-configurations
ssh-key: ${{ secrets.DITP_CONFIGS_REPO_SECRET }}
sparse-checkout: |
services
path: trust-over-ip-configurations

- name: Lookup latest chart
id: chart_version
run: |
helm repo add vc-authn-oidc https://bcgov.github.io/vc-authn-oidc
helm repo update
echo "APP_VERSION=$(helm search repo vc-authn-oidc -ojson | jq '.[0].app_version')" >> $GITHUB_OUTPUT
echo "CHART_VERSION=$(helm search repo vc-authn-oidc -ojson | jq '.[0].version')" >> $GITHUB_OUTPUT

- name: Update test
env:
APP_VERSION: ${{ steps.chart_version.outputs.APP_VERSION }}
CHART_VERSION: ${{ steps.chart_version.outputs.CHART_VERSION }}
run: |
cd trust-over-ip-configurations
yq e -i '.appVersion = env(APP_VERSION)' services/vc-authn-oidc/charts/test/Chart.yaml
yq e -i '.version = env(CHART_VERSION)' services/vc-authn-oidc/charts/test/Chart.yaml
yq e -i '.dependencies[0].version = env(CHART_VERSION)' services/vc-authn-oidc/charts/test/Chart.yaml

- name: Update prod
env:
APP_VERSION: ${{ steps.chart_version.outputs.APP_VERSION }}
CHART_VERSION: ${{ steps.chart_version.outputs.CHART_VERSION }}
run: |
cd trust-over-ip-configurations
yq e -i '.appVersion = env(APP_VERSION)' services/vc-authn-oidc/charts/prod/Chart.yaml
yq e -i '.version = env(CHART_VERSION)' services/vc-authn-oidc/charts/prod/Chart.yaml
yq e -i '.dependencies[0].version = env(CHART_VERSION)' services/vc-authn-oidc/charts/prod/Chart.yaml

- name: Commit and Push to trust-over-ip-configurations Repo
run: |
cd trust-over-ip-configurations
git add services/vc-authn-oidc/charts/test/Chart.yaml services/vc-authn-oidc/charts/prod/Chart.yaml
git commit -m "Update chart and app versions" || echo "No changes to commit"
git push origin main

- name: Trigger and wait for GitOps sync workflow
uses: convictional/[email protected]
id: workflow-trigger
with:
owner: bcgov
repo: trust-over-ip-configurations
github_token: ${{ secrets.DITP_CONFIGS_REPO_TOKEN }}
workflow_file_name: gitops_sync.yaml

- name: Trigger ArgoCD Sync of e79518-test-vc-authn-oidc
uses: OpsVerseIO/[email protected]
with:
address: gitops-shared.apps.silver.devops.gov.bc.ca
token: ${{ secrets.DITP_GITOPS_ARGO_SECRET}}
action: sync
appName: "e79518-test-vc-authn-oidc"
47 changes: 2 additions & 45 deletions .github/workflows/on_push_main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,54 +6,11 @@ on:
- main
jobs:
build:
name: "Build VC-AuthN"
if: github.repository_owner == 'bcgov'
name: "Build ACAPy VC-AuthN"
if: github.repository_owner == 'openwallet-foundation'
uses: ./.github/workflows/publish.yml
with:
tag: "dev"
ref: "main"
platforms: "linux/amd64"

# Build vc-authn
deploy_dev:
name: Deploy VC-AuthN to Dev
environment: dev
runs-on: ubuntu-latest
needs:
- build
if: ${{ contains(needs.*.result, 'success') && !(contains(needs.*.result, 'failure')) && (github.repository_owner == 'bcgov') }}

steps:
- uses: actions/checkout@v4

- name: Checkout services directory from the trust-over-ip-configurations repo
uses: actions/checkout@v4
with:
repository: bcgov/trust-over-ip-configurations
ssh-key: ${{ secrets.DITP_CONFIGS_REPO_SECRET }}
sparse-checkout: |
services
path: trust-over-ip-configurations

- name: Install OpenShift CLI tools
uses: redhat-actions/openshift-tools-installer@v1
with:
oc: "4.14"

- name: Authenticate and set context
uses: redhat-actions/oc-login@v1
with:
openshift_server_url: ${{ secrets.OPENSHIFT_SERVER }}
openshift_token: ${{ secrets.OPENSHIFT_TOKEN }}
namespace: ${{ secrets.OPENSHIFT_NAMESPACE }}

- name: Deploy VC-Authn-OIDC to Development
run: |
cp trust-over-ip-configurations/services/vc-authn-oidc/charts/dev/values.yaml ./dev-values.yaml
yq e -i 'del(.vc-authn-oidc) | . *= load("trust-over-ip-configurations/services/vc-authn-oidc/charts/dev/values.yaml").vc-authn-oidc' ./dev-values.yaml
helm upgrade --install vc-authn-oidc -f ./dev-values.yaml --set image.tag=${{ needs.build.outputs.image_version }} ./charts/vc-authn-oidc --wait

- name: Restart Deployments
run: |
oc rollout restart deployment/vc-authn-oidc-agent
oc rollout restart deployment/vc-authn-oidc
10 changes: 5 additions & 5 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: Publish VC-AuthN Image
run-name: Publish VC-AuthN ${{ inputs.tag || github.event.release.tag_name }} Image
name: Publish ACAPy VC-AuthN Image
run-name: Publish ACAPy VC-AuthN ${{ inputs.tag || github.event.release.tag_name }} Image
on:
release:
types: [published]
Expand Down Expand Up @@ -47,11 +47,11 @@ env:

jobs:
publish_image:
if: github.repository_owner == 'bcgov'
if: github.repository_owner == 'openwallet-foundation'
strategy:
fail-fast: false

name: Publish VC-AuthN Image
name: Publish ACAPy VC-AuthN Image
runs-on: ubuntu-latest
outputs:
image_tag: ${{ steps.values.outputs.image_tag }}
Expand Down Expand Up @@ -90,7 +90,7 @@ jobs:
uses: docker/metadata-action@v5
with:
images: |
ghcr.io/${{ steps.info.outputs.repo-owner }}/vc-authn-oidc
ghcr.io/${{ steps.info.outputs.repo-owner }}/acapy-vc-authn-oidc
tags: |
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
Expand Down
18 changes: 6 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
[![img](https://img.shields.io/badge/Lifecycle-Maturing-007EC6)](https://github.com/bcgov/repomountie/blob/master/doc/lifecycle-badges.md)
[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](LICENSE)

[![unit-tests](https://github.com/bcgov/vc-authn-oidc/actions/workflows/controller_unittests.yml/badge.svg?branch=main&event=push)](https://github.com/bcgov/vc-authn-oidc/actions/workflows/controller_unittests.yml)
[![Coverage Status](https://coveralls.io/repos/github/bcgov/vc-authn-oidc/badge.svg?branch=main)](https://coveralls.io/repos/github/bcgov/vc-authn-oidc/badge.svg?branch=main)
[![unit-tests](https://github.com/openwallet-foundation/acapy-vc-authn-oidc/actions/workflows/controller_unittests.yml/badge.svg?branch=main&event=push)](https://github.com/openwallet-foundation/acapy-vc-authn-oidc/actions/workflows/controller_unittests.yml)
[![Coverage Status](https://coveralls.io/repos/github/openwallet-foundation/acapy-vc-authn-oidc/badge.svg?branch=main)](https://coveralls.io/repos/github/openwallet-foundation/acapy-vc-authn-oidc/badge.svg?branch=main)

# Verifiable Credential Authentication with OpenID Connect (VC-AuthN OIDC)

Expand Down Expand Up @@ -58,24 +57,19 @@ curl -X 'POST' \
-H 'accept: application/json' \
-H 'Content-Type: application/json' \
-d '{
"ver_config_id": "showcase-person",
"ver_config_id": "test-proof",
"subject_identifier": "",
"generate_consistent_identifier": true,
"proof_request": {
"name": "BC Wallet Showcase Person",
"name": "Test Proof-Request",
"version": "1.0",
"requested_attributes": [

{
"names": ["given_names", "family_name", "country"],
"names": ["attr1", "attr2", "attr3"],
"restrictions": [
{
"schema_name": "Person",
"issuer_did": "QEquAHkM35w4XVT3Ku5yat"
},
{
"schema_name": "Person",
"issuer_did": "RGjWbW1eycP7FrMf4QJvX8"
"schema_name": "test-schema"
}
]
}
Expand Down
6 changes: 3 additions & 3 deletions charts/vc-authn-oidc/Chart.lock
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@ dependencies:
version: 11.9.13
- name: common
repository: https://charts.bitnami.com/bitnami
version: 2.19.3
digest: sha256:25b2d378a440a3b9000f24974ea1f4a1f7b97bc502a13b27773845fdd31a4507
generated: "2024-05-27T14:33:12.613817654-07:00"
version: 2.27.0
digest: sha256:e042b769727234b98cc5062a3bdb8e7b2018ca37218d37613488c7cb8d60a0f2
generated: "2024-12-11T10:22:34.2773539-08:00"
4 changes: 2 additions & 2 deletions charts/vc-authn-oidc/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
apiVersion: v2
name: vc-authn-oidc
description: A Helm chart to deploy VC-AuthN on OpenShift
description: A Helm chart to deploy ACAPy VC-AuthN on OpenShift
type: application

# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 0.2.5
version: 0.3.0

# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
Expand Down
Binary file removed charts/vc-authn-oidc/charts/common-2.19.3.tgz
Binary file not shown.
Binary file added charts/vc-authn-oidc/charts/common-2.27.0.tgz
Binary file not shown.
4 changes: 1 addition & 3 deletions demo/vue/README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
# Demo App

This demo is based on https://github.com/bcgov/vue-scaffold
# ACAPy VC-AuthN OIDC Demo App
15 changes: 1 addition & 14 deletions demo/vue/app/config/custom-environment-variables.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,18 +23,5 @@
"logFile": "SERVER_LOGFILE",
"logLevel": "SERVER_LOGLEVEL",
"port": "SERVER_PORT"
},
"serviceClient": {
"commonServices": {
"ches": {
"endpoint": "SC_CS_CHES_ENDPOINT"
},
"cdogs": {
"endpoint": "SC_CS_CDOGS_ENDPOINT"
},
"tokenEndpoint": "SC_CS_TOKEN_ENDPOINT",
"username": "SC_CS_USERNAME",
"password": "SC_CS_PASSWORD"
}
}
}
}
21 changes: 5 additions & 16 deletions demo/vue/app/config/default.json
Original file line number Diff line number Diff line change
@@ -1,30 +1,19 @@
{
"frontend": {
"apiPath": "api/v1",
"basePath" : "/app",
"basePath": "/app",
"keycloak": {
"serverUrl": "https://dev.oidc.gov.bc.ca/auth"
"serverUrl": ""
}
},
"server": {
"apiPath": "/api/v1",
"basePath" : "/app",
"basePath": "/app",
"bodyLimit": "30mb",
"keycloak": {
"serverUrl": "https://dev.oidc.gov.bc.ca/auth"
"serverUrl": ""
},
"logLevel": "http",
"port": "8080"
},
"serviceClient": {
"commonServices": {
"ches": {
"endpoint": "https://ches-dev.pathfinder.gov.bc.ca/api"
},
"cdogs": {
"endpoint": "https://cdogs-dev.pathfinder.gov.bc.ca/api"
},
"tokenEndpoint": "https://dev.oidc.gov.bc.ca/auth/realms/jbd6rnxw/protocol/openid-connect/token"
}
}
}
}
6 changes: 0 additions & 6 deletions demo/vue/app/config/test.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,5 @@
"clientSecret": "password"
},
"logLevel": "silent"
},
"serviceClient": {
"commonServices": {
"username": "username",
"password": "password"
}
}
}
35 changes: 15 additions & 20 deletions demo/vue/app/frontend/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading