From 8e9763c032752ec2b3df1f6130449a172e1a8008 Mon Sep 17 00:00:00 2001 From: Tobias Kussel Date: Fri, 6 Oct 2023 09:35:13 +0000 Subject: [PATCH] Fix script for the creation of persistent keys --- bbmri/modules/dnpm-setup.sh | 2 +- ccp/modules/dnpm-setup.sh | 2 +- ccp/modules/id-management-setup.sh | 2 +- minimal/modules/dnpm-setup.sh | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/bbmri/modules/dnpm-setup.sh b/bbmri/modules/dnpm-setup.sh index ce37632..440c436 100644 --- a/bbmri/modules/dnpm-setup.sh +++ b/bbmri/modules/dnpm-setup.sh @@ -5,7 +5,7 @@ if [ -n "${ENABLE_DNPM}" ]; then OVERRIDE+=" -f ./$PROJECT/modules/dnpm-compose.yml" # Set variables required for Beam-Connect - DNPM_APPLICATION_SECRET="$(echo \"This is a salt string to generate one consistent password for DNPM. It is not required to be secret.\" | openssl pkeyutl -sign -inkey /etc/bridgehead/pki/${SITE_ID}.priv.pem | base64 | head -c 30)" + DNPM_APPLICATION_SECRET="$(echo \"This is a salt string to generate one consistent password for DNPM. It is not required to be secret.\" | sha1sum | openssl pkeyutl -sign -inkey /etc/bridgehead/pki/${SITE_ID}.priv.pem | base64 | head -c 30)" DNPM_BEAM_SECRET_SHORT="$(cat /proc/sys/kernel/random/uuid | sed 's/[-]//g' | head -c 20)" DNPM_BROKER_ID="broker.ccp-it.dktk.dkfz.de" DNPM_BROKER_URL="https://${DNPM_BROKER_ID}" diff --git a/ccp/modules/dnpm-setup.sh b/ccp/modules/dnpm-setup.sh index b3dd636..cde5ca0 100644 --- a/ccp/modules/dnpm-setup.sh +++ b/ccp/modules/dnpm-setup.sh @@ -5,6 +5,6 @@ if [ -n "${ENABLE_DNPM}" ]; then OVERRIDE+=" -f ./$PROJECT/modules/dnpm-compose.yml" # Set variables required for Beam-Connect - DNPM_APPLICATION_SECRET="$(echo \"This is a salt string to generate one consistent password for DNPM. It is not required to be secret.\" | openssl pkeyutl -sign -inkey /etc/bridgehead/pki/${SITE_ID}.priv.pem | base64 | head -c 30)" + DNPM_APPLICATION_SECRET="$(echo \"This is a salt string to generate one consistent password for DNPM. It is not required to be secret.\" | sha1sum | openssl pkeyutl -sign -inkey /etc/bridgehead/pki/${SITE_ID}.priv.pem | base64 | head -c 30)" DNPM_BEAM_SECRET_SHORT="$(cat /proc/sys/kernel/random/uuid | sed 's/[-]//g' | head -c 20)" fi diff --git a/ccp/modules/id-management-setup.sh b/ccp/modules/id-management-setup.sh index 1e24891..272bc81 100644 --- a/ccp/modules/id-management-setup.sh +++ b/ccp/modules/id-management-setup.sh @@ -6,7 +6,7 @@ function idManagementSetup() { OVERRIDE+=" -f ./$PROJECT/modules/id-management-compose.yml" # Auto Generate local Passwords - PATIENTLIST_POSTGRES_PASSWORD="$(echo \"id-management-module-db-password-salt\" | openssl pkeyutl -sign -inkey /etc/bridgehead/pki/${SITE_ID}.priv.pem | base64 | head -c 30)" + PATIENTLIST_POSTGRES_PASSWORD="$(echo \"id-management-module-db-password-salt\" | sha1sum | openssl pkeyutl -sign -inkey /etc/bridgehead/pki/${SITE_ID}.priv.pem | base64 | head -c 30)" IDMANAGER_LOCAL_PATIENTLIST_APIKEY="$(cat /proc/sys/kernel/random/uuid | sed 's/[-]//g' | head -c 20)" # Transform Seeds Configuration to pass it to the Mainzelliste Container diff --git a/minimal/modules/dnpm-setup.sh b/minimal/modules/dnpm-setup.sh index 7b3be9a..5fb62f5 100644 --- a/minimal/modules/dnpm-setup.sh +++ b/minimal/modules/dnpm-setup.sh @@ -5,7 +5,7 @@ if [ -n "${ENABLE_DNPM}" ]; then OVERRIDE+=" -f ./$PROJECT/modules/dnpm-compose.yml" # Set variables required for Beam-Connect - DNPM_APPLICATION_SECRET="$(echo \"This is a salt string to generate one consistent password for DNPM. It is not required to be secret.\" | openssl pkeyutl -sign -inkey /etc/bridgehead/pki/${SITE_ID}.priv.pem | base64 | head -c 30)" + DNPM_APPLICATION_SECRET="$(echo \"This is a salt string to generate one consistent password for DNPM. It is not required to be secret.\" | sha1sum | openssl pkeyutl -sign -inkey /etc/bridgehead/pki/${SITE_ID}.priv.pem | base64 | head -c 30)" DNPM_BEAM_SECRET_SHORT="$(cat /proc/sys/kernel/random/uuid | sed 's/[-]//g' | head -c 20)" DNPM_BROKER_ID="broker.ccp-it.dktk.dkfz.de" DNPM_BROKER_URL="https://${DNPM_BROKER_ID}"