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

Refactor Vue Router and Authentication infrastructure #41

Merged
merged 30 commits into from
Mar 1, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
471f278
Add dist folder to local ts-node-dev watchlist
jujaga Jan 27, 2023
9e9141a
Add oidc-client-ts library dependency
jujaga Feb 8, 2023
bfbe322
Implement new ConfigService singleton service
jujaga Feb 8, 2023
6eca2e5
Implement new AuthService singleton service
jujaga Feb 8, 2023
ba98368
Refactor main startup code to use new blocking initialization flows
jujaga Feb 8, 2023
6b6f6c4
Refactor core routing logic to utilize new authService
jujaga Feb 8, 2023
6fbb089
Add generic createProps transform function to router
jujaga Feb 9, 2023
8ff6f68
Add npm debug script to frontend package
jujaga Feb 23, 2023
b85f38f
Implement higher order generateGetters function and supporting types
jujaga Feb 23, 2023
3d7ebc7
Update authStore and configStore to support state masking
jujaga Feb 24, 2023
8614698
Consolidate vue router to handle oidc redirection and logouts
jujaga Feb 24, 2023
d92961c
Rename ObjectFileDetailsView to DetailObjectsView
jujaga Feb 24, 2023
4d2c896
Refactor main initializeApp to force a pinia configStore init
jujaga Feb 24, 2023
6235b87
Remove suspense support from App.vue
jujaga Feb 24, 2023
46699b5
Update authService to use a static userManager instance
jujaga Feb 24, 2023
a174e77
Drop generateGetters higher order function support
jujaga Feb 24, 2023
c9dd25f
Switch axios service interceptor to leverage new store getter functions
jujaga Feb 24, 2023
eaec877
Update base views and userStore to use new store getters
jujaga Feb 24, 2023
0a5df11
Update components to use new authStore methods
jujaga Feb 24, 2023
2f11a23
Change vue-router to depend on authStore instead of authService
jujaga Feb 24, 2023
e08a009
Attempt to perform vue-router navigation after /oidc/callback
jujaga Feb 25, 2023
8dfff8c
Implement explicit oidc flow routes and views for soft redirection
jujaga Feb 28, 2023
1fabe1e
Add bcgov styling for header and navbar
jujaga Feb 28, 2023
1511830
Implement componetized progress loader bar and integration to router
jujaga Feb 28, 2023
dd34c47
Fix remaining linting, testing and compilation issues
jujaga Feb 28, 2023
fd4c9ba
Change configmap environment values to support OIDC instead of KC
jujaga Feb 28, 2023
8b3af09
Routine npm dependency and RedHat image updates
jujaga Feb 28, 2023
9825831
Remove unnecessary isFirstTransition flag and add bcboxy mascot
jujaga Mar 1, 2023
643ca87
Rollback typescript to 4.8.4 and add store default exports
jujaga Mar 1, 2023
d808948
Standardize constants to use capital snake_case format
jujaga Mar 1, 2023
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
5 changes: 2 additions & 3 deletions .github/environments/values.dev.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,8 @@ config:
configMap:
FRONTEND_APIPATH: api/v1
FRONTEND_COMS_APIPATH: https://coms-dev-master.apps.silver.devops.gov.bc.ca/api/v1
FRONTEND_KC_CLIENTID: bc-box-4555
FRONTEND_KC_REALM: standard
FRONTEND_KC_SERVERURL: https://dev.loginproxy.gov.bc.ca/auth
FRONTEND_OIDC_AUTHORITY: https://dev.loginproxy.gov.bc.ca/auth/realms/standard
FRONTEND_OIDC_CLIENTID: bc-box-4555
SERVER_APIPATH: /api/v1
SERVER_BODYLIMIT: 30mb
# SERVER_LOGFILE: ~
Expand Down
5 changes: 2 additions & 3 deletions .github/environments/values.prod.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,8 @@ config:
configMap:
FRONTEND_APIPATH: api/v1
FRONTEND_COMS_APIPATH: https://coms-prod-master.apps.silver.devops.gov.bc.ca/api/v1
FRONTEND_KC_CLIENTID: bc-box-4555
FRONTEND_KC_REALM: standard
FRONTEND_KC_SERVERURL: https://loginproxy.gov.bc.ca/auth
FRONTEND_OIDC_AUTHORITY: https://loginproxy.gov.bc.ca/auth/realms/standard
FRONTEND_OIDC_CLIENTID: bc-box-4555
SERVER_APIPATH: /api/v1
SERVER_BODYLIMIT: 30mb
# SERVER_LOGFILE: ~
Expand Down
5 changes: 2 additions & 3 deletions .github/environments/values.test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,8 @@ config:
configMap:
FRONTEND_APIPATH: api/v1
FRONTEND_COMS_APIPATH: https://coms-test-master.apps.silver.devops.gov.bc.ca/api/v1
FRONTEND_KC_CLIENTID: bc-box-4555
FRONTEND_KC_REALM: standard
FRONTEND_KC_SERVERURL: https://test.loginproxy.gov.bc.ca/auth
FRONTEND_OIDC_AUTHORITY: https://test.loginproxy.gov.bc.ca/auth/realms/standard
FRONTEND_OIDC_CLIENTID: bc-box-4555
SERVER_APIPATH: /api/v1
SERVER_BODYLIMIT: 30mb
# SERVER_LOGFILE: ~
Expand Down
10 changes: 7 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
# FROM docker.io/node:16.15.0-alpine # Last known working alpine image

# RedHat Image Catalog references
# https://catalog.redhat.com/software/containers/ubi9/nodejs-18/62e8e7ed22d1d3c2dfe2ca01
# https://catalog.redhat.com/software/containers/ubi9/nodejs-18-minimal/62e8e919d4f57d92a9dee838

#
# Build the application
#
FROM registry.access.redhat.com/ubi9/nodejs-18:1-17.1669634581 as application
FROM registry.access.redhat.com/ubi9/nodejs-18:1-35 as application

ENV NO_UPDATE_NOTIFIER=true

Expand All @@ -18,7 +22,7 @@ RUN npm ci --production
#
# Build the frontend
#
FROM registry.access.redhat.com/ubi9/nodejs-18:1-17.1669634581 as frontend
FROM registry.access.redhat.com/ubi9/nodejs-18:1-35 as frontend

ENV NO_UPDATE_NOTIFIER=true

Expand All @@ -33,7 +37,7 @@ RUN npm ci && npm run build
#
# Create the final container image
#
FROM registry.access.redhat.com/ubi9/nodejs-18-minimal:1-18.1669631881
FROM registry.access.redhat.com/ubi9/nodejs-18-minimal:1-36

ENV APP_PORT=8080 \
NO_UPDATE_NOTIFIER=true
Expand Down
7 changes: 3 additions & 4 deletions app/config/custom-environment-variables.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,9 @@
"coms": {
"apiPath": "FRONTEND_COMS_APIPATH"
},
"keycloak": {
"clientId": "FRONTEND_KC_CLIENTID",
"realm": "FRONTEND_KC_REALM",
"serverUrl": "FRONTEND_KC_SERVERURL"
"oidc": {
"authority": "FRONTEND_OIDC_AUTHORITY",
"clientId": "FRONTEND_OIDC_CLIENTID"
}
},
"server": {
Expand Down
6 changes: 3 additions & 3 deletions app/config/test.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"frontend": {
"keycloak": {
"clientId": "client-frontend-local",
"realm": "01234567"
"oidc": {
"authority": "https://some.authority",
"clientId": "client-frontend-local"
}
},
"server": {
Expand Down
Loading