Compare commits

..

9 Commits

Author SHA1 Message Date
djuarezgf
90d6993877 mtba: fallback to keycloak test server pending migration 2025-07-24 09:25:16 +02:00
djuarezgf
e037d8a8bc feat: migrate PSP to Authentik (#329) 2025-07-24 09:25:16 +02:00
Jan
930612221d feat(dnpm): allow setting custom dnpm image tag (#326) 2025-07-24 09:25:16 +02:00
djuarezgf
03e3260f68 Fixed: Authentik URL for Opal (#328)
* Fixed: Authentik URL for Opal

* Removed: Unnecessary OIDC config in CCE and BBMRI

* KR with basic auth instead of OIDC
2025-07-24 09:25:16 +02:00
djuarezgf
64e53f0905 feat: migrate OIDC Configuration from Keycloak to Authentik (#327)
* Change: Authentik instead of Keycloak in CCP

Co-authored-by: Jan <59206115+Threated@users.noreply.github.com>

---------

Co-authored-by: Jan <59206115+Threated@users.noreply.github.com>
2025-07-24 09:25:16 +02:00
p.delpy@dkfz-heidelberg.de
1da0a35626 fix: add pscc changes 2025-07-03 07:27:15 +02:00
Jan
4c6f9e0f13 feat: remove local rstudio (#322) 2025-06-27 10:55:53 +02:00
djuarezgf
a1cdc2659d CCE Teiler and Export (#323)
* Added Exporter to CCE

* Add Teiler to CCE

* Add EXPORTER_USER to adduser function
2025-06-25 15:53:29 +02:00
Pierre Delpy
92bc0557a3 fix: add obfuscation and basic auth to spot in cce and itcc (#324)
Co-authored-by: p.delpy@dkfz-heidelberg.de <p.delpy@dkfz-heidelberg.de>
2025-06-25 14:58:20 +02:00
35 changed files with 505 additions and 251 deletions

View File

@@ -1,15 +0,0 @@
# 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.

View File

@@ -32,9 +32,6 @@ services:
DEFAULT_LANGUAGE: "${TEILER_DEFAULT_LANGUAGE}" DEFAULT_LANGUAGE: "${TEILER_DEFAULT_LANGUAGE}"
TEILER_BACKEND_URL: "/bbmri-teiler-backend" TEILER_BACKEND_URL: "/bbmri-teiler-backend"
TEILER_DASHBOARD_URL: "/bbmri-teiler-dashboard" TEILER_DASHBOARD_URL: "/bbmri-teiler-dashboard"
OIDC_URL: "${OIDC_URL}"
OIDC_CLIENT_ID: "${OIDC_PUBLIC_CLIENT_ID}"
OIDC_TOKEN_GROUP: "${OIDC_GROUP_CLAIM}"
TEILER_ADMIN_NAME: "${OPERATOR_FIRST_NAME} ${OPERATOR_LAST_NAME}" TEILER_ADMIN_NAME: "${OPERATOR_FIRST_NAME} ${OPERATOR_LAST_NAME}"
TEILER_ADMIN_EMAIL: "${OPERATOR_EMAIL}" TEILER_ADMIN_EMAIL: "${OPERATOR_EMAIL}"
TEILER_ADMIN_PHONE: "${OPERATOR_PHONE}" TEILER_ADMIN_PHONE: "${OPERATOR_PHONE}"
@@ -42,8 +39,6 @@ services:
EXPORTER_API_KEY: "${EXPORTER_API_KEY}" EXPORTER_API_KEY: "${EXPORTER_API_KEY}"
TEILER_ORCHESTRATOR_URL: "/bbmri-teiler" TEILER_ORCHESTRATOR_URL: "/bbmri-teiler"
TEILER_ORCHESTRATOR_HTTP_RELATIVE_PATH: "/bbmri-teiler" TEILER_ORCHESTRATOR_HTTP_RELATIVE_PATH: "/bbmri-teiler"
TEILER_USER: "${OIDC_USER_GROUP}"
TEILER_ADMIN: "${OIDC_ADMIN_GROUP}"
REPORTER_DEFAULT_TEMPLATE_ID: "bbmri-qb" REPORTER_DEFAULT_TEMPLATE_ID: "bbmri-qb"
EXPORTER_DEFAULT_TEMPLATE_ID: "bbmri" EXPORTER_DEFAULT_TEMPLATE_ID: "bbmri"

View File

@@ -1,19 +0,0 @@
# 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.

View File

@@ -35,6 +35,9 @@ case "$PROJECT" in
cce) cce)
#nothing extra to do #nothing extra to do
;; ;;
pscc)
#nothing extra to do
;;
itcc) itcc)
#nothing extra to do #nothing extra to do
;; ;;
@@ -162,7 +165,7 @@ case "$ACTION" in
adduser) adduser)
loadVars loadVars
log "INFO" "Adding encrypted credentials in /etc/bridgehead/$PROJECT.local.conf" log "INFO" "Adding encrypted credentials in /etc/bridgehead/$PROJECT.local.conf"
read -p "Please choose the component (LDM_AUTH|NNGM_AUTH) you want to add a user to : " COMPONENT read -p "Please choose the component (LDM_AUTH|NNGM_AUTH|EXPORTER_USER) you want to add a user to : " COMPONENT
read -p "Please enter a username: " USER read -p "Please enter a username: " USER
read -s -p "Please enter a password (will not be echoed): "$'\n' PASSWORD read -s -p "Please enter a password (will not be echoed): "$'\n' PASSWORD
add_basic_auth_user $USER $PASSWORD $COMPONENT $PROJECT add_basic_auth_user $USER $PASSWORD $COMPONENT $PROJECT

View File

@@ -0,0 +1,87 @@
version: "3.7"
services:
exporter:
image: docker.verbis.dkfz.de/ccp/dktk-exporter:latest
container_name: bridgehead-cce-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: "/cce-exporter"
SITE: "${SITE_ID}"
HTTP_SERVLET_REQUEST_SCHEME: "https"
OPAL_PASSWORD: "${EXPORTER_OPAL_PASSWORD}"
labels:
- "traefik.enable=true"
- "traefik.http.routers.exporter_cce.rule=PathPrefix(`/cce-exporter`)"
- "traefik.http.services.exporter_cce.loadbalancer.server.port=8092"
- "traefik.http.routers.exporter_cce.tls=true"
- "traefik.http.middlewares.exporter_cce_strip.stripprefix.prefixes=/cce-exporter"
- "traefik.http.routers.exporter_cce.middlewares=exporter_cce_strip"
# Main router
- "traefik.http.routers.exporter_cce.priority=20"
# API router
- "traefik.http.routers.exporter_cce_api.middlewares=exporter_cce_strip,exporter_auth"
- "traefik.http.routers.exporter_cce_api.rule=PathRegexp(`/cce-exporter/.+`)"
- "traefik.http.routers.exporter_cce_api.tls=true"
- "traefik.http.routers.exporter_cce_api.priority=25"
# Shared middlewares
- "traefik.http.middlewares.exporter_auth.basicauth.users=${EXPORTER_USER}"
volumes:
- "/var/cache/bridgehead/cce/exporter-files:/app/exporter-files/output"
exporter-db:
image: docker.verbis.dkfz.de/cache/postgres:${POSTGRES_TAG}
container_name: bridgehead-cce-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/cce/exporter-db:/var/lib/postgresql/data"
reporter:
image: docker.verbis.dkfz.de/ccp/dktk-reporter:latest
container_name: bridgehead-cce-reporter
environment:
JAVA_OPTS: "-Xms1G -Xmx8G -XX:+UseG1GC"
LOG_LEVEL: "INFO"
CROSS_ORIGINS: "https://${HOST}"
HTTP_RELATIVE_PATH: "/cce-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 cce 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/cce/reporter-files:/app/reports"
labels:
- "traefik.enable=true"
- "traefik.http.routers.reporter_cce.rule=PathPrefix(`/cce-reporter`)"
- "traefik.http.services.reporter_cce.loadbalancer.server.port=8095"
- "traefik.http.routers.reporter_cce.tls=true"
- "traefik.http.middlewares.reporter_cce_strip.stripprefix.prefixes=/cce-reporter"
- "traefik.http.routers.reporter_cce.middlewares=reporter_cce_strip"
- "traefik.http.routers.reporter_cce.priority=20"
- "traefik.http.routers.reporter_cce_api.middlewares=reporter_cce_strip,exporter_auth"
- "traefik.http.routers.reporter_cce_api.rule=PathRegexp(`/cce-reporter/.+`)"
- "traefik.http.routers.reporter_cce_api.tls=true"
- "traefik.http.routers.reporter_cce_api.priority=25"

