Skip to content

Commit

Permalink
Merge branch 'educ-dev-keycloak' of https://github.com/bcgov/EDUC-GRA…
Browse files Browse the repository at this point in the history
…D-ADMIN into institute-connection
  • Loading branch information
suzalflueck committed Dec 12, 2024
2 parents 62e4558 + 11bc1d8 commit 00ab4fc
Show file tree
Hide file tree
Showing 53 changed files with 842 additions and 468 deletions.
11 changes: 11 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for all configuration options:
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates

version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
2 changes: 1 addition & 1 deletion .github/workflows/build-n-deploy-backend-km.yml
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,6 @@ jobs:
oc rollout status dc/${{ env.IMAGE_NAME }}-dc
- name: ZAP Scan
uses: zaproxy/action-full-scan@v0.3.0
uses: zaproxy/action-full-scan@v0.12.0
with:
target: 'https://educ-grad-admin-bbe4c3-dev.apps.silver.devops.gov.bc.ca'
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,6 @@ jobs:
oc rollout status dc/${{ env.IMAGE_NAME }}-dc
- name: ZAP Scan
uses: zaproxy/action-full-scan@v0.10.0
uses: zaproxy/action-full-scan@v0.12.0
with:
target: "https://educ-grad-admin-${{secrets.GRAD_NAMESPACE_NO_ENV}}-dev.apps.silver.devops.gov.bc.ca"
10 changes: 5 additions & 5 deletions .github/workflows/build-n-deploy-backend-to-ocp-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,10 @@ env:
TAG: "latest"
TARGET_ENV: "dev"

MIN_CPU: "50m"
MAX_CPU: "100m"
MIN_MEM: "200Mi"
MAX_MEM: "250Mi"
MIN_CPU: "60m"
MAX_CPU: "120m"
MIN_MEM: "250Mi"
MAX_MEM: "400Mi"
MIN_REPLICAS: "1"
MAX_REPLICAS: "2"

Expand Down Expand Up @@ -169,6 +169,6 @@ jobs:
oc rollout status dc/${{ env.IMAGE_NAME }}-dc
- name: ZAP Scan
uses: zaproxy/action-full-scan@v0.10.0
uses: zaproxy/action-full-scan@v0.12.0
with:
target: 'https://educ-grad-admin-bbe4c3-dev.apps.silver.devops.gov.bc.ca'
2 changes: 1 addition & 1 deletion .github/workflows/build-n-deploy-backend-to-ocp-tools.yml
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,6 @@ jobs:
oc rollout status dc/${{ env.IMAGE_NAME }}-dc
- name: ZAP Scan
uses: zaproxy/action-full-scan@v0.3.0
uses: zaproxy/action-full-scan@v0.12.0
with:
target: 'https://educ-grad-admin-bbe4c3-tools.apps.silver.devops.gov.bc.ca'
2 changes: 1 addition & 1 deletion .github/workflows/build-n-deploy-frontend-km.yml
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,6 @@ jobs:
# Get status, returns 0 if rollout is successful
oc rollout status dc/${{ env.IMAGE_NAME }}-dc
- name: ZAP Scan
uses: zaproxy/action-full-scan@v0.3.0
uses: zaproxy/action-full-scan@v0.12.0
with:
target: 'https://educ-grad-admin-bbe4c3-dev.apps.silver.devops.gov.bc.ca'
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,6 @@ jobs:
# Get status, returns 0 if rollout is successful
oc rollout status dc/${{ env.IMAGE_NAME }}-dc
- name: ZAP Scan
uses: zaproxy/action-full-scan@v0.10.0
uses: zaproxy/action-full-scan@v0.12.0
with:
target: "https://educ-grad-admin-${{secrets.GRAD_NAMESPACE_NO_ENV}}-dev.apps.silver.devops.gov.bc.ca"
2 changes: 1 addition & 1 deletion .github/workflows/build-n-deploy-frontend-to-ocp-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ jobs:
# Get status, returns 0 if rollout is successful
oc rollout status dc/${{ env.IMAGE_NAME }}-dc
- name: ZAP Scan
uses: zaproxy/action-full-scan@v0.10.0
uses: zaproxy/action-full-scan@v0.12.0
with:
target: 'https://educ-grad-admin-bbe4c3-dev.apps.silver.devops.gov.bc.ca'

