-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow TLS termination from ENV var (#262)
* Enable https from env vars * Pass BE https to FE * Add https urls for v3 * Add OIDC urls for v4 * Update readmes * Add https xforwar to keycloak
- Loading branch information
Showing
26 changed files
with
143 additions
and
56 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../../../.empty.yaml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
services: | ||
keycloak: | ||
image: quay.io/keycloak/keycloak:25.0 | ||
command: start-dev --import-realm --http-port=80 | ||
env_file: ./config/.env | ||
volumes: | ||
- ./healthcheck/healthcheck.sh:/healthcheck.sh | ||
- ./config/facility-realm.json:/opt/keycloak/data/import/facility-realm.json:ro | ||
labels: | ||
- traefik.http.services.keycloak.loadbalancer.server.port=80 | ||
healthcheck: | ||
test: bash /healthcheck.sh | ||
start_period: 5s | ||
interval: 30s | ||
timeout: 10s | ||
retries: 5 | ||
restart: on-failure |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
services: | ||
keycloak: | ||
env_file: | ||
- ./config/.https.env | ||
labels: | ||
- traefik.http.services.keycloak.loadbalancer.passhostheader=true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,4 @@ | ||
services: | ||
keycloak: | ||
image: quay.io/keycloak/keycloak:25.0 | ||
command: start-dev --import-realm --http-port=80 | ||
env_file: ./config/.env | ||
volumes: | ||
- ./healthcheck/healthcheck.sh:/healthcheck.sh | ||
- ./config/facility-realm.json:/opt/keycloak/data/import/facility-realm.json:ro | ||
labels: | ||
- traefik.http.services.keycloak.loadbalancer.server.port=80 | ||
healthcheck: | ||
test: bash /healthcheck.sh | ||
start_period: 5s | ||
interval: 30s | ||
timeout: 10s | ||
retries: 5 | ||
restart: on-failure | ||
include: | ||
- path: | ||
- compose.base.yaml | ||
- .${KEYCLOAK_HTTPS_URL:+/}compose.https.yaml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
KC_PROXY_HEADERS=xforwarded | ||
PROXY_ADDRESS_FORWARDING=true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,4 +4,5 @@ for config in $(find /config -maxdepth 1 -type f -exec basename {} \; | cut -d ' | |
do | ||
# shellcheck disable=SC2016 | ||
npx --yes [email protected] -s 'reduce .[] as $item ({}; . * $item)' /config/"${config}"*.json > /home/node/app/server/"${config}".json | ||
npx --yes envsub /home/node/app/server/"${config}".json | ||
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../../../.empty.yaml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
services: | ||
backend: | ||
volumes: | ||
# wait for kecyloak to get certificate | ||
- ./entrypoints/sleep.sh:/docker-entrypoints/1.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
OIDC_ISSUER=http://keycloak.localhost/realms/facility | ||
OIDC_ISSUER=${KEYCLOAK_HTTPS_URL:-http://keycloak.localhost}/realms/facility | ||
OIDC_CLIENT_ID=scicat | ||
OIDC_CLIENT_SECRET=q0bOG6p616zHlz4nxvC6Ex8f6JwGY0NV | ||
OIDC_CALLBACK_URL=http://backend.localhost/api/v3/auth/oidc/callback | ||
OIDC_CALLBACK_URL=${BACKEND_HTTPS_URL:-http://backend.localhost}/api/v3/auth/oidc/callback | ||
OIDC_SCOPE=openid profile email | ||
OIDC_SUCCESS_URL=http://localhost/login | ||
OIDC_SUCCESS_URL=${FRONTEND_HTTPS_URL:-http://localhost}/login | ||
ACCESS_GROUPS_OIDCPAYLOAD_ENABLED=true | ||
OIDC_ACCESS_GROUPS_PROPERTY=accessGroups |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
#!/bin/sh | ||
|
||
sleep 60 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
#!/bin/sh | ||
|
||
apk update && apk add jq | ||
apk update && apk add jq gettext | ||
|
||
jq -s 'reduce .[] as $item ({}; . * $item)' /config/*.json > "${CONFIG_DIR:-/usr/share/nginx/html/assets}"/config.json | ||
jq -s 'reduce .[] as $item ({}; . * $item)' /config/*.json | envsubst \ | ||
> "${CONFIG_DIR:-/usr/share/nginx/html/assets}"/config.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.