View 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

View File

@@ -17,7 +17,6 @@ services:
BEAM_PROXY_ID: ${SITE_ID} BEAM_PROXY_ID: ${SITE_ID}
BEAM_BROKER_ID: ${BROKER_ID} BEAM_BROKER_ID: ${BROKER_ID}
BEAM_APP_ID: "focus" BEAM_APP_ID: "focus"
PROJECT_METADATA: "cce_supervisors"
depends_on: depends_on:
- "beam-proxy" - "beam-proxy"
labels: labels:
@@ -30,4 +29,4 @@ services:
- "traefik.http.routers.spot.rule=Host(`${HOST}`) && PathPrefix(`/backend`)" - "traefik.http.routers.spot.rule=Host(`${HOST}`) && PathPrefix(`/backend`)"
- "traefik.http.middlewares.stripprefix_spot.stripprefix.prefixes=/backend" - "traefik.http.middlewares.stripprefix_spot.stripprefix.prefixes=/backend"
- "traefik.http.routers.spot.tls=true" - "traefik.http.routers.spot.tls=true"
- "traefik.http.routers.spot.middlewares=corsheaders2,stripprefix_spot" - "traefik.http.routers.spot.middlewares=corsheaders2,stripprefix_spot,auth"

View File

@@ -0,0 +1,65 @@
version: "3.7"
services:
blaze-pscc:
image: docker.verbis.dkfz.de/cache/samply/blaze:${BLAZE_TAG}
container_name: bridgehead-pscc-blaze
environment:
BASE_URL: "http://bridgehead-pscc-blaze:8080"
JAVA_TOOL_OPTIONS: "-Xmx${BLAZE_MEMORY_CAP:-4096}m"
DB_RESOURCE_CACHE_SIZE: ${BLAZE_RESOURCE_CACHE_CAP:-2500000}
DB_BLOCK_CACHE_SIZE: ${BLAZE_MEMORY_CAP}
CQL_EXPR_CACHE_SIZE: ${BLAZE_CQL_CACHE_CAP:-32}
ENFORCE_REFERENTIAL_INTEGRITY: "false"
volumes:
- "blaze-data-pscc:/app/data"
labels:
- "traefik.enable=true"
- "traefik.http.routers.blaze_pscc.rule=PathPrefix(`/pscc-localdatamanagement`)"
- "traefik.http.middlewares.pscc_b_strip.stripprefix.prefixes=/pscc-localdatamanagement"
- "traefik.http.services.blaze_pscc.loadbalancer.server.port=8080"
- "traefik.http.routers.blaze_pscc.middlewares=pscc_b_strip"
- "traefik.http.routers.blaze_pscc.tls=true"
focus-pscc:
image: docker.verbis.dkfz.de/cache/samply/focus:${FOCUS_TAG}
container_name: bridgehead-pscc-focus
environment:
API_KEY: ${FOCUS_BEAM_SECRET_SHORT}
BEAM_APP_ID_LONG: focus.${PROXY_ID_PSCC}
PROXY_ID: ${PROXY_ID_PSCC}
BLAZE_URL: "http://bridgehead-pscc-blaze:8080/fhir/"
BEAM_PROXY_URL: http://beam-proxy-pscc:8081
RETRY_COUNT: ${FOCUS_RETRY_COUNT}
EPSILON: 0.28
ENDPOINT_TYPE: ${FOCUS_ENDPOINT_TYPE:-blaze}
depends_on:
- "beam-proxy"
- "blaze"
beam-proxy-pscc:
image: docker.verbis.dkfz.de/cache/samply/beam-proxy:${BEAM_TAG}
container_name: bridgehead-pscc-beam-proxy
environment:
BROKER_URL: ${BROKER_URL_PSCC}
PROXY_ID: ${PROXY_ID_PSCC}
APP_focus_KEY: ${FOCUS_BEAM_SECRET_SHORT}
PRIVKEY_FILE: /run/secrets/proxy.pem
ALL_PROXY: http://forward_proxy:3128
TLS_CA_CERTIFICATES_DIR: /conf/trusted-ca-certs
ROOTCERT_FILE: /conf/root.crt.pem
secrets:
- proxy.pem
depends_on:
- "forward_proxy"
volumes:
- /etc/bridgehead/trusted-ca-certs:/conf/trusted-ca-certs:ro
- /srv/docker/bridgehead/pscc/root.crt.pem:/conf/root.crt.pem:ro
volumes:
blaze-data-pscc:
secrets:
proxy.pem:
file: /etc/bridgehead/pki/${SITE_ID}.priv.pem

View File

@@ -0,0 +1,5 @@
#!/bin/bash
if [ -n "$ENABLE_PSCC" ];then
OVERRIDE+=" -f ./$PROJECT/modules/pscc-compose.yml"
fi

View File

@@ -0,0 +1,64 @@
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_cce.rule=PathPrefix(`/cce-teiler`)"
- "traefik.http.services.teiler_orchestrator_cce.loadbalancer.server.port=9000"
- "traefik.http.routers.teiler_orchestrator_cce.tls=true"
- "traefik.http.middlewares.teiler_orchestrator_cce_strip.stripprefix.prefixes=/cce-teiler"
- "traefik.http.routers.teiler_orchestrator_cce.middlewares=teiler_orchestrator_cce_strip"
environment:
TEILER_BACKEND_URL: "/cce-teiler-backend"
TEILER_DASHBOARD_URL: "/cce-teiler-dashboard"
DEFAULT_LANGUAGE: "${TEILER_DEFAULT_LANGUAGE_LOWER_CASE}"
HTTP_RELATIVE_PATH: "/cce-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_cce.rule=PathPrefix(`/cce-teiler-dashboard`)"
- "traefik.http.services.teiler_dashboard_cce.loadbalancer.server.port=80"
- "traefik.http.routers.teiler_dashboard_cce.tls=true"
- "traefik.http.middlewares.teiler_dashboard_cce_strip.stripprefix.prefixes=/cce-teiler-dashboard"
- "traefik.http.routers.teiler_dashboard_cce.middlewares=teiler_dashboard_cce_strip"
environment:
DEFAULT_LANGUAGE: "${TEILER_DEFAULT_LANGUAGE}"
TEILER_BACKEND_URL: "/cce-teiler-backend"
TEILER_DASHBOARD_URL: "/cce-teiler-dashboard"
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: "/cce-teiler"
TEILER_ORCHESTRATOR_HTTP_RELATIVE_PATH: "/cce-teiler"
REPORTER_DEFAULT_TEMPLATE_ID: "cce-qb"
EXPORTER_DEFAULT_TEMPLATE_ID: "cce"
teiler-backend:
image: docker.verbis.dkfz.de/ccp/cce-teiler-backend:latest
container_name: bridgehead-teiler-backend
labels:
- "traefik.enable=true"
- "traefik.http.routers.teiler_backend_cce.rule=PathPrefix(`/cce-teiler-backend`)"
- "traefik.http.services.teiler_backend_cce.loadbalancer.server.port=8085"
- "traefik.http.routers.teiler_backend_cce.tls=true"
- "traefik.http.middlewares.teiler_backend_cce_strip.stripprefix.prefixes=/cce-teiler-backend"
- "traefik.http.routers.teiler_backend_cce.middlewares=teiler_backend_cce_strip"
environment:
LOG_LEVEL: "INFO"
APPLICATION_PORT: "8085"
DEFAULT_LANGUAGE: "${TEILER_DEFAULT_LANGUAGE}"
TEILER_ORCHESTRATOR_HTTP_RELATIVE_PATH: "/cce-teiler"
TEILER_ORCHESTRATOR_URL: "/cce-teiler"
TEILER_DASHBOARD_DE_URL: "/cce-teiler-dashboard/de"
TEILER_DASHBOARD_EN_URL: "/cce-teiler-dashboard/en"
HTTP_PROXY: "http://forward_proxy:3128"

View File

@@ -0,0 +1,8 @@
#!/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=EN
TEILER_DEFAULT_LANGUAGE_LOWER_CASE=${TEILER_DEFAULT_LANGUAGE,,}
fi