2 changes: 1 addition & 1 deletion .github/workflows/build-n-deploy-frontend-to-ocp-tools.yml
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ jobs:
# Get status, returns 0 if rollout is successful
oc rollout status dc/${{ env.IMAGE_NAME }}-dc
- name: ZAP Scan
uses: zaproxy/action-full-scan@v0.3.0
uses: zaproxy/action-full-scan@v0.12.0
with:
target: 'https://educ-grad-admin-bbe4c3-tools.apps.silver.devops.gov.bc.ca'

4 changes: 2 additions & 2 deletions .github/workflows/create_tag.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@ env:
# To get a permanent token, refer to https://github.com/redhat-actions/oc-login/wiki/Using-a-Service-Account-for-GitHub-Actions
OPENSHIFT_SERVER: ${{ secrets.OPENSHIFT_SERVER }}
OPENSHIFT_TOKEN: ${{ secrets.OPENSHIFT_TOKEN }}
OPENSHIFT_NAMESPACE: ${{ secrets.GRAD_BUSINESS_NAMESPACE }}-dev
OPENSHIFT_NAMESPACE: ${{ secrets.UI_NAMESPACE }}-dev

# 🖊️ EDIT to specify custom tags for the container image, or default tags will be generated below.
IMAGE_TAGS: ""

REPO_NAME: "educ-grad-admin"
BRANCH: "main"
NAMESPACE: ${{ secrets.GRAD_BUSINESS_NAMESPACE }}
NAMESPACE: ${{ secrets.UI_NAMESPACE }}

on:
# https://docs.github.com/en/actions/reference/events-that-trigger-workflows
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/deploy-backend-to-ocp-prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,10 @@ env:
TAG: "latest"
TARGET_ENV: "prod"

MIN_CPU: "50m"
MAX_CPU: "100m"
MIN_MEM: "200Mi"
MAX_MEM: "250Mi"
MIN_CPU: "60m"
MAX_CPU: "120m"
MIN_MEM: "250Mi"
MAX_MEM: "400Mi"
MIN_REPLICAS: "3"
MAX_REPLICAS: "5"

Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/deploy-backend-to-ocp-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,10 @@ env:
# SITE_URL should have no scheme or port. It will be prepended with https://
HOST_ROUTE: ${{ secrets.SITE_URL }}

MIN_CPU: "50m"
MAX_CPU: "100m"
MIN_MEM: "200Mi"
MAX_MEM: "250Mi"
MIN_CPU: "60m"
MAX_CPU: "120m"
MIN_MEM: "250Mi"
MAX_MEM: "400Mi"
MIN_REPLICAS: "3"
MAX_REPLICAS: "5"

Expand Down Expand Up @@ -93,6 +93,6 @@ jobs:
oc rollout status dc/${{ env.IMAGE_NAME }}-dc
- name: ZAP Scan
uses: zaproxy/action-full-scan@v0.10.0
uses: zaproxy/action-full-scan@v0.12.0
with:
target: "https://educ-grad-admin-bbe4c3-test.apps.silver.devops.gov.bc.ca"
2 changes: 1 addition & 1 deletion .github/workflows/deploy-frontend-to-ocp-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,6 @@ jobs:
oc rollout status dc/${{ env.IMAGE_NAME }}-dc
- name: ZAP Scan
uses: zaproxy/action-full-scan@v0.10.0
uses: zaproxy/action-full-scan@v0.12.0
with:
target: "https://educ-grad-admin-bbe4c3-test.apps.silver.devops.gov.bc.ca"
4 changes: 3 additions & 1 deletion backend/src/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,8 @@ utils.getOidcDiscovery().then(discovery => {
callbackURL: config.get('server:frontend') + '/api/auth/callback',
scope: discovery.scopes_supported,
kc_idp_hint: config.get('server:idirIDPHint')
}, (_issuer, _sub, profile, accessToken, refreshToken, done) => {
}, (_issuer, _sub, profile, accessToken, refreshToken, params, done) => {
const idToken = params.id_token;
if ((typeof (accessToken) === 'undefined') || (accessToken === null) ||
(typeof (refreshToken) === 'undefined') || (refreshToken === null)) {
return done('No access token', null);
Expand All @@ -116,6 +117,7 @@ utils.getOidcDiscovery().then(discovery => {
profile.jwtFrontend = auth.generateUiToken();
profile.jwt = accessToken;
profile.refreshToken = refreshToken;
profile.idToken = idToken;
return done(null, profile);
}));
//JWT strategy is used for authorization
Expand Down
Loading

0 comments on commit 00ab4fc

Please sign in to comment.