fix: Included Legacy ID-Mapping (Please Complete)

This commit is contained in:
Torben Brenner 2022-12-16 12:02:49 +01:00 committed by p.delpy@dkfz-heidelberg.de
parent 4f0526ddf4
commit 4d49351ad2
3 changed files with 28 additions and 8 deletions

View File

@ -5,11 +5,11 @@ services:
container_name: bridgehead-id-manager
environment:
TOMCAT_REVERSEPROXY_FQDN: ${HOST}
MAGICPL_SITE: ${SITE_ID}
MAGICPL_SITE: ${IDMANAGEMENT_FRIENDLY_ID}
MAGICPL_ALLOWED_ORIGINS: https://${HOST}
MAGICPL_LOCAL_PATIENTLIST_APIKEY: ${IDMANAGER_LOCAL_PATIENTLIST_APIKEY}
MAGICPL_CENTRAXX_APIKEY: ${IDMANAGER_CENTRAXX_APIKEY}
MAGICPL_CONNECTOR_APIKEY: ${IDMANAGER_CONNECTOR_APIKEY}
MAGICPL_CENTRAXX_APIKEY: ${IDMANAGER_UPLOAD_APIKEY}
MAGICPL_CONNECTOR_APIKEY: ${IDMANAGER_READ_APIKEY}
MAGICPL_CENTRAL_PATIENTLIST_APIKEY: ${IDMANAGER_CENTRAL_PATIENTLIST_APIKEY}
MAGICPL_CONTROLNUMBERGENERATOR_APIKEY: ${IDMANAGER_CONTROLNUMBERGENERATOR_APIKEY}
MAGICPL_OIDC_CLIENT_ID: ${IDMANAGER_AUTH_CLIENT_ID}

View File

@ -1,7 +1,7 @@
#!/bin/bash
function idManagementSetup() {
if [ -n "$IDMANAGER_CENTRAXX_APIKEY" ]; then
if [ -n "$IDMANAGER_UPLOAD_APIKEY" ]; then
log INFO "id-management setup detected -- will start id-management (mainzelliste & magicpl)."
OVERRIDE+=" -f ./$PROJECT/modules/id-management-compose.yml"
@ -11,7 +11,27 @@ function idManagementSetup() {
# Source the ID Generators Configuration
source /etc/bridgehead/patientlist-id-generators.env
log INFO "ID-Management Generator 1: ${ML_BK_IDGENERATOR_RANDOM_1}"
# Ensure old ids are working !!!
legacyIdMapping
fi
}
# TODO: Map all old site ids to the new ones
function legacyIdMapping() {
case ${SITE_ID} in
"berlin")
export IDMANAGEMENT_FRIENDLY_ID=Berlin
;;
"dresden")
export IDMANAGEMENT_FRIENDLY_ID=Dresden
;;
"frankfurt")
export IDMANAGEMENT_FRIENDLY_ID=Frankfurt
;;
*)
export IDMANAGEMENT_FRIENDLY_ID=$SITE_ID
;;
esac
}

View File

@ -5,8 +5,8 @@ This module provides integration with the CCP-Pseudonymiziation Service. To lear
You must add following configuration variables to your sites-configuration repository:
```
IDMANAGER_CENTRAXX_APIKEY="<random-string>"
IDMANAGER_CONNECTOR_APIKEY="<random-string>"
IDMANAGER_UPLOAD_APIKEY="<random-string>"
IDMANAGER_READ_APIKEY="<random-string>"
IDMANAGER_CENTRAL_PATIENTLIST_APIKEY="<given-to-you-by-ccp-it>"
IDMANAGER_CONTROLNUMBERGENERATOR_APIKEY="<given-to-you-by-ccp-it>"
IDMANAGER_AUTH_CLIENT_ID="<given-to-you-by-ccp-it>"
@ -47,7 +47,7 @@ Typically, the sites connect their local data-management for the pseudonym creat
On your CentraXX Server, you need to change following settings in the "centraxx-dev.properties" file.
```
dktk.idmanagement.url=https://<your-linux-bk-host>/id-manager/translator/getId
dktk.idmanagement.apiKey=<your-setting-for-IDMANAGER_CENTRAXX_APIKEY>
dktk.idmanagement.apiKey=<your-setting-for-IDMANAGER_UPLOAD_APIKEY>
```
They typically already exist, but need to be changed to the new values!
#### Sites using ADT2FHIR