Teiler and Exporter in BBMRI#312
Conversation
863d622 to
8ff1e41
Compare
| if [ -z "$EXPORTER_USER" ]; then | ||
| log "INFO" "Now generating basic auth for the exporter and reporter (see adduser in bridgehead for more information). " | ||
| generated_passwd="$(cat /proc/sys/kernel/random/uuid | sed 's/[-]//g' | head -c 32)" | ||
| add_basic_auth_user $PROJECT $generated_passwd "EXPORTER_USER" $PROJECT |
There was a problem hiding this comment.
We usually generate the basic auth users for traefik in lib/install_bridgehead.sh this has the disadvantage of requiring the admin to run bridgehead install again but doing it that way the EXPORTER_USER is already exported on the next start. I think with this logic you would need to restart the bridgehead one more time as the the env var is not set. Although I guess you could just set it manually here as you know the pw.
There was a problem hiding this comment.
We should extend the add user function in the bridgehead script to not require a new install command, but generate Exporter Users. Currently the function only allows LDM_User and NNGM_User
| OVERRIDE+=" -f ./$PROJECT/modules/teiler-compose.yml" | ||
| TEILER_DEFAULT_LANGUAGE=EN | ||
| TEILER_DEFAULT_LANGUAGE_LOWER_CASE=${TEILER_DEFAULT_LANGUAGE,,} | ||
| # add_public_oidc_redirect_url "/ccp-teiler/*" |
There was a problem hiding this comment.
| # add_public_oidc_redirect_url "/ccp-teiler/*" |
|
|
||
| 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." | ||
| touch /var/cache/bridgehead/secrets/oidc | ||
| echo $PRIVATEKEYFILENAME | ||
| docker run --rm \ | ||
| -v /var/cache/bridgehead/secrets/oidc:/usr/local/cache \ | ||
| -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 \ | ||
| -e TLS_CA_CERTIFICATES_DIR=/conf/trusted-ca-certs \ | ||
| -e NO_PROXY=localhost,127.0.0.1 \ | ||
| -e ALL_PROXY=$HTTPS_PROXY_FULL_URL \ | ||
| -e PROXY_ID=$PROXY_ID \ | ||
| -e BROKER_URL=$BROKER_URL \ | ||
| -e OIDC_PROVIDER=secret-sync-central.central-secret-sync.$BROKER_ID \ | ||
| -e PROXY_ID=$proxy_id \ | ||
| -e BROKER_URL=$broker_url \ | ||
| -e OIDC_PROVIDER=secret-sync-central.central-secret-sync.$broker_id \ |
There was a problem hiding this comment.
I think I would throw out the special casing for now as its unclear that bbmri will ever automatic oidc enrollment
There was a problem hiding this comment.
That should be part of a different PR, right?
There was a problem hiding this comment.
Yeah if this even ever happens in bbmri
1863be8 to
c1c0723
Compare
|
|
||
| POSTGRES_TAG=15.6-alpine |
da15fbe to
5107c0a
Compare
Co-authored-by: Jan <59206115+Threated@users.noreply.github.com>
Co-authored-by: Jan <59206115+Threated@users.noreply.github.com>
This PR supersedes #310. It integrates the Teiler and Exporter functionalities into the BBMRI project.