mirror of
https://github.com/samply/bridgehead.git
synced 2025-06-16 21:50:14 +02:00
Compare commits
24 Commits
feature/cB
...
qr_bbmri
Author | SHA1 | Date | |
---|---|---|---|
502eef0cc8 | |||
c4b7620fd6 | |||
6a21a5b641 | |||
c04ffc5f33 | |||
714e46f082 | |||
29c2b5ef69 | |||
b1bdf48e55 | |||
433edde75a | |||
fe3fc6204a | |||
4b3b13b101 | |||
1afbf88a76 | |||
7d5f771181 | |||
f9a9baf13d | |||
d4259406a9 | |||
0745eab7b5 | |||
b404277083 | |||
b767b3230f | |||
dd653a7871 | |||
7418861e8c | |||
94b2c29bc7 | |||
ac3ff314ff | |||
2831fb9a22 | |||
7934d912b8 | |||
70ad318b28 |
@ -1,6 +1,6 @@
|
|||||||
version: "3.7"
|
version: "3.7"
|
||||||
|
|
||||||
# This includes only the shared persistence for BBMRI-ERIC and GBN. Federation components are included as modules, see vars.
|
# This includes only the shared persistence for BBMRI-ERIC and GBN. Federation components are included as modules, see ccp vars.
|
||||||
|
|
||||||
services:
|
services:
|
||||||
blaze:
|
blaze:
|
||||||
|
67
bbmri/modules/exporter-compose.yml
Normal file
67
bbmri/modules/exporter-compose.yml
Normal file
@ -0,0 +1,67 @@
|
|||||||
|
version: "3.7"
|
||||||
|
|
||||||
|
services:
|
||||||
|
exporter:
|
||||||
|
image: docker.verbis.dkfz.de/ccp/dktk-exporter:latest
|
||||||
|
container_name: bridgehead-ccp-exporter
|
||||||
|
environment:
|
||||||
|
JAVA_OPTS: "-Xms1G -Xmx8G -XX:+UseG1GC"
|
||||||
|
LOG_LEVEL: "INFO"
|
||||||
|
EXPORTER_API_KEY: "${EXPORTER_API_KEY}" # Set in exporter-setup.sh
|
||||||
|
CROSS_ORIGINS: "https://${HOST}"
|
||||||
|
EXPORTER_DB_USER: "exporter"
|
||||||
|
EXPORTER_DB_PASSWORD: "${EXPORTER_DB_PASSWORD}" # Set in exporter-setup.sh
|
||||||
|
EXPORTER_DB_URL: "jdbc:postgresql://exporter-db:5432/exporter"
|
||||||
|
HTTP_RELATIVE_PATH: "/ccp-exporter"
|
||||||
|
SITE: "${SITE_ID}"
|
||||||
|
HTTP_SERVLET_REQUEST_SCHEME: "https"
|
||||||
|
OPAL_PASSWORD: "${EXPORTER_OPAL_PASSWORD}"
|
||||||
|
labels:
|
||||||
|
- "traefik.enable=true"
|
||||||
|
- "traefik.http.routers.exporter_ccp.rule=PathPrefix(`/ccp-exporter`)"
|
||||||
|
- "traefik.http.services.exporter_ccp.loadbalancer.server.port=8092"
|
||||||
|
- "traefik.http.routers.exporter_ccp.tls=true"
|
||||||
|
- "traefik.http.middlewares.exporter_ccp_strip.stripprefix.prefixes=/ccp-exporter"
|
||||||
|
- "traefik.http.routers.exporter_ccp.middlewares=exporter_ccp_strip"
|
||||||
|
volumes:
|
||||||
|
- "/var/cache/bridgehead/ccp/exporter-files:/app/exporter-files/output"
|
||||||
|
|
||||||
|
exporter-db:
|
||||||
|
image: docker.verbis.dkfz.de/cache/postgres:${POSTGRES_TAG}
|
||||||
|
container_name: bridgehead-ccp-exporter-db
|
||||||
|
environment:
|
||||||
|
POSTGRES_USER: "exporter"
|
||||||
|
POSTGRES_PASSWORD: "${EXPORTER_DB_PASSWORD}" # Set in exporter-setup.sh
|
||||||
|
POSTGRES_DB: "exporter"
|
||||||
|
volumes:
|
||||||
|
# Consider removing this volume once we find a solution to save Lens-queries to be executed in the explorer.
|
||||||
|
- "/var/cache/bridgehead/ccp/exporter-db:/var/lib/postgresql/data"
|
||||||
|
|
||||||
|
reporter:
|
||||||
|
image: docker.verbis.dkfz.de/ccp/dktk-reporter:latest
|
||||||
|
container_name: bridgehead-ccp-reporter
|
||||||
|
environment:
|
||||||
|
JAVA_OPTS: "-Xms1G -Xmx8G -XX:+UseG1GC"
|
||||||
|
LOG_LEVEL: "INFO"
|
||||||
|
CROSS_ORIGINS: "https://${HOST}"
|
||||||
|
HTTP_RELATIVE_PATH: "/ccp-reporter"
|
||||||
|
SITE: "${SITE_ID}"
|
||||||
|
EXPORTER_API_KEY: "${EXPORTER_API_KEY}" # Set in exporter-setup.sh
|
||||||
|
EXPORTER_URL: "http://exporter:8092"
|
||||||
|
LOG_FHIR_VALIDATION: "false"
|
||||||
|
HTTP_SERVLET_REQUEST_SCHEME: "https"
|
||||||
|
|
||||||
|
# In this initial development state of the bridgehead, we are trying to have so many volumes as possible.
|
||||||
|
# However, in the first executions in the CCP sites, this volume seems to be very important. A report is
|
||||||
|
# a process that can take several hours, because it depends on the exporter.
|
||||||
|
# There is a risk that the bridgehead restarts, losing the already created export.
|
||||||
|
|
||||||
|
volumes:
|
||||||
|
- "/var/cache/bridgehead/ccp/reporter-files:/app/reports"
|
||||||
|
labels:
|
||||||
|
- "traefik.enable=true"
|
||||||
|
- "traefik.http.routers.reporter_ccp.rule=PathPrefix(`/ccp-reporter`)"
|
||||||
|
- "traefik.http.services.reporter_ccp.loadbalancer.server.port=8095"
|
||||||
|
- "traefik.http.routers.reporter_ccp.tls=true"
|
||||||
|
- "traefik.http.middlewares.reporter_ccp_strip.stripprefix.prefixes=/ccp-reporter"
|
||||||
|
- "traefik.http.routers.reporter_ccp.middlewares=reporter_ccp_strip"
|
8
bbmri/modules/exporter-setup.sh
Normal file
8
bbmri/modules/exporter-setup.sh
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
#!/bin/bash -e
|
||||||
|
|
||||||
|
if [ "$ENABLE_EXPORTER" == true ]; then
|
||||||
|
log INFO "Exporter setup detected -- will start Exporter service."
|
||||||
|
OVERRIDE+=" -f ./$PROJECT/modules/exporter-compose.yml"
|
||||||
|
EXPORTER_DB_PASSWORD="$(echo \"This is a salt string to generate one consistent password for the exporter. It is not required to be secret.\" | sha1sum | openssl pkeyutl -sign -inkey /etc/bridgehead/pki/${SITE_ID}.priv.pem | base64 | head -c 30)"
|
||||||
|
EXPORTER_API_KEY="$(echo \"This is a salt string to generate one consistent API KEY for the exporter. It is not required to be secret.\" | sha1sum | openssl pkeyutl -sign -inkey /etc/bridgehead/pki/${SITE_ID}.priv.pem | base64 | head -c 64)"
|
||||||
|
fi
|
15
bbmri/modules/exporter.md
Normal file
15
bbmri/modules/exporter.md
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
# Exporter and Reporter
|
||||||
|
|
||||||
|
|
||||||
|
## Exporter
|
||||||
|
The exporter is a REST API that exports the data of the different databases of the bridgehead in a set of tables.
|
||||||
|
It can accept different output formats as CSV, Excel, JSON or XML. It can also export data into Opal.
|
||||||
|
|
||||||
|
## Exporter-DB
|
||||||
|
It is a database to save queries for its execution in the exporter.
|
||||||
|
The exporter manages also the different executions of the same query in through the database.
|
||||||
|
|
||||||
|
## Reporter
|
||||||
|
This component is a plugin of the exporter that allows to create more complex Excel reports described in templates.
|
||||||
|
It is compatible with different template engines as Groovy, Thymeleaf,...
|
||||||
|
It is perfect to generate a document as our traditional CCP quality report.
|
81
bbmri/modules/teiler-compose.yml
Normal file
81
bbmri/modules/teiler-compose.yml
Normal file
@ -0,0 +1,81 @@
|
|||||||
|
version: "3.7"
|
||||||
|
|
||||||
|
services:
|
||||||
|
|
||||||
|
teiler-orchestrator:
|
||||||
|
image: docker.verbis.dkfz.de/cache/samply/teiler-orchestrator:latest
|
||||||
|
container_name: bridgehead-teiler-orchestrator
|
||||||
|
labels:
|
||||||
|
- "traefik.enable=true"
|
||||||
|
- "traefik.http.routers.teiler_orchestrator_ccp.rule=PathPrefix(`/ccp-teiler`)"
|
||||||
|
- "traefik.http.services.teiler_orchestrator_ccp.loadbalancer.server.port=9000"
|
||||||
|
- "traefik.http.routers.teiler_orchestrator_ccp.tls=true"
|
||||||
|
- "traefik.http.middlewares.teiler_orchestrator_ccp_strip.stripprefix.prefixes=/ccp-teiler"
|
||||||
|
- "traefik.http.routers.teiler_orchestrator_ccp.middlewares=teiler_orchestrator_ccp_strip"
|
||||||
|
environment:
|
||||||
|
TEILER_BACKEND_URL: "https://${HOST}/ccp-teiler-backend"
|
||||||
|
TEILER_DASHBOARD_URL: "https://${HOST}/ccp-teiler-dashboard"
|
||||||
|
DEFAULT_LANGUAGE: "${TEILER_DEFAULT_LANGUAGE_LOWER_CASE}"
|
||||||
|
HTTP_RELATIVE_PATH: "/ccp-teiler"
|
||||||
|
|
||||||
|
teiler-dashboard:
|
||||||
|
image: docker.verbis.dkfz.de/cache/samply/teiler-dashboard:develop
|
||||||
|
container_name: bridgehead-teiler-dashboard
|
||||||
|
labels:
|
||||||
|
- "traefik.enable=true"
|
||||||
|
- "traefik.http.routers.teiler_dashboard_ccp.rule=PathPrefix(`/ccp-teiler-dashboard`)"
|
||||||
|
- "traefik.http.services.teiler_dashboard_ccp.loadbalancer.server.port=80"
|
||||||
|
- "traefik.http.routers.teiler_dashboard_ccp.tls=true"
|
||||||
|
- "traefik.http.middlewares.teiler_dashboard_ccp_strip.stripprefix.prefixes=/ccp-teiler-dashboard"
|
||||||
|
- "traefik.http.routers.teiler_dashboard_ccp.middlewares=teiler_dashboard_ccp_strip"
|
||||||
|
environment:
|
||||||
|
DEFAULT_LANGUAGE: "${TEILER_DEFAULT_LANGUAGE}"
|
||||||
|
TEILER_BACKEND_URL: "https://${HOST}/ccp-teiler-backend"
|
||||||
|
OIDC_URL: "${OIDC_URL}"
|
||||||
|
OIDC_REALM: "${OIDC_REALM}"
|
||||||
|
OIDC_CLIENT_ID: "${OIDC_PUBLIC_CLIENT_ID}"
|
||||||
|
OIDC_TOKEN_GROUP: "${OIDC_GROUP_CLAIM}"
|
||||||
|
TEILER_ADMIN_NAME: "${OPERATOR_FIRST_NAME} ${OPERATOR_LAST_NAME}"
|
||||||
|
TEILER_ADMIN_EMAIL: "${OPERATOR_EMAIL}"
|
||||||
|
TEILER_ADMIN_PHONE: "${OPERATOR_PHONE}"
|
||||||
|
TEILER_PROJECT: "${PROJECT}"
|
||||||
|
EXPORTER_API_KEY: "${EXPORTER_API_KEY}"
|
||||||
|
TEILER_ORCHESTRATOR_URL: "https://${HOST}/ccp-teiler"
|
||||||
|
TEILER_DASHBOARD_HTTP_RELATIVE_PATH: "/ccp-teiler-dashboard"
|
||||||
|
TEILER_ORCHESTRATOR_HTTP_RELATIVE_PATH: "/ccp-teiler"
|
||||||
|
TEILER_USER: "${OIDC_USER_GROUP}"
|
||||||
|
TEILER_ADMIN: "${OIDC_ADMIN_GROUP}"
|
||||||
|
REPORTER_DEFAULT_TEMPLATE_ID: "bbmri-qb"
|
||||||
|
EXPORTER_DEFAULT_TEMPLATE_ID: "bbmri"
|
||||||
|
|
||||||
|
|
||||||
|
teiler-backend:
|
||||||
|
image: docker.verbis.dkfz.de/ccp/dktk-teiler-backend:latest
|
||||||
|
container_name: bridgehead-teiler-backend
|
||||||
|
labels:
|
||||||
|
- "traefik.enable=true"
|
||||||
|
- "traefik.http.routers.teiler_backend_ccp.rule=PathPrefix(`/ccp-teiler-backend`)"
|
||||||
|
- "traefik.http.services.teiler_backend_ccp.loadbalancer.server.port=8085"
|
||||||
|
- "traefik.http.routers.teiler_backend_ccp.tls=true"
|
||||||
|
- "traefik.http.middlewares.teiler_backend_ccp_strip.stripprefix.prefixes=/ccp-teiler-backend"
|
||||||
|
- "traefik.http.routers.teiler_backend_ccp.middlewares=teiler_backend_ccp_strip"
|
||||||
|
environment:
|
||||||
|
LOG_LEVEL: "INFO"
|
||||||
|
APPLICATION_PORT: "8085"
|
||||||
|
APPLICATION_ADDRESS: "${HOST}"
|
||||||
|
DEFAULT_LANGUAGE: "${TEILER_DEFAULT_LANGUAGE}"
|
||||||
|
CONFIG_ENV_VAR_PATH: "/run/secrets/ccp.conf"
|
||||||
|
TEILER_ORCHESTRATOR_HTTP_RELATIVE_PATH: "/ccp-teiler"
|
||||||
|
TEILER_ORCHESTRATOR_URL: "https://${HOST}/ccp-teiler"
|
||||||
|
TEILER_DASHBOARD_DE_URL: "https://${HOST}/ccp-teiler-dashboard/de"
|
||||||
|
TEILER_DASHBOARD_EN_URL: "https://${HOST}/ccp-teiler-dashboard/en"
|
||||||
|
CENTRAX_URL: "${CENTRAXX_URL}"
|
||||||
|
HTTP_PROXY: "http://forward_proxy:3128"
|
||||||
|
ENABLE_MTBA: "${ENABLE_MTBA}"
|
||||||
|
ENABLE_DATASHIELD: "${ENABLE_DATASHIELD}"
|
||||||
|
secrets:
|
||||||
|
- ccp.conf
|
||||||
|
|
||||||
|
secrets:
|
||||||
|
ccp.conf:
|
||||||
|
file: /etc/bridgehead/ccp.conf
|
9
bbmri/modules/teiler-setup.sh
Normal file
9
bbmri/modules/teiler-setup.sh
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
#!/bin/bash -e
|
||||||
|
|
||||||
|
if [ "$ENABLE_TEILER" == true ];then
|
||||||
|
log INFO "Teiler setup detected -- will start Teiler services."
|
||||||
|
OVERRIDE+=" -f ./$PROJECT/modules/teiler-compose.yml"
|
||||||
|
TEILER_DEFAULT_LANGUAGE=DE
|
||||||
|
TEILER_DEFAULT_LANGUAGE_LOWER_CASE=${TEILER_DEFAULT_LANGUAGE,,}
|
||||||
|
add_public_oidc_redirect_url "/ccp-teiler/*"
|
||||||
|
fi
|
19
bbmri/modules/teiler.md
Normal file
19
bbmri/modules/teiler.md
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
# Teiler
|
||||||
|
This module orchestrates the different microfrontends of the bridgehead as a single page application.
|
||||||
|
|
||||||
|
## Teiler Orchestrator
|
||||||
|
Single SPA component that consists on the root HTML site of the single page application and a javascript code that
|
||||||
|
gets the information about the microfrontend calling the teiler backend and is responsible for registering them. With the
|
||||||
|
resulting mapping, it can initialize, mount and unmount the required microfrontends on the fly.
|
||||||
|
|
||||||
|
The microfrontends run independently in different containers and can be based on different frameworks (Angular, Vue, React,...)
|
||||||
|
This microfrontends can run as single alone but need an extension with Single-SPA (https://single-spa.js.org/docs/ecosystem).
|
||||||
|
There are also available three templates (Angular, Vue, React) to be directly extended to be used directly in the teiler.
|
||||||
|
|
||||||
|
## Teiler Dashboard
|
||||||
|
It consists on the main dashboard and a set of embedded services.
|
||||||
|
### Login
|
||||||
|
user and password in ccp.local.conf
|
||||||
|
|
||||||
|
## Teiler Backend
|
||||||
|
In this component, the microfrontends are configured.
|
12
bbmri/vars
12
bbmri/vars
@ -7,6 +7,18 @@
|
|||||||
FOCUS_RETRY_COUNT=32
|
FOCUS_RETRY_COUNT=32
|
||||||
PRIVATEKEYFILENAME=/etc/bridgehead/pki/${SITE_ID}.priv.pem
|
PRIVATEKEYFILENAME=/etc/bridgehead/pki/${SITE_ID}.priv.pem
|
||||||
|
|
||||||
|
OIDC_USER_GROUP="DKTK_CCP_$(capitalize_first_letter ${SITE_ID})"
|
||||||
|
OIDC_ADMIN_GROUP="DKTK_CCP_$(capitalize_first_letter ${SITE_ID})_Verwalter"
|
||||||
|
OIDC_PRIVATE_CLIENT_ID=${SITE_ID}-private
|
||||||
|
OIDC_PUBLIC_CLIENT_ID=${SITE_ID}-public
|
||||||
|
# Use "test-realm-01" for testing
|
||||||
|
OIDC_REALM="${OIDC_REALM:-master}"
|
||||||
|
OIDC_URL="https://login.verbis.dkfz.de"
|
||||||
|
OIDC_ISSUER_URL="${OIDC_URL}/realms/${OIDC_REALM}"
|
||||||
|
OIDC_GROUP_CLAIM="groups"
|
||||||
|
|
||||||
|
POSTGRES_TAG=15.6-alpine
|
||||||
|
|
||||||
for module in $PROJECT/modules/*.sh
|
for module in $PROJECT/modules/*.sh
|
||||||
do
|
do
|
||||||
log DEBUG "sourcing $module"
|
log DEBUG "sourcing $module"
|
||||||
|
@ -96,6 +96,8 @@ case "$ACTION" in
|
|||||||
;;
|
;;
|
||||||
stop)
|
stop)
|
||||||
loadVars
|
loadVars
|
||||||
|
# Kill stale secret-sync instances if present
|
||||||
|
docker kill $(docker ps -q --filter ancestor=docker.verbis.dkfz.de/cache/samply/secret-sync-local) 2>/dev/null || true
|
||||||
# HACK: This is temporarily to properly shut down false bridgehead instances (bridgehead-ccp instead ccp)
|
# HACK: This is temporarily to properly shut down false bridgehead instances (bridgehead-ccp instead ccp)
|
||||||
$COMPOSE -p bridgehead-$PROJECT -f ./minimal/docker-compose.yml -f ./$PROJECT/docker-compose.yml $OVERRIDE down
|
$COMPOSE -p bridgehead-$PROJECT -f ./minimal/docker-compose.yml -f ./$PROJECT/docker-compose.yml $OVERRIDE down
|
||||||
exec $COMPOSE -p $PROJECT -f ./minimal/docker-compose.yml -f ./$PROJECT/docker-compose.yml $OVERRIDE down
|
exec $COMPOSE -p $PROJECT -f ./minimal/docker-compose.yml -f ./$PROJECT/docker-compose.yml $OVERRIDE down
|
||||||
|
@ -21,7 +21,7 @@ services:
|
|||||||
- "traefik.http.routers.blaze_ccp.tls=true"
|
- "traefik.http.routers.blaze_ccp.tls=true"
|
||||||
|
|
||||||
focus:
|
focus:
|
||||||
image: docker.verbis.dkfz.de/cache/samply/focus:0.4.1
|
image: docker.verbis.dkfz.de/cache/samply/focus:0.4.4
|
||||||
container_name: bridgehead-focus
|
container_name: bridgehead-focus
|
||||||
environment:
|
environment:
|
||||||
API_KEY: ${FOCUS_BEAM_SECRET_SHORT}
|
API_KEY: ${FOCUS_BEAM_SECRET_SHORT}
|
||||||
|
@ -29,6 +29,7 @@ services:
|
|||||||
container_name: bridgehead-patientlist
|
container_name: bridgehead-patientlist
|
||||||
environment:
|
environment:
|
||||||
- TOMCAT_REVERSEPROXY_FQDN=${HOST}
|
- TOMCAT_REVERSEPROXY_FQDN=${HOST}
|
||||||
|
- TOMCAT_REVERSEPROXY_SSL=true
|
||||||
- ML_SITE=${IDMANAGEMENT_FRIENDLY_ID}
|
- ML_SITE=${IDMANAGEMENT_FRIENDLY_ID}
|
||||||
- ML_DB_PASS=${PATIENTLIST_POSTGRES_PASSWORD}
|
- ML_DB_PASS=${PATIENTLIST_POSTGRES_PASSWORD}
|
||||||
- ML_API_KEY=${IDMANAGER_LOCAL_PATIENTLIST_APIKEY}
|
- ML_API_KEY=${IDMANAGER_LOCAL_PATIENTLIST_APIKEY}
|
||||||
|
@ -164,15 +164,15 @@ setHostname() {
|
|||||||
optimizeBlazeMemoryUsage() {
|
optimizeBlazeMemoryUsage() {
|
||||||
if [ -z "$BLAZE_MEMORY_CAP" ]; then
|
if [ -z "$BLAZE_MEMORY_CAP" ]; then
|
||||||
system_memory_in_mb=$(LC_ALL=C free -m | grep 'Mem:' | awk '{print $2}');
|
system_memory_in_mb=$(LC_ALL=C free -m | grep 'Mem:' | awk '{print $2}');
|
||||||
export BLAZE_MEMORY_CAP=$(("$system_memory_in_mb"/4));
|
export BLAZE_MEMORY_CAP=$(($system_memory_in_mb/4));
|
||||||
fi
|
fi
|
||||||
if [ -z "$BLAZE_RESOURCE_CACHE_CAP" ]; then
|
if [ -z "$BLAZE_RESOURCE_CACHE_CAP" ]; then
|
||||||
available_system_memory_chuncks=$((BLAZE_MEMORY_CAP / 1000))
|
available_system_memory_chunks=$((BLAZE_MEMORY_CAP / 1000))
|
||||||
if [ $available_system_memory_chuncks -eq 0 ]; then
|
if [ $available_system_memory_chunks -eq 0 ]; then
|
||||||
log WARN "Only ${BLAZE_MEMORY_CAP} system memory available for Blaze. If your Blaze stores more than 128000 fhir ressources it will run significally slower."
|
log WARN "Only ${BLAZE_MEMORY_CAP} system memory available for Blaze. If your Blaze stores more than 128000 fhir ressources it will run significally slower."
|
||||||
export BLAZE_RESOURCE_CACHE_CAP=128000;
|
export BLAZE_RESOURCE_CACHE_CAP=128000;
|
||||||
else
|
else
|
||||||
export BLAZE_RESOURCE_CACHE_CAP=$((available_system_memory_chuncks * 312500))
|
export BLAZE_RESOURCE_CACHE_CAP=$((available_system_memory_chunks * 312500))
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
@ -289,7 +289,7 @@ function sync_secrets() {
|
|||||||
if [[ $OIDC_PRIVATE_REDIRECT_URLS != "" ]]; then
|
if [[ $OIDC_PRIVATE_REDIRECT_URLS != "" ]]; then
|
||||||
secret_sync_args="OIDC:OIDC_CLIENT_SECRET:private;$OIDC_PRIVATE_REDIRECT_URLS"
|
secret_sync_args="OIDC:OIDC_CLIENT_SECRET:private;$OIDC_PRIVATE_REDIRECT_URLS"
|
||||||
fi
|
fi
|
||||||
if [[ $OIDC_PRIVATE_REDIRECT_URLS != "" ]]; then
|
if [[ $OIDC_PUBLIC_REDIRECT_URLS != "" ]]; then
|
||||||
if [[ $secret_sync_args == "" ]]; then
|
if [[ $secret_sync_args == "" ]]; then
|
||||||
secret_sync_args="OIDC:OIDC_PUBLIC:public;$OIDC_PUBLIC_REDIRECT_URLS"
|
secret_sync_args="OIDC:OIDC_PUBLIC:public;$OIDC_PUBLIC_REDIRECT_URLS"
|
||||||
else
|
else
|
||||||
@ -299,18 +299,33 @@ function sync_secrets() {
|
|||||||
if [[ $secret_sync_args == "" ]]; then
|
if [[ $secret_sync_args == "" ]]; then
|
||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ "${ENABLE_ERIC}" == "true" ]; then
|
||||||
|
BROKER_ROOT_CERT=/srv/docker/bridgehead/bbmri/$ERIC_ROOT_CERT.crt.pem
|
||||||
|
PROXY_ID=$ERIC_PROXY_ID
|
||||||
|
BROKER_ID=$ERIC_BROKER_ID
|
||||||
|
elif [ "${ENABLE_GBN}" == "true" ]; then
|
||||||
|
BROKER_ROOT_CERT=/srv/docker/bridgehead/bbmri/$GBN_ROOT_CERT.crt.pem
|
||||||
|
PROXY_ID=$GBN_PROXY_ID
|
||||||
|
BROKER_ID=$GBN_BROKER_ID
|
||||||
|
elif [ "${PROJECT}" == "ccp"]; then
|
||||||
|
BROKER_ROOT_CERT=/srv/docker/bridgehead/ccp/root.crt.pem
|
||||||
|
else
|
||||||
|
fail_and_report 1 "Could not start secret sync as the configuration does not seem to use beam"
|
||||||
|
fi
|
||||||
|
local broker_url="https://$BROKER_ID"
|
||||||
mkdir -p /var/cache/bridgehead/secrets/ || fail_and_report 1 "Failed to create '/var/cache/bridgehead/secrets/'. Please run sudo './bridgehead install $PROJECT' again."
|
mkdir -p /var/cache/bridgehead/secrets/ || fail_and_report 1 "Failed to create '/var/cache/bridgehead/secrets/'. Please run sudo './bridgehead install $PROJECT' again."
|
||||||
touch /var/cache/bridgehead/secrets/oidc
|
touch /var/cache/bridgehead/secrets/oidc
|
||||||
docker run --rm \
|
docker run --rm \
|
||||||
-v /var/cache/bridgehead/secrets/oidc:/usr/local/cache \
|
-v /var/cache/bridgehead/secrets/oidc:/usr/local/cache \
|
||||||
-v $PRIVATEKEYFILENAME:/run/secrets/privkey.pem:ro \
|
-v $PRIVATEKEYFILENAME:/run/secrets/privkey.pem:ro \
|
||||||
-v /srv/docker/bridgehead/$PROJECT/root.crt.pem:/run/secrets/root.crt.pem:ro \
|
-v $BROKER_ROOT_CERT:/run/secrets/root.crt.pem:ro \
|
||||||
-v /etc/bridgehead/trusted-ca-certs:/conf/trusted-ca-certs:ro \
|
-v /etc/bridgehead/trusted-ca-certs:/conf/trusted-ca-certs:ro \
|
||||||
-e TLS_CA_CERTIFICATES_DIR=/conf/trusted-ca-certs \
|
-e TLS_CA_CERTIFICATES_DIR=/conf/trusted-ca-certs \
|
||||||
-e NO_PROXY=localhost,127.0.0.1 \
|
-e NO_PROXY=localhost,127.0.0.1 \
|
||||||
-e ALL_PROXY=$HTTPS_PROXY_FULL_URL \
|
-e ALL_PROXY=$HTTPS_PROXY_FULL_URL \
|
||||||
-e PROXY_ID=$PROXY_ID \
|
-e PROXY_ID=$PROXY_ID \
|
||||||
-e BROKER_URL=$BROKER_URL \
|
-e BROKER_URL=$broker_url \
|
||||||
-e OIDC_PROVIDER=secret-sync-central.oidc-client-enrollment.$BROKER_ID \
|
-e OIDC_PROVIDER=secret-sync-central.oidc-client-enrollment.$BROKER_ID \
|
||||||
-e SECRET_DEFINITIONS=$secret_sync_args \
|
-e SECRET_DEFINITIONS=$secret_sync_args \
|
||||||
docker.verbis.dkfz.de/cache/samply/secret-sync-local:latest
|
docker.verbis.dkfz.de/cache/samply/secret-sync-local:latest
|
||||||
|
2
minimal/modules/bbmri vars
Normal file
2
minimal/modules/bbmri vars
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
OIDC_USER_GROUP="DKTK_CCP_$(capitalize_first_letter ${SITE_ID})"
|
||||||
|
OIDC_ADMIN_GROUP="DKTK_CCP_$(capitalize_first_letter ${SITE_ID})_Verwalter"
|
7
minimal/modules/ccp vars
Normal file
7
minimal/modules/ccp vars
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
OIDC_PRIVATE_CLIENT_ID=${SITE_ID}-private
|
||||||
|
OIDC_PUBLIC_CLIENT_ID=${SITE_ID}-public
|
||||||
|
# Use "test-realm-01" for testing
|
||||||
|
OIDC_REALM="${OIDC_REALM:-master}"
|
||||||
|
OIDC_URL="https://login.verbis.dkfz.de"
|
||||||
|
OIDC_ISSUER_URL="${OIDC_URL}/realms/${OIDC_REALM}"
|
||||||
|
OIDC_GROUP_CLAIM="groups"
|
Reference in New Issue
Block a user