Skip to content

Commit

Permalink
Changes to make helloworld enviornments ISACC specific.
Browse files Browse the repository at this point in the history
  • Loading branch information
pbugni committed Aug 25, 2022
1 parent c55980f commit 0446828
Show file tree
Hide file tree
Showing 9 changed files with 40 additions and 46 deletions.
14 changes: 6 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
# Hello World Environments
Template, "Hello World" environments, generates a full stack functional
project adhering (as closely as possible) to the SMART on FHIR (SoF)
protocol.

Intent combines a proof of concept with a functional demonstration of authentication, FHIR persistence and multiple SoF client types and interactions.
# ISACC Environments
ISACC environments, generates a full stack functional
project conforming to the SMART on FHIR (SoF) protocol.
To be continued...

## Product Elements
- fEMR
Expand All @@ -14,8 +12,8 @@ Intent combines a proof of concept with a functional demonstration of authentica
- [PostgreSQL](https://postgrest.org/en/stable/)
- [Redis](https://redis.io/)
- [Log Server](https://github.com/uwcirg/logserver)
- [Public SoF React Client](https://github.com/uwcirg/helloworld-react-client-sof)
- [Public SoF Vue Client](https://github.com/uwcirg/helloworld-vue-client-sof)
- [Enrollment Client](https://github.com/uwcirg/isacc-enrollment-client-sof)
- [Messaging Client](https://github.com/uwcirg/isacc-messaging-client-sof)

## Setup
Clone this repo to your desired location and follow Setup steps in [`dev`](./dev/README.md), to setup a development deploy.
2 changes: 1 addition & 1 deletion dev/README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Development Configuration
Sets up a development copy of Hello World (SoF) environments
Sets up a development copy of ISACC environments


## Setup
Expand Down
12 changes: 6 additions & 6 deletions dev/config/keycloak/realm-data.json
Original file line number Diff line number Diff line change
Expand Up @@ -2855,13 +2855,13 @@
{
"id": "fe6ccba2-7bef-47db-8ca7-32b916dcdd8a",
"clientId": "hello_world_client",
"name": "Public Client",
"description": "Public Client SoF client app",
"name": "Enrollment Client",
"description": "ISACC Enrollment Client",
"surrogateAuthRequired": false,
"enabled": true,
"alwaysDisplayInConsole": false,
"clientAuthenticatorType": "client-secret",
"secret": "${__KEYCLOAK_FEMR_REALM_PUBCLIENT_OPENID_CLIENT_SECRET}",
"secret": "${__KEYCLOAK_FEMR_REALM_ENROLLMENT_OPENID_CLIENT_SECRET}",
"redirectUris": [
"*"
],
Expand Down Expand Up @@ -2924,13 +2924,13 @@
{
"id": "442354b5-a98c-4938-b62f-6333dc82435b",
"clientId": "screener_openid_client",
"name": "Public Vue Client",
"description": "Public Client SoF Vue client app",
"name": "Messaging Client",
"description": "ISACC Messaging client app",
"surrogateAuthRequired": false,
"enabled": true,
"alwaysDisplayInConsole": false,
"clientAuthenticatorType": "client-secret",
"secret": "${__KEYCLOAK_FEMR_REALM_VUECLIENT_OPENID_CLIENT_SECRET}",
"secret": "${__KEYCLOAK_FEMR_REALM_MESSAGING_OPENID_CLIENT_SECRET}",
"redirectUris": [
"*"
],
Expand Down
8 changes: 4 additions & 4 deletions dev/default.env
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ COMPOSE_PROJECT_NAME=

# docker image tag overrides; override default image tag with given image tag
# FEMR_IMAGE_TAG=override-tag-name
# PUBCLIENT_IMAGE_TAG=override-tag-name
# VUECLIENT_IMAGE_TAG=override-tag-name
# ENROLLMENT_IMAGE_TAG=override-tag-name
# MESSAGING_IMAGE_TAG=override-tag-name

# Uncomment for deploys with traefik-managed ingress
# COMPOSE_FILE=docker-compose.yaml:docker-compose.ingress.yaml
Expand All @@ -30,5 +30,5 @@ COMPOSE_PROJECT_NAME=
# uncomment & modify if using above development overrides
# FEMR_CHECKOUT_DIR=
# FHIRWALL_CHECKOUT_DIR=
# PUBCLIENT_CHECKOUT_DIR=
# VUECLIENT_CHECKOUT_DIR=
# ENROLLMENT_CHECKOUT_DIR=
# MESSAGING_CHECKOUT_DIR=
36 changes: 18 additions & 18 deletions dev/docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ services:
env_file:
femr.env
environment:
APPLICATION_TITLE: HelloWorld
APPLICATION_TITLE: ISACC
OIDC_AUTHORIZE_URL: "https://keycloak.${BASE_DOMAIN:-localtest.me}/auth/realms/fEMR/protocol/openid-connect/auth"
OIDC_CLIENT_ID: femr_openid_client
OIDC_ISSUER: "https://keycloak.${BASE_DOMAIN:-localtest.me}/auth/realms/fEMR"
Expand All @@ -32,16 +32,16 @@ services:
MAP_API: "http://fhir-internal:8080/fhir/"
# FHIR URL passed to SoF client
SOF_HOST_FHIR_URL: 'https://fhirwall.${BASE_DOMAIN:-localtest.me}/fhir'
SOF_CLIENTS: '[{"id":"PUBCLIENT", "label":"React Client", "launch_url":"https://pubclient.${BASE_DOMAIN:-localtest.me}/launch.html"},{"id":"VUECLIENT", "label":"Vue Client", "launch_url":"https://vueclient.${BASE_DOMAIN:-localtest.me}/launch.html", "required_roles": ["clinician"]}]'
SOF_CLIENTS: '[{"id":"ENROLLMENT", "label":"Enrollment Client", "launch_url":"https://enrollment.${BASE_DOMAIN:-localtest.me}/launch.html"},{"id":"MESSAGING", "label":"Messaging Client", "launch_url":"https://messaging.${BASE_DOMAIN:-localtest.me}/launch.html"}]'
LOGSERVER_URL: "https://logs.${BASE_DOMAIN:-localtest.me}"
REDIS_URL: redis://redis:6379/1
depends_on:
- fhirwall
- keycloak
- logs
- redis
- pubclient
- vueclient
- enrollment
- messaging
labels:
- "traefik.enable=true"
- "traefik.http.routers.femr-${COMPOSE_PROJECT_NAME}.rule=Host(`femr.${BASE_DOMAIN:-localtest.me}`)"
Expand Down Expand Up @@ -193,33 +193,33 @@ services:
- internal


pubclient:
image: ghcr.io/uwcirg/helloworld-react-client-sof:${PUBCLIENT_IMAGE_TAG:-latest}
enrollment:
image: ghcr.io/uwcirg/isacc-enrollment-client-sof:${ENROLLMENT_IMAGE_TAG:-latest}
env_file:
- pubclient.env
- enrollment.env
depends_on:
- fhir
labels:
- "traefik.enable=true"
- "traefik.http.routers.pubclient-${COMPOSE_PROJECT_NAME}.rule=Host(`pubclient.${BASE_DOMAIN:-localtest.me}`)"
- "traefik.http.routers.pubclient-${COMPOSE_PROJECT_NAME}.entrypoints=websecure"
- "traefik.http.routers.pubclient-${COMPOSE_PROJECT_NAME}.tls=true"
- "traefik.http.routers.pubclient-${COMPOSE_PROJECT_NAME}.tls.certresolver=letsencrypt"
- "traefik.http.routers.enrollment-${COMPOSE_PROJECT_NAME}.rule=Host(`enrollment.${BASE_DOMAIN:-localtest.me}`)"
- "traefik.http.routers.enrollment-${COMPOSE_PROJECT_NAME}.entrypoints=websecure"
- "traefik.http.routers.enrollment-${COMPOSE_PROJECT_NAME}.tls=true"
- "traefik.http.routers.enrollment-${COMPOSE_PROJECT_NAME}.tls.certresolver=letsencrypt"
networks:
- ingress

vueclient:
image: ghcr.io/uwcirg/helloworld-vue-client-sof:${VUECLIENT_IMAGE_TAG:-latest}
messaging:
image: ghcr.io/uwcirg/isacc-messaging-client-sof:${MESSAGING_IMAGE_TAG:-latest}
env_file:
- vueclient.env
- messaging.env
depends_on:
- fhir
labels:
- "traefik.enable=true"
- "traefik.http.routers.vueclient-${COMPOSE_PROJECT_NAME}.rule=Host(`vueclient.${BASE_DOMAIN:-localtest.me}`)"
- "traefik.http.routers.vueclient-${COMPOSE_PROJECT_NAME}.entrypoints=websecure"
- "traefik.http.routers.vueclient-${COMPOSE_PROJECT_NAME}.tls=true"
- "traefik.http.routers.vueclient-${COMPOSE_PROJECT_NAME}.tls.certresolver=letsencrypt"
- "traefik.http.routers.messaging-${COMPOSE_PROJECT_NAME}.rule=Host(`messaging.${BASE_DOMAIN:-localtest.me}`)"
- "traefik.http.routers.messaging-${COMPOSE_PROJECT_NAME}.entrypoints=websecure"
- "traefik.http.routers.messaging-${COMPOSE_PROJECT_NAME}.tls=true"
- "traefik.http.routers.messaging-${COMPOSE_PROJECT_NAME}.tls.certresolver=letsencrypt"
networks:
- ingress

Expand Down
2 changes: 1 addition & 1 deletion dev/vueclient.env.default → dev/enrollment.env.default
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Example docker-compose environment file
# Copy to vueclient.env and modify as necessary
# Copy to enroll.env and modify as necessary
# https://docs.docker.com/compose/env-file/

# Variables defined in this file will only be available to containers/images
Expand Down
2 changes: 1 addition & 1 deletion dev/femr.env.default
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

# JWT with embeded secret to match PGRST_JWT_SECRET from logs.env
LOGSERVER_TOKEN=
PROJECT_NAME=HelloWorld
PROJECT_NAME=ISACC

# OIDC_CLIENT_SECRET must match __KEYCLOAK_FEMR_REALM_FEMR_OPENID_CLIENT_SECRET
OIDC_CLIENT_SECRET=
Expand Down
3 changes: 2 additions & 1 deletion dev/keycloak.env.default
Original file line number Diff line number Diff line change
Expand Up @@ -29,5 +29,6 @@ __KEYCLOAK_FEMR_REALM_BROKER_CLIENT_SECRET=
__KEYCLOAK_FEMR_REALM_REALM_MANAGEMENT_CLIENT_SECRET=
__KEYCLOAK_FEMR_REALM_SECURITY_ADMIN_CONSOLE_CLIENT_SECRET=
__KEYCLOAK_FEMR_REALM_FEMR_OPENID_CLIENT_SECRET=
__KEYCLOAK_FEMR_REALM_PUBCLIENT_OPENID_CLIENT_SECRET=
__KEYCLOAK_FEMR_REALM_ENROLLMENT_OPENID_CLIENT_SECRET=
__KEYCLOAK_FEMR_REALM_MESSAGING_OPENID_CLIENT_SECRET=
__KEYCLOAK_FEMR_REALM_LOGSERVER_OPENID_CLIENT_SECRET=
7 changes: 1 addition & 6 deletions dev/pubclient.env.default → dev/messaging.env.default
Original file line number Diff line number Diff line change
@@ -1,11 +1,6 @@
# Example docker-compose environment file
# Copy to pubclient.env and modify as necessary
# Copy to messaging.env and modify as necessary
# https://docs.docker.com/compose/env-file/

# Variables defined in this file will only be available to containers/images
# ie not for interpolation in docker-compose YAML files

# must match __KEYCLOAK_FEMR_REALM_PUBCLIENT_OPENID_CLIENT_SECRET
OIDC_CLIENT_SECRET=

SECRET_KEY=

0 comments on commit 0446828

Please sign in to comment.