Skip to content

Commit

Permalink
Swap out keycloak-connect for jsonwebtoken
Browse files Browse the repository at this point in the history
keycloak-connect has since been deprecated
  • Loading branch information
norrisng-bc committed Oct 8, 2024
1 parent 585f753 commit cb61d71
Show file tree
Hide file tree
Showing 12 changed files with 328 additions and 1,462 deletions.
1 change: 1 addition & 0 deletions .github/environments/values.dev.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ config:
enabled: true
configMap:
FRONTEND_KC_CLIENTID: ches-showcase-frontend-4105
FRONTEND_KC_PUBLICKEY: MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAuy7zfh2ZgpDV5mH/aXyLDTddZK81rGakJcTy4KvCNOkDDxt1KAhW02lmbCo8YhHCOzjNZBp1+Vi6QiMRgBqAe2GTPZYEiV70aXfROGZe3Nvwcjbtki6HoyRte3SpqLJEIPL2F+hjJkw1UPGnjPTWZkEx9p74b9i3BjuE8RnjJ0Sza2MWw83zoQUZEJRGiopSL0yuVej6t2LO2btVdVf7QuZfPt9ehkcQYlPKpVvJA+pfeqPAdnNt7OjEIeYxinjurZr8Z04hz8UhkRefcWlSbFzFQYmL7O7iArjW0bsSvq8yNUd5r0KCOQkFduwZy26yTzTxj8OLFT91fEmbBBl4rQIDAQAB
FRONTEND_KC_REALM: standard
FRONTEND_KC_SERVERURL: https://dev.loginproxy.gov.bc.ca/auth
# FRONTEND_DASHBOARDURL: https://ches-metabase.apps.silver.devops.gov.bc.ca/public/dashboard/6f388f95-dba7-4632-be4c-8855ee645f31
Expand Down
1 change: 1 addition & 0 deletions .github/environments/values.prod.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ config:
enabled: true
configMap:
FRONTEND_KC_CLIENTID: ches-showcase-frontend-4105
FRONTEND_KC_PUBLICKEY: MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAmHiuPKOkpkq4GXN1ktr23rJtDl6Vdu/Y37ZAd3PnQ8/IDfAODvy1Y81aAUZicKe9egolv+OTRANN3yOg+TAbRhkeXLE5p/473EK0aQ0NazTCuWo6Am3oDQ7Yt8x0pw56/qcLtkTuXNyo5EnVV2Z2BzCnnaL31JOhyitolku0DNT6GDoRBmT4o2ItqEVHk5nM25cf1t2zbwI2790W6if1B2qVRkxxivS8tbH7nYC61Is3XCPockKptkH22cm2ZQJmtYd5sZKuXaGsvtyzHmn8/l0Kd1xnHmUu4JNuQ67YiNZGu3hOkrF0Js3BzAk1Qm4kvYRaxbJFCs/qokLZ4Z0W9wIDAQAB
FRONTEND_KC_REALM: standard
FRONTEND_KC_SERVERURL: https://loginproxy.gov.bc.ca/auth
# FRONTEND_DASHBOARDURL: https://ches-metabase.apps.silver.devops.gov.bc.ca/public/dashboard/6f388f95-dba7-4632-be4c-8855ee645f31
Expand Down
1 change: 1 addition & 0 deletions .github/environments/values.test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ config:
enabled: true
configMap:
FRONTEND_KC_CLIENTID: ches-showcase-frontend-4105
FRONTEND_KC_PUBLICKEY: MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAiFdv9GA83uHuy8Eu9yiZHGGF9j6J8t7FkbcpaN81GDjwbjsIJ0OJO9dKRAx6BAtTC4ubJTBJMPvQER5ikOhIeBi4o25fg61jpgsU6oRZHkCXc9gX6mrjMjbsPaf3/bjjYxP5jicBDJQeD1oRa24+tiGggoQ7k6gDEN+cRYqqNpzC/GQbkUPk8YsgroncEgu8ChMh/3ERsLV2zorchMANUq76max16mHrhtWIQxrb/STpSt4JuSlUzzBV/dcXjJe5gywZHe0jAutFhNqjHzHdgyaC4RAd3eYQo+Kl/JOgy2AZrnx+CiPmvOJKe9tAW4k4H087ng8aVE40v4HW/FEbnwIDAQAB
FRONTEND_KC_REALM: standard
FRONTEND_KC_SERVERURL: https://test.loginproxy.gov.bc.ca/auth
# FRONTEND_DASHBOARDURL: https://ches-metabase.apps.silver.devops.gov.bc.ca/public/dashboard/6f388f95-dba7-4632-be4c-8855ee645f31
Expand Down
4 changes: 0 additions & 4 deletions app/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ const path = require('path');
const Problem = require('api-problem');
const querystring = require('querystring');

const keycloak = require('./src/components/keycloak');
const log = require('./src/components/log')(module.filename);
const httpLogger = require('./src/components/log').httpLogger;
const v1Router = require('./src/routes/v1');
Expand Down Expand Up @@ -39,9 +38,6 @@ if (process.env.NODE_ENV !== 'test') {
app.use(httpLogger);
}

// Use Keycloak OIDC Middleware
app.use(keycloak.middleware());

// Block requests until service is ready
app.use((_req, res, next) => {
if (state.shutdown) {
Expand Down
1 change: 1 addition & 0 deletions app/config/custom-environment-variables.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
"dashboardUrl": "FRONTEND_DASHBOARDURL",
"keycloak": {
"clientId": "FRONTEND_KC_CLIENTID",
"publicKey": "FRONTEND_KC_PUBLICKEY",
"realm": "FRONTEND_KC_REALM",
"serverUrl": "FRONTEND_KC_SERVERURL"
}
Expand Down
Loading

0 comments on commit cb61d71

Please sign in to comment.