View File

@@ -1,6 +1,9 @@
BROKER_ID=test-no-real-data.broker.samply.de BROKER_ID=test-no-real-data.broker.samply.de
BROKER_ID_PSCC=test-no-real-data.broker.samply.de
BROKER_URL=https://${BROKER_ID} BROKER_URL=https://${BROKER_ID}
BROKER_URL_PSCC=https://${BROKER_ID}
PROXY_ID=${SITE_ID}.${BROKER_ID} PROXY_ID=${SITE_ID}.${BROKER_ID}
PROXY_ID_PSCC=${SITE_ID}.${BROKER_ID_PSCC}
FOCUS_BEAM_SECRET_SHORT="$(cat /proc/sys/kernel/random/uuid | sed 's/[-]//g' | head -c 20)" FOCUS_BEAM_SECRET_SHORT="$(cat /proc/sys/kernel/random/uuid | sed 's/[-]//g' | head -c 20)"
FOCUS_RETRY_COUNT=${FOCUS_RETRY_COUNT:-64} FOCUS_RETRY_COUNT=${FOCUS_RETRY_COUNT:-64}
SUPPORT_EMAIL=manoj.waikar@dkfz-heidelberg.de SUPPORT_EMAIL=manoj.waikar@dkfz-heidelberg.de

View File

@@ -25,7 +25,7 @@ services:
APP_CONTEXT_PATH: "/opal" APP_CONTEXT_PATH: "/opal"
OPAL_PRIVATE_KEY: "/run/secrets/opal-key.pem" OPAL_PRIVATE_KEY: "/run/secrets/opal-key.pem"
OPAL_CERTIFICATE: "/run/secrets/opal-cert.pem" OPAL_CERTIFICATE: "/run/secrets/opal-cert.pem"
OIDC_URL: "${OIDC_URL}" OIDC_URL: "${OIDC_PRIVATE_URL}"
OIDC_CLIENT_ID: "${OIDC_PRIVATE_CLIENT_ID}" OIDC_CLIENT_ID: "${OIDC_PRIVATE_CLIENT_ID}"
OIDC_CLIENT_SECRET: "${OIDC_CLIENT_SECRET}" OIDC_CLIENT_SECRET: "${OIDC_CLIENT_SECRET}"
OIDC_ADMIN_GROUP: "${OIDC_ADMIN_GROUP}" OIDC_ADMIN_GROUP: "${OIDC_ADMIN_GROUP}"
@@ -73,71 +73,12 @@ services:
- beam-proxy - beam-proxy
volumes: volumes:
- /tmp/bridgehead/opal-map/:/map/:ro - /tmp/bridgehead/opal-map/:/map/:ro
networks:
- default
traefik:
labels:
- "traefik.http.middlewares.oidcAuth.forwardAuth.address=http://oauth2-proxy:4180/"
- "traefik.http.middlewares.oidcAuth.forwardAuth.trustForwardHeader=true"
- "traefik.http.middlewares.oidcAuth.forwardAuth.authResponseHeaders=X-Auth-Request-Access-Token,Authorization"
networks:
- default
forward_proxy:
networks:
- default
beam-proxy: beam-proxy:
environment: environment:
APP_datashield-connect_KEY: ${DATASHIELD_CONNECT_SECRET} APP_datashield-connect_KEY: ${DATASHIELD_CONNECT_SECRET}
APP_token-manager_KEY: ${TOKEN_MANAGER_SECRET} APP_token-manager_KEY: ${TOKEN_MANAGER_SECRET}
# TODO: Allow users of group /DataSHIELD and OIDC_USER_GROUP at the same time:
# Maybe a solution would be (https://oauth2-proxy.github.io/oauth2-proxy/configuration/oauth_provider):
# --allowed-groups=/DataSHIELD,OIDC_USER_GROUP
oauth2-proxy:
image: docker.verbis.dkfz.de/cache/oauth2-proxy/oauth2-proxy:latest
container_name: bridgehead-oauth2proxy
command: >-
--allowed-group=DataSHIELD
--oidc-groups-claim=${OIDC_GROUP_CLAIM}
--auth-logging=true
--whitelist-domain=${HOST}
--http-address="0.0.0.0:4180"
--reverse-proxy=true
--upstream="static://202"
--email-domain="*"
--cookie-name="_BRIDGEHEAD_oauth2"
--cookie-secret="${OAUTH2_PROXY_SECRET}"
--cookie-expire="12h"
--cookie-secure="true"
--cookie-httponly="true"
#OIDC settings
--provider="keycloak-oidc"
--provider-display-name="VerbIS Login"
--client-id="${OIDC_PRIVATE_CLIENT_ID}"
--client-secret="${OIDC_CLIENT_SECRET}"
--redirect-url="https://${HOST}${OAUTH2_CALLBACK}"
--oidc-issuer-url="${OIDC_URL}"
--scope="openid email profile"
--code-challenge-method="S256"
--skip-provider-button=true
#X-Forwarded-Header settings - true/false depending on your needs
--pass-basic-auth=true
--pass-user-headers=false
--pass-access-token=false
labels:
- "traefik.enable=true"
- "traefik.http.routers.oauth2_proxy.rule=PathPrefix(`/oauth2`)"
- "traefik.http.services.oauth2_proxy.loadbalancer.server.port=4180"
- "traefik.http.routers.oauth2_proxy.tls=true"
environment:
http_proxy: "http://forward_proxy:3128"
https_proxy: "http://forward_proxy:3128"
depends_on:
forward_proxy:
condition: service_healthy
secrets: secrets:
opal-cert.pem: opal-cert.pem:
file: /tmp/bridgehead/opal-cert.pem file: /tmp/bridgehead/opal-cert.pem

View File

@@ -5,10 +5,6 @@ if [ "$ENABLE_DATASHIELD" == true ]; then
if [ -z "${ENABLE_EXPORTER}" ] || [ "${ENABLE_EXPORTER}" != "true" ]; then if [ -z "${ENABLE_EXPORTER}" ] || [ "${ENABLE_EXPORTER}" != "true" ]; then
log WARN "The ENABLE_EXPORTER variable is either not set or not set to 'true'." log WARN "The ENABLE_EXPORTER variable is either not set or not set to 'true'."
fi fi
OAUTH2_CALLBACK=/oauth2/callback
OAUTH2_PROXY_SECRET="$(echo \"This is a salt string to generate one consistent encryption key for the oauth2_proxy. It is not required to be secret.\" | sha1sum | openssl pkeyutl -sign -inkey /etc/bridgehead/pki/${SITE_ID}.priv.pem | base64 | head -c 32)"
add_private_oidc_redirect_url "${OAUTH2_CALLBACK}"
log INFO "DataSHIELD setup detected -- will start DataSHIELD services." log INFO "DataSHIELD setup detected -- will start DataSHIELD services."
OVERRIDE+=" -f ./$PROJECT/modules/datashield-compose.yml" OVERRIDE+=" -f ./$PROJECT/modules/datashield-compose.yml"
EXPORTER_OPAL_PASSWORD="$(generate_password \"exporter in Opal\")" EXPORTER_OPAL_PASSWORD="$(generate_password \"exporter in Opal\")"
@@ -22,18 +18,13 @@ if [ "$ENABLE_DATASHIELD" == true ]; then
openssl req -x509 -newkey rsa:4096 -nodes -keyout /tmp/bridgehead/opal-key.pem -out /tmp/bridgehead/opal-cert.pem -days 3650 -subj "/CN=opal/C=DE" openssl req -x509 -newkey rsa:4096 -nodes -keyout /tmp/bridgehead/opal-key.pem -out /tmp/bridgehead/opal-cert.pem -days 3650 -subj "/CN=opal/C=DE"
fi fi
mkdir -p /tmp/bridgehead/opal-map mkdir -p /tmp/bridgehead/opal-map
sites="$(cat ./$PROJECT/modules/datashield-sites.json)" echo '{"sites": []}' >/tmp/bridgehead/opal-map/central.json
echo "$sites" | docker_jq -n --args '{"sites": input | map({ # Only allow connections from the central beam proxy that is used by all coder workspaces
"name": ., echo '[{
"id": ., "external": "'$SITE_ID':443",
"virtualhost": "\(.):443",
"beamconnect": "datashield-connect.\(.).'"$BROKER_ID"'"
})}' $sites >/tmp/bridgehead/opal-map/central.json
echo "$sites" | docker_jq -n --args '[{
"external": "'"$SITE_ID"':443",
"internal": "opal:8443", "internal": "opal:8443",
"allowed": input | map("\(.).'"$BROKER_ID"'") "allowed": ["central-ds-orchestrator.'$BROKER_ID'"]
}]' >/tmp/bridgehead/opal-map/local.json }]' > /tmp/bridgehead/opal-map/local.json
if [ "$USER" == "root" ]; then if [ "$USER" == "root" ]; then
chown -R bridgehead:docker /tmp/bridgehead chown -R bridgehead:docker /tmp/bridgehead
chmod g+wr /tmp/bridgehead/opal-map/* chmod g+wr /tmp/bridgehead/opal-map/*

View File

@@ -1,15 +0,0 @@
[
"berlin",
"muenchen-lmu",
"dresden",
"freiburg",
"muenchen-tum",
"tuebingen",
"mainz",
"frankfurt",
"essen",
"dktk-datashield-test",
"dktk-test",
"mannheim",
"central-ds-orchestrator"
]

View File

@@ -43,7 +43,7 @@ services:
- "traefik.http.routers.dnpm-auth.tls=true" - "traefik.http.routers.dnpm-auth.tls=true"
dnpm-portal: dnpm-portal:
image: ghcr.io/dnpm-dip/portal:latest image: ghcr.io/dnpm-dip/portal:{DNPM_IMAGE_TAG:-latest}
container_name: bridgehead-dnpm-portal container_name: bridgehead-dnpm-portal
environment: environment:
- NUXT_API_URL=http://dnpm-backend:9000/ - NUXT_API_URL=http://dnpm-backend:9000/
@@ -58,7 +58,7 @@ services:
dnpm-backend: dnpm-backend:
container_name: bridgehead-dnpm-backend container_name: bridgehead-dnpm-backend
image: ghcr.io/dnpm-dip/backend:latest image: ghcr.io/dnpm-dip/backend:{DNPM_IMAGE_TAG:-latest}
environment: environment:
- LOCAL_SITE=${ZPM_SITE}:${SITE_NAME} # Format: {Site-ID}:{Site-name}, e.g. UKT:Tübingen - LOCAL_SITE=${ZPM_SITE}:${SITE_NAME} # Format: {Site-ID}:{Site-name}, e.g. UKT:Tübingen
- RD_RANDOM_DATA=${DNPM_SYNTH_NUM:--1} - RD_RANDOM_DATA=${DNPM_SYNTH_NUM:--1}

View File

@@ -14,6 +14,7 @@ services:
MAGICPL_CONNECTOR_APIKEY: ${IDMANAGER_READ_APIKEY} MAGICPL_CONNECTOR_APIKEY: ${IDMANAGER_READ_APIKEY}
MAGICPL_CENTRAL_PATIENTLIST_APIKEY: ${IDMANAGER_CENTRAL_PATIENTLIST_APIKEY} MAGICPL_CENTRAL_PATIENTLIST_APIKEY: ${IDMANAGER_CENTRAL_PATIENTLIST_APIKEY}
MAGICPL_CONTROLNUMBERGENERATOR_APIKEY: ${IDMANAGER_CONTROLNUMBERGENERATOR_APIKEY} MAGICPL_CONTROLNUMBERGENERATOR_APIKEY: ${IDMANAGER_CONTROLNUMBERGENERATOR_APIKEY}
MAGICPL_OIDC_PROVIDER: ${OIDC_PRIVATE_URL}
depends_on: depends_on:
- patientlist - patientlist
- traefik-forward-auth - traefik-forward-auth
@@ -71,12 +72,14 @@ services:
- https_proxy=http://forward_proxy:3128 - https_proxy=http://forward_proxy:3128
- OAUTH2_PROXY_PROVIDER=oidc - OAUTH2_PROXY_PROVIDER=oidc
- OAUTH2_PROXY_SKIP_PROVIDER_BUTTON=true - OAUTH2_PROXY_SKIP_PROVIDER_BUTTON=true
- OAUTH2_PROXY_OIDC_ISSUER_URL=https://login.verbis.dkfz.de/realms/master - OAUTH2_PROXY_OIDC_ISSUER_URL=${OIDC_PRIVATE_URL}
- OAUTH2_PROXY_CLIENT_ID=bridgehead-${SITE_ID} - OAUTH2_PROXY_CLIENT_ID=${OIDC_PRIVATE_CLIENT_ID}
- OAUTH2_PROXY_CLIENT_SECRET=${IDMANAGER_AUTH_CLIENT_SECRET} - OAUTH2_PROXY_CLIENT_SECRET=${OIDC_CLIENT_SECRET}
- OAUTH2_PROXY_COOKIE_SECRET=${IDMANAGER_AUTH_COOKIE_SECRET} - OAUTH2_PROXY_COOKIE_SECRET=${IDMANAGER_AUTH_COOKIE_SECRET}
- OAUTH2_PROXY_COOKIE_NAME=_BRIDGEHEAD_oauth2_idm - OAUTH2_PROXY_COOKIE_NAME=_BRIDGEHEAD_oauth2_idm
- OAUTH2_PROXY_COOKIE_DOMAINS=.${HOST} - OAUTH2_PROXY_COOKIE_DOMAINS=.${HOST}
- OAUTH2_PROXY_COOKIE_REFRESH=4m
- OAUTH2_PROXY_COOKIE_EXPIRE=24h
- OAUTH2_PROXY_HTTP_ADDRESS=:4180 - OAUTH2_PROXY_HTTP_ADDRESS=:4180
- OAUTH2_PROXY_REVERSE_PROXY=true - OAUTH2_PROXY_REVERSE_PROXY=true
- OAUTH2_PROXY_WHITELIST_DOMAINS=.${HOST} - OAUTH2_PROXY_WHITELIST_DOMAINS=.${HOST}
@@ -87,8 +90,8 @@ services:
- OAUTH2_PROXY_SET_AUTHORIZATION_HEADER=true - OAUTH2_PROXY_SET_AUTHORIZATION_HEADER=true
- OAUTH2_PROXY_SET_XAUTHREQUEST=true - OAUTH2_PROXY_SET_XAUTHREQUEST=true
# Keycloak has an expiration time of 60s therefore oauth2-proxy needs to refresh after that # Keycloak has an expiration time of 60s therefore oauth2-proxy needs to refresh after that
- OAUTH2_PROXY_COOKIE_REFRESH=60s - OAUTH2_PROXY_ALLOWED_GROUPS=${OIDC_PSP_GROUP}
- OAUTH2_PROXY_ALLOWED_GROUPS=DKTK-CCP-PPSN - OAUTH2_PROXY_OIDC_GROUPS_CLAIM=${OIDC_GROUP_CLAIM}
- OAUTH2_PROXY_PROXY_PREFIX=/oauth2-idm - OAUTH2_PROXY_PROXY_PREFIX=/oauth2-idm
labels: labels:
- "traefik.enable=true" - "traefik.enable=true"

View File

@@ -14,6 +14,8 @@ function idManagementSetup() {
# Ensure old ids are working !!! # Ensure old ids are working !!!
export IDMANAGEMENT_FRIENDLY_ID=$(legacyIdMapping "$SITE_ID") export IDMANAGEMENT_FRIENDLY_ID=$(legacyIdMapping "$SITE_ID")
add_private_oidc_redirect_url "/oauth2-idm/callback"
fi fi
} }

View File

@@ -22,8 +22,14 @@ services:
HTTP_RELATIVE_PATH: "/mtba" HTTP_RELATIVE_PATH: "/mtba"
OIDC_ADMIN_GROUP: "${OIDC_ADMIN_GROUP}" OIDC_ADMIN_GROUP: "${OIDC_ADMIN_GROUP}"
OIDC_CLIENT_ID: "${OIDC_PRIVATE_CLIENT_ID}" OIDC_CLIENT_ID: "${OIDC_PRIVATE_CLIENT_ID}"
OIDC_CLIENT_SECRET: "${OIDC_CLIENT_SECRET}" # TODO: Add following variables after moving to Authentik:
OIDC_URL: "${OIDC_URL}" #OIDC_CLIENT_SECRET: "${OIDC_CLIENT_SECRET}"
#OIDC_URL: "${OIDC_URL}"
# TODO: Remove following variables after moving to Authentik:
# Please add KECLOAK_CLIENT_SECRET in ccp.conf
OIDC_CLIENT_SECRET: "${KEYCLOAK_CLIENT_SECRET}"
OIDC_URL: "https://login.verbis.dkfz.de/realms/test-realm-01"
OIDC_ADMIN_URL: "https://login.verbis.dkfz.de/admin/realms/test-realm-01"
labels: labels:
- "traefik.enable=true" - "traefik.enable=true"

View File

@@ -10,9 +10,11 @@ BROKER_URL_FOR_PREREQ=$BROKER_URL
OIDC_USER_GROUP="DKTK_CCP_$(capitalize_first_letter ${SITE_ID})" OIDC_USER_GROUP="DKTK_CCP_$(capitalize_first_letter ${SITE_ID})"
OIDC_ADMIN_GROUP="DKTK_CCP_$(capitalize_first_letter ${SITE_ID})_Verwalter" OIDC_ADMIN_GROUP="DKTK_CCP_$(capitalize_first_letter ${SITE_ID})_Verwalter"
OIDC_PSP_GROUP="DKTK_CCP_$(capitalize_first_letter ${SITE_ID})_PSP"
OIDC_PRIVATE_CLIENT_ID=${SITE_ID}-private OIDC_PRIVATE_CLIENT_ID=${SITE_ID}-private
OIDC_PUBLIC_CLIENT_ID=${SITE_ID}-public OIDC_PUBLIC_CLIENT_ID=${SITE_ID}-public
OIDC_URL="https://login.verbis.dkfz.de/realms/test-realm-01" OIDC_URL="https://sso.verbis.dkfz.de/application/o/${OIDC_PUBLIC_CLIENT_ID}/"
OIDC_PRIVATE_URL="https://sso.verbis.dkfz.de/application/o/${OIDC_PRIVATE_CLIENT_ID}/"
OIDC_GROUP_CLAIM="groups" OIDC_GROUP_CLAIM="groups"
for module in $PROJECT/modules/*.sh for module in $PROJECT/modules/*.sh

View File

@@ -17,7 +17,6 @@ services:
BEAM_PROXY_ID: ${SITE_ID} BEAM_PROXY_ID: ${SITE_ID}
BEAM_BROKER_ID: ${BROKER_ID} BEAM_BROKER_ID: ${BROKER_ID}
BEAM_APP_ID: "focus" BEAM_APP_ID: "focus"
PROJECT_METADATA: "dktk_supervisors"
depends_on: depends_on:
- "beam-proxy" - "beam-proxy"
labels: labels:
@@ -30,4 +29,4 @@ services:
- "traefik.http.routers.spot.rule=Host(`${HOST}`) && PathPrefix(`/backend`)" - "traefik.http.routers.spot.rule=Host(`${HOST}`) && PathPrefix(`/backend`)"
- "traefik.http.middlewares.stripprefix_spot.stripprefix.prefixes=/backend" - "traefik.http.middlewares.stripprefix_spot.stripprefix.prefixes=/backend"
- "traefik.http.routers.spot.tls=true" - "traefik.http.routers.spot.tls=true"
- "traefik.http.routers.spot.middlewares=corsheaders2,stripprefix_spot" - "traefik.http.routers.spot.middlewares=corsheaders2,stripprefix_spot,auth"

View File

@@ -1,9 +1,10 @@
version: "3.7" version: "3.7"
services: services:
exporter: exporter:
image: docker.verbis.dkfz.de/ccp/dktk-exporter:latest image: docker.verbis.dkfz.de/ccp/dktk-exporter:latest
container_name: bridgehead-ccp-exporter container_name: bridgehead-kr-exporter
environment: environment:
JAVA_OPTS: "-Xms1G -Xmx8G -XX:+UseG1GC" JAVA_OPTS: "-Xms1G -Xmx8G -XX:+UseG1GC"
LOG_LEVEL: "INFO" LOG_LEVEL: "INFO"
@@ -12,39 +13,51 @@ services:
EXPORTER_DB_USER: "exporter" EXPORTER_DB_USER: "exporter"
EXPORTER_DB_PASSWORD: "${EXPORTER_DB_PASSWORD}" # Set in exporter-setup.sh EXPORTER_DB_PASSWORD: "${EXPORTER_DB_PASSWORD}" # Set in exporter-setup.sh
EXPORTER_DB_URL: "jdbc:postgresql://exporter-db:5432/exporter" EXPORTER_DB_URL: "jdbc:postgresql://exporter-db:5432/exporter"
HTTP_RELATIVE_PATH: "/ccp-exporter" HTTP_RELATIVE_PATH: "/kr-exporter"
SITE: "${SITE_ID}" SITE: "${SITE_ID}"
HTTP_SERVLET_REQUEST_SCHEME: "https" HTTP_SERVLET_REQUEST_SCHEME: "https"
OPAL_PASSWORD: "${EXPORTER_OPAL_PASSWORD}" OPAL_PASSWORD: "${EXPORTER_OPAL_PASSWORD}"
labels: labels:
- "traefik.enable=true" - "traefik.enable=true"
- "traefik.http.routers.exporter_ccp.rule=PathPrefix(`/ccp-exporter`)" - "traefik.http.routers.exporter_kr.rule=PathPrefix(`/kr-exporter`)"
- "traefik.http.services.exporter_ccp.loadbalancer.server.port=8092" - "traefik.http.services.exporter_kr.loadbalancer.server.port=8092"
- "traefik.http.routers.exporter_ccp.tls=true" - "traefik.http.routers.exporter_kr.tls=true"
- "traefik.http.middlewares.exporter_ccp_strip.stripprefix.prefixes=/ccp-exporter" - "traefik.http.middlewares.exporter_kr_strip.stripprefix.prefixes=/kr-exporter"
- "traefik.http.routers.exporter_ccp.middlewares=exporter_ccp_strip" - "traefik.http.routers.exporter_kr.middlewares=exporter_kr_strip"
# Main router
- "traefik.http.routers.exporter_kr.priority=20"
# API router
- "traefik.http.routers.exporter_kr_api.middlewares=exporter_kr_strip,exporter_auth"
- "traefik.http.routers.exporter_kr_api.rule=PathRegexp(`/kr-exporter/.+`)"
- "traefik.http.routers.exporter_kr_api.tls=true"
- "traefik.http.routers.exporter_kr_api.priority=25"
# Shared middlewares
- "traefik.http.middlewares.exporter_auth.basicauth.users=${EXPORTER_USER}"
volumes: volumes:
- "/var/cache/bridgehead/ccp/exporter-files:/app/exporter-files/output" - "/var/cache/bridgehead/kr/exporter-files:/app/exporter-files/output"
exporter-db: exporter-db:
image: docker.verbis.dkfz.de/cache/postgres:${POSTGRES_TAG} image: docker.verbis.dkfz.de/cache/postgres:${POSTGRES_TAG}
container_name: bridgehead-ccp-exporter-db container_name: bridgehead-kr-exporter-db
environment: environment:
POSTGRES_USER: "exporter" POSTGRES_USER: "exporter"
POSTGRES_PASSWORD: "${EXPORTER_DB_PASSWORD}" # Set in exporter-setup.sh POSTGRES_PASSWORD: "${EXPORTER_DB_PASSWORD}" # Set in exporter-setup.sh
POSTGRES_DB: "exporter" POSTGRES_DB: "exporter"
volumes: volumes:
# Consider removing this volume once we find a solution to save Lens-queries to be executed in the explorer. # 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" - "/var/cache/bridgehead/kr/exporter-db:/var/lib/postgresql/data"
reporter: reporter:
image: docker.verbis.dkfz.de/ccp/dktk-reporter:latest image: docker.verbis.dkfz.de/ccp/dktk-reporter:latest
container_name: bridgehead-ccp-reporter container_name: bridgehead-kr-reporter
environment: environment:
JAVA_OPTS: "-Xms1G -Xmx8G -XX:+UseG1GC" JAVA_OPTS: "-Xms1G -Xmx8G -XX:+UseG1GC"
LOG_LEVEL: "INFO" LOG_LEVEL: "INFO"
CROSS_ORIGINS: "https://${HOST}" CROSS_ORIGINS: "https://${HOST}"
HTTP_RELATIVE_PATH: "/ccp-reporter" HTTP_RELATIVE_PATH: "/kr-reporter"
SITE: "${SITE_ID}" SITE: "${SITE_ID}"
EXPORTER_API_KEY: "${EXPORTER_API_KEY}" # Set in exporter-setup.sh EXPORTER_API_KEY: "${EXPORTER_API_KEY}" # Set in exporter-setup.sh
EXPORTER_URL: "http://exporter:8092" EXPORTER_URL: "http://exporter:8092"
@@ -52,16 +65,23 @@ services:
HTTP_SERVLET_REQUEST_SCHEME: "https" HTTP_SERVLET_REQUEST_SCHEME: "https"
# In this initial development state of the bridgehead, we are trying to have so many volumes as possible. # 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 # However, in the first executions in the kr sites, this volume seems to be very important. A report is
# a process that can take several hours, because it depends on the exporter. # 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. # There is a risk that the bridgehead restarts, losing the already created export.
volumes: volumes:
- "/var/cache/bridgehead/ccp/reporter-files:/app/reports" - "/var/cache/bridgehead/kr/reporter-files:/app/reports"
labels: labels:
- "traefik.enable=true" - "traefik.enable=true"
- "traefik.http.routers.reporter_ccp.rule=PathPrefix(`/ccp-reporter`)" - "traefik.http.routers.reporter_kr.rule=PathPrefix(`/kr-reporter`)"
- "traefik.http.services.reporter_ccp.loadbalancer.server.port=8095" - "traefik.http.services.reporter_kr.loadbalancer.server.port=8095"
- "traefik.http.routers.reporter_ccp.tls=true" - "traefik.http.routers.reporter_kr.tls=true"
- "traefik.http.middlewares.reporter_ccp_strip.stripprefix.prefixes=/ccp-reporter" - "traefik.http.middlewares.reporter_kr_strip.stripprefix.prefixes=/kr-reporter"
- "traefik.http.routers.reporter_ccp.middlewares=reporter_ccp_strip" - "traefik.http.routers.reporter_kr.middlewares=reporter_kr_strip"
- "traefik.http.routers.reporter_kr.priority=20"
- "traefik.http.routers.reporter_kr_api.middlewares=reporter_kr_strip,exporter_auth"
- "traefik.http.routers.reporter_kr_api.rule=PathRegexp(`/kr-reporter/.+`)"
- "traefik.http.routers.reporter_kr_api.tls=true"
- "traefik.http.routers.reporter_kr_api.priority=25"

View File

@@ -1,15 +0,0 @@
# 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.

View File

@@ -7,73 +7,58 @@ services:
container_name: bridgehead-teiler-orchestrator container_name: bridgehead-teiler-orchestrator
labels: labels:
- "traefik.enable=true" - "traefik.enable=true"
- "traefik.http.routers.teiler_orchestrator_ccp.rule=PathPrefix(`/ccp-teiler`)" - "traefik.http.routers.teiler_orchestrator_kr.rule=PathPrefix(`/kr-teiler`)"
- "traefik.http.services.teiler_orchestrator_ccp.loadbalancer.server.port=9000" - "traefik.http.services.teiler_orchestrator_kr.loadbalancer.server.port=9000"
- "traefik.http.routers.teiler_orchestrator_ccp.tls=true" - "traefik.http.routers.teiler_orchestrator_kr.tls=true"
- "traefik.http.middlewares.teiler_orchestrator_ccp_strip.stripprefix.prefixes=/ccp-teiler" - "traefik.http.middlewares.teiler_orchestrator_kr_strip.stripprefix.prefixes=/kr-teiler"
- "traefik.http.routers.teiler_orchestrator_ccp.middlewares=teiler_orchestrator_ccp_strip" - "traefik.http.routers.teiler_orchestrator_kr.middlewares=teiler_orchestrator_kr_strip"
environment: environment:
TEILER_BACKEND_URL: "https://${HOST}/ccp-teiler-backend" TEILER_BACKEND_URL: "/kr-teiler-backend"
TEILER_DASHBOARD_URL: "https://${HOST}/ccp-teiler-dashboard" TEILER_DASHBOARD_URL: "/kr-teiler-dashboard"
DEFAULT_LANGUAGE: "${TEILER_DEFAULT_LANGUAGE_LOWER_CASE}" DEFAULT_LANGUAGE: "${TEILER_DEFAULT_LANGUAGE_LOWER_CASE}"
HTTP_RELATIVE_PATH: "/ccp-teiler" HTTP_RELATIVE_PATH: "/kr-teiler"
teiler-dashboard: teiler-dashboard:
image: docker.verbis.dkfz.de/cache/samply/teiler-dashboard:develop image: docker.verbis.dkfz.de/cache/samply/teiler-dashboard:develop
container_name: bridgehead-teiler-dashboard container_name: bridgehead-teiler-dashboard
labels: labels:
- "traefik.enable=true" - "traefik.enable=true"
- "traefik.http.routers.teiler_dashboard_ccp.rule=PathPrefix(`/ccp-teiler-dashboard`)" - "traefik.http.routers.teiler_dashboard_kr.rule=PathPrefix(`/kr-teiler-dashboard`)"
- "traefik.http.services.teiler_dashboard_ccp.loadbalancer.server.port=80" - "traefik.http.services.teiler_dashboard_kr.loadbalancer.server.port=80"
- "traefik.http.routers.teiler_dashboard_ccp.tls=true" - "traefik.http.routers.teiler_dashboard_kr.tls=true"
- "traefik.http.middlewares.teiler_dashboard_ccp_strip.stripprefix.prefixes=/ccp-teiler-dashboard" - "traefik.http.middlewares.teiler_dashboard_kr_strip.stripprefix.prefixes=/kr-teiler-dashboard"
- "traefik.http.routers.teiler_dashboard_ccp.middlewares=teiler_dashboard_ccp_strip" - "traefik.http.routers.teiler_dashboard_kr.middlewares=teiler_dashboard_kr_strip"
environment: environment:
DEFAULT_LANGUAGE: "${TEILER_DEFAULT_LANGUAGE}" DEFAULT_LANGUAGE: "${TEILER_DEFAULT_LANGUAGE}"
TEILER_BACKEND_URL: "https://${HOST}/ccp-teiler-backend" TEILER_BACKEND_URL: "/kr-teiler-backend"
TEILER_DASHBOARD_URL: "https://${HOST}/ccp-teiler-dashboard" TEILER_DASHBOARD_URL: "/kr-teiler-dashboard"
OIDC_URL: "${OIDC_URL}"
OIDC_CLIENT_ID: "${OIDC_PUBLIC_CLIENT_ID}"
OIDC_TOKEN_GROUP: "${OIDC_GROUP_CLAIM}"
TEILER_ADMIN_NAME: "${OPERATOR_FIRST_NAME} ${OPERATOR_LAST_NAME}" TEILER_ADMIN_NAME: "${OPERATOR_FIRST_NAME} ${OPERATOR_LAST_NAME}"
TEILER_ADMIN_EMAIL: "${OPERATOR_EMAIL}" TEILER_ADMIN_EMAIL: "${OPERATOR_EMAIL}"
TEILER_ADMIN_PHONE: "${OPERATOR_PHONE}" TEILER_ADMIN_PHONE: "${OPERATOR_PHONE}"
TEILER_PROJECT: "${PROJECT}" TEILER_PROJECT: "${PROJECT}"
EXPORTER_API_KEY: "${EXPORTER_API_KEY}" EXPORTER_API_KEY: "${EXPORTER_API_KEY}"
TEILER_ORCHESTRATOR_URL: "https://${HOST}/ccp-teiler" TEILER_ORCHESTRATOR_URL: "/kr-teiler"
TEILER_ORCHESTRATOR_HTTP_RELATIVE_PATH: "/ccp-teiler" TEILER_ORCHESTRATOR_HTTP_RELATIVE_PATH: "/kr-teiler"
TEILER_USER: "${OIDC_USER_GROUP}"
TEILER_ADMIN: "${OIDC_ADMIN_GROUP}"
REPORTER_DEFAULT_TEMPLATE_ID: "ccp-qb" REPORTER_DEFAULT_TEMPLATE_ID: "ccp-qb"
EXPORTER_DEFAULT_TEMPLATE_ID: "ccp" EXPORTER_DEFAULT_TEMPLATE_ID: "ccp"
teiler-backend: teiler-backend:
image: docker.verbis.dkfz.de/ccp/dktk-teiler-backend:latest image: docker.verbis.dkfz.de/ccp/kr-teiler-backend:latest
container_name: bridgehead-teiler-backend container_name: bridgehead-teiler-backend
labels: labels:
- "traefik.enable=true" - "traefik.enable=true"
- "traefik.http.routers.teiler_backend_ccp.rule=PathPrefix(`/ccp-teiler-backend`)" - "traefik.http.routers.teiler_backend_kr.rule=PathPrefix(`/kr-teiler-backend`)"
- "traefik.http.services.teiler_backend_ccp.loadbalancer.server.port=8085" - "traefik.http.services.teiler_backend_kr.loadbalancer.server.port=8085"
- "traefik.http.routers.teiler_backend_ccp.tls=true" - "traefik.http.routers.teiler_backend_kr.tls=true"
- "traefik.http.middlewares.teiler_backend_ccp_strip.stripprefix.prefixes=/ccp-teiler-backend" - "traefik.http.middlewares.teiler_backend_kr_strip.stripprefix.prefixes=/kr-teiler-backend"
- "traefik.http.routers.teiler_backend_ccp.middlewares=teiler_backend_ccp_strip" - "traefik.http.routers.teiler_backend_kr.middlewares=teiler_backend_kr_strip"
environment: environment:
LOG_LEVEL: "INFO" LOG_LEVEL: "INFO"
APPLICATION_PORT: "8085" APPLICATION_PORT: "8085"
APPLICATION_ADDRESS: "${HOST}"
DEFAULT_LANGUAGE: "${TEILER_DEFAULT_LANGUAGE}" DEFAULT_LANGUAGE: "${TEILER_DEFAULT_LANGUAGE}"
CONFIG_ENV_VAR_PATH: "/run/secrets/ccp.conf" TEILER_ORCHESTRATOR_HTTP_RELATIVE_PATH: "/kr-teiler"
TEILER_ORCHESTRATOR_HTTP_RELATIVE_PATH: "/ccp-teiler" TEILER_ORCHESTRATOR_URL: "/kr-teiler"
TEILER_ORCHESTRATOR_URL: "https://${HOST}/ccp-teiler" TEILER_DASHBOARD_DE_URL: "/kr-teiler-dashboard/de"
TEILER_DASHBOARD_DE_URL: "https://${HOST}/ccp-teiler-dashboard/de" TEILER_DASHBOARD_EN_URL: "/kr-teiler-dashboard/en"
TEILER_DASHBOARD_EN_URL: "https://${HOST}/ccp-teiler-dashboard/en"
HTTP_PROXY: "http://forward_proxy:3128" 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

View File

@@ -3,7 +3,6 @@
if [ "$ENABLE_TEILER" == true ];then if [ "$ENABLE_TEILER" == true ];then
log INFO "Teiler setup detected -- will start Teiler services." log INFO "Teiler setup detected -- will start Teiler services."
OVERRIDE+=" -f ./$PROJECT/modules/teiler-compose.yml" OVERRIDE+=" -f ./$PROJECT/modules/teiler-compose.yml"
TEILER_DEFAULT_LANGUAGE=DE TEILER_DEFAULT_LANGUAGE=EN
TEILER_DEFAULT_LANGUAGE_LOWER_CASE=${TEILER_DEFAULT_LANGUAGE,,} TEILER_DEFAULT_LANGUAGE_LOWER_CASE=${TEILER_DEFAULT_LANGUAGE,,}
add_public_oidc_redirect_url "/ccp-teiler/*"
fi fi

View File

@@ -1,19 +0,0 @@
# 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.

View File

@@ -301,19 +301,33 @@ function sync_secrets() {
if [[ $secret_sync_args == "" ]]; then if [[ $secret_sync_args == "" ]]; then
return return
fi fi
if [ "$PROJECT" == "bbmri" ]; then
# If the project is BBMRI, use the BBMRI-ERIC broker and not the GBN broker
proxy_id=$ERIC_PROXY_ID
broker_url=$ERIC_BROKER_URL
broker_id=$ERIC_BROKER_ID
root_crt_file="/srv/docker/bridgehead/bbmri/modules/${ERIC_ROOT_CERT}.root.crt.pem"
else
proxy_id=$PROXY_ID
broker_url=$BROKER_URL
broker_id=$BROKER_ID
root_crt_file="/srv/docker/bridgehead/$PROJECT/root.crt.pem"
fi
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 $root_crt_file:/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.central-secret-sync.$BROKER_ID \ -e OIDC_PROVIDER=secret-sync-central.test-secret-sync.$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
@@ -436,7 +450,3 @@ generate_simple_password(){
local combined_text="This is a salt string to generate one consistent password for ${seed_text}. It is not required to be secret." local combined_text="This is a salt string to generate one consistent password for ${seed_text}. It is not required to be secret."
echo "${combined_text}" | sha1sum | openssl pkeyutl -sign -inkey "/etc/bridgehead/pki/${SITE_ID}.priv.pem" 2> /dev/null | base64 | head -c 26 | sed 's/[+\/]/A/g' echo "${combined_text}" | sha1sum | openssl pkeyutl -sign -inkey "/etc/bridgehead/pki/${SITE_ID}.priv.pem" 2> /dev/null | base64 | head -c 26 | sed 's/[+\/]/A/g'
} }
docker_jq() {
docker run --rm -i docker.verbis.dkfz.de/cache/jqlang/jq:latest "$@"
}

View File

@@ -55,6 +55,9 @@ case "$PROJECT" in
cce) cce)
site_configuration_repository_middle="git.verbis.dkfz.de/cce-sites/" site_configuration_repository_middle="git.verbis.dkfz.de/cce-sites/"
;; ;;
pscc)
site_configuration_repository_middle="git.verbis.dkfz.de/pscc-sites/"
;;
itcc) itcc)
site_configuration_repository_middle="git.verbis.dkfz.de/itcc-sites/" site_configuration_repository_middle="git.verbis.dkfz.de/itcc-sites/"
;; ;;

View File

@@ -59,3 +59,4 @@ services:
PROJECT: ${PROJECT} PROJECT: ${PROJECT}
SITE_NAME: ${SITE_NAME} SITE_NAME: ${SITE_NAME}
ENVIRONMENT: ${ENVIRONMENT} ENVIRONMENT: ${ENVIRONMENT}
profiles: [deactivated]

View File

@@ -43,7 +43,7 @@ services:
- "traefik.http.routers.dnpm-auth.tls=true" - "traefik.http.routers.dnpm-auth.tls=true"
dnpm-portal: dnpm-portal:
image: ghcr.io/dnpm-dip/portal:latest image: ghcr.io/dnpm-dip/portal:{DNPM_IMAGE_TAG:-latest}
container_name: bridgehead-dnpm-portal container_name: bridgehead-dnpm-portal
environment: environment:
- NUXT_API_URL=http://dnpm-backend:9000/ - NUXT_API_URL=http://dnpm-backend:9000/
@@ -58,7 +58,7 @@ services:
dnpm-backend: dnpm-backend:
container_name: bridgehead-dnpm-backend container_name: bridgehead-dnpm-backend
image: ghcr.io/dnpm-dip/backend:latest image: ghcr.io/dnpm-dip/backend:{DNPM_IMAGE_TAG:-latest}
environment: environment:
- LOCAL_SITE=${ZPM_SITE}:${SITE_NAME} # Format: {Site-ID}:{Site-name}, e.g. UKT:Tübingen - LOCAL_SITE=${ZPM_SITE}:${SITE_NAME} # Format: {Site-ID}:{Site-name}, e.g. UKT:Tübingen
- RD_RANDOM_DATA=${DNPM_SYNTH_NUM:--1} - RD_RANDOM_DATA=${DNPM_SYNTH_NUM:--1}

65
pscc/docker-compose.yml Normal file
View File

@@ -0,0 +1,65 @@
version: "3.7"
services:
blaze:
image: docker.verbis.dkfz.de/cache/samply/blaze:${BLAZE_TAG}
container_name: bridgehead-pscc-blaze
environment:
BASE_URL: "http://bridgehead-pscc-blaze:8080"
JAVA_TOOL_OPTIONS: "-Xmx${BLAZE_MEMORY_CAP:-4096}m"
DB_RESOURCE_CACHE_SIZE: ${BLAZE_RESOURCE_CACHE_CAP:-2500000}
DB_BLOCK_CACHE_SIZE: ${BLAZE_MEMORY_CAP}
CQL_EXPR_CACHE_SIZE: ${BLAZE_CQL_CACHE_CAP:-32}
ENFORCE_REFERENTIAL_INTEGRITY: "false"
volumes:
- "blaze-data:/app/data"
labels:
- "traefik.enable=true"
- "traefik.http.routers.blaze_pscc.rule=PathPrefix(`/pscc-localdatamanagement`)"
- "traefik.http.middlewares.pscc_b_strip.stripprefix.prefixes=/pscc-localdatamanagement"
- "traefik.http.services.blaze_pscc.loadbalancer.server.port=8080"
- "traefik.http.routers.blaze_pscc.middlewares=pscc_b_strip,auth"
- "traefik.http.routers.blaze_pscc.tls=true"
focus:
image: docker.verbis.dkfz.de/cache/samply/focus:${FOCUS_TAG}
container_name: bridgehead-focus
environment:
API_KEY: ${FOCUS_BEAM_SECRET_SHORT}
BEAM_APP_ID_LONG: focus.${PROXY_ID}
PROXY_ID: ${PROXY_ID}
BLAZE_URL: "http://bridgehead-pscc-blaze:8080/fhir/"
BEAM_PROXY_URL: http://beam-proxy:8081
RETRY_COUNT: ${FOCUS_RETRY_COUNT}
EPSILON: 0.28
ENDPOINT_TYPE: ${FOCUS_ENDPOINT_TYPE:-blaze}
depends_on:
- "beam-proxy"
- "blaze"
beam-proxy:
image: docker.verbis.dkfz.de/cache/samply/beam-proxy:${BEAM_TAG}
container_name: bridgehead-beam-proxy
environment:
BROKER_URL: ${BROKER_URL}
PROXY_ID: ${PROXY_ID}
APP_focus_KEY: ${FOCUS_BEAM_SECRET_SHORT}
PRIVKEY_FILE: /run/secrets/proxy.pem
ALL_PROXY: http://forward_proxy:3128
TLS_CA_CERTIFICATES_DIR: /conf/trusted-ca-certs
ROOTCERT_FILE: /conf/root.crt.pem
secrets:
- proxy.pem
depends_on:
- "forward_proxy"
volumes:
- /etc/bridgehead/trusted-ca-certs:/conf/trusted-ca-certs:ro
- /srv/docker/bridgehead/pscc/root.crt.pem:/conf/root.crt.pem:ro
volumes:
blaze-data:
secrets:
proxy.pem:
file: /etc/bridgehead/pki/${SITE_ID}.priv.pem

View File

@@ -0,0 +1,34 @@
version: "3.7"
services:
landing:
container_name: lens_federated-search
image: docker.verbis.dkfz.de/dashboard/pscc-explorer
labels:
- "traefik.enable=true"
- "traefik.http.routers.landing.rule=PathPrefix(`/`)"
- "traefik.http.services.landing.loadbalancer.server.port=5173"
- "traefik.http.routers.landing.middlewares=auth"
- "traefik.http.routers.landing.tls=true"
# spot:
# image: docker.verbis.dkfz.de/ccp-private/central-spot
# environment:
# BEAM_SECRET: "${FOCUS_BEAM_SECRET_SHORT}"
# BEAM_URL: http://beam-proxy:8081
# BEAM_PROXY_ID: ${SITE_ID}
# BEAM_BROKER_ID: ${BROKER_ID}
# BEAM_APP_ID: "focus"
# PROJECT_METADATA: "cce_supervisors"
# depends_on:
# - "beam-proxy"
# labels:
# - "traefik.enable=true"
# - "traefik.http.services.spot.loadbalancer.server.port=8080"
# - "traefik.http.middlewares.corsheaders2.headers.accesscontrolallowmethods=GET,OPTIONS,POST"
# - "traefik.http.middlewares.corsheaders2.headers.accesscontrolalloworiginlist=https://${HOST}"
# - "traefik.http.middlewares.corsheaders2.headers.accesscontrolallowcredentials=true"
# - "traefik.http.middlewares.corsheaders2.headers.accesscontrolmaxage=-1"
# - "traefik.http.routers.spot.rule=Host(`${HOST}`) && PathPrefix(`/backend`)"
# - "traefik.http.middlewares.stripprefix_spot.stripprefix.prefixes=/backend"
# - "traefik.http.routers.spot.tls=true"
# - "traefik.http.routers.spot.middlewares=corsheaders2,stripprefix_spot"

View File

@@ -0,0 +1,5 @@
#!/bin/bash
if [ -n "$ENABLE_LENS" ];then
OVERRIDE+=" -f ./$PROJECT/modules/lens-compose.yml"
fi

20
pscc/root.crt.pem Normal file
View File

@@ -0,0 +1,20 @@
-----BEGIN CERTIFICATE-----
MIIDNTCCAh2gAwIBAgIUW34NEb7bl0+Ywx+I1VKtY5vpAOowDQYJKoZIhvcNAQEL
BQAwFjEUMBIGA1UEAxMLQnJva2VyLVJvb3QwHhcNMjQwMTIyMTMzNzEzWhcNMzQw
MTE5MTMzNzQzWjAWMRQwEgYDVQQDEwtCcm9rZXItUm9vdDCCASIwDQYJKoZIhvcN
AQEBBQADggEPADCCAQoCggEBAL5UegLXTlq3XRRj8LyFs3aF0tpRPVoW9RXp5kFI
TnBvyO6qjNbMDT/xK+4iDtEX4QQUvsxAKxfXbe9i1jpdwjgH7JHaSGm2IjAiKLqO
OXQQtguWwfNmmp96Ql13ArLj458YH08xMO/w2NFWGwB/hfARa4z/T0afFuc/tKJf
XbGCG9xzJ9tmcG45QN8NChGhVvaTweNdVxGWlpHxmi0Mn8OM9CEuB7nPtTTiBuiu
pRC2zVVmNjVp4ktkAqL7IHOz+/F5nhiz6tOika9oD3376Xj055lPznLcTQn2+4d7
K7ZrBopCFxIQPjkgmYRLfPejbpdUjK1UVJw7hbWkqWqH7JMCAwEAAaN7MHkwDgYD
VR0PAQH/BAQDAgEGMA8GA1UdEwEB/wQFMAMBAf8wHQYDVR0OBBYEFGjvRcaIP4HM
poIguUAK9YL2n7fbMB8GA1UdIwQYMBaAFGjvRcaIP4HMpoIguUAK9YL2n7fbMBYG
A1UdEQQPMA2CC0Jyb2tlci1Sb290MA0GCSqGSIb3DQEBCwUAA4IBAQCbzycJSaDm
AXXNJqQ88djrKs5MDXS8RIjS/cu2ayuLaYDe+BzVmUXNA0Vt9nZGdaz63SLLcjpU
fNSxBfKbwmf7s30AK8Cnfj9q4W/BlBeVizUHQsg1+RQpDIdMrRQrwkXv8mfLw+w5
3oaXNW6W/8KpBp/H8TBZ6myl6jCbeR3T8EMXBwipMGop/1zkbF01i98Xpqmhx2+l
n+80ofPsSspOo5XmgCZym8CD/m/oFHmjcvOfpOCvDh4PZ+i37pmbSlCYoMpla3u/
7MJMP5lugfLBYNDN2p+V4KbHP/cApCDT5UWLOeAWjgiZQtHH5ilDeYqEc1oPjyJt
Rtup0MTxSJtN
-----END CERTIFICATE-----

14
pscc/vars Normal file
View File

@@ -0,0 +1,14 @@
BROKER_ID=test-no-real-data.broker.samply.de
BROKER_URL=https://${BROKER_ID}
PROXY_ID=${SITE_ID}.${BROKER_ID}
FOCUS_BEAM_SECRET_SHORT="$(cat /proc/sys/kernel/random/uuid | sed 's/[-]//g' | head -c 20)"
FOCUS_RETRY_COUNT=${FOCUS_RETRY_COUNT:-64}
SUPPORT_EMAIL=denis.koether@dkfz-heidelberg.de
PRIVATEKEYFILENAME=/etc/bridgehead/pki/${SITE_ID}.priv.pem
BROKER_URL_FOR_PREREQ=$BROKER_URL
for module in $PROJECT/modules/*.sh
do
log DEBUG "sourcing $module"
source $module
done