From 9dd3c24a6d843cdfac542a8bfaeb48697e70361d Mon Sep 17 00:00:00 2001 From: janskiba Date: Wed, 24 May 2023 08:50:37 +0000 Subject: [PATCH] Change cert permission and location --- ccp/modules/datashield-setup.sh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/ccp/modules/datashield-setup.sh b/ccp/modules/datashield-setup.sh index 3573c8c..15c0359 100644 --- a/ccp/modules/datashield-setup.sh +++ b/ccp/modules/datashield-setup.sh @@ -5,6 +5,9 @@ if [ "$ENABLE_DATASHIELD" == true ];then OVERRIDE+=" -f ./$PROJECT/modules/datashield-compose.yml" fi OPAL_DB_PASSWORD="$(echo \"This is a salt string to generate one consistent password for Opal. It is not required to be secret.\" | openssl rsautl -sign -inkey /etc/bridgehead/pki/${SITE_ID}.priv.pem | base64 | head -c 30)" -if [ ! -e "/etc/bridgehead/traefik-tls/opal-cert.pem" ]; then - openssl req -x509 -newkey rsa:4096 -nodes -keyout /etc/bridgehead/traefik-tls/opal-key.pem -out /etc/bridgehead/traefik-tls/opal-cert.pem -days 3650 -subj "/CN=$HOST" +if [ ! -e "/etc/bridgehead/trusted-ca-certs/opal-cert.pem" ]; then + openssl req -x509 -newkey rsa:4096 -nodes -keyout /etc/bridgehead/trusted-ca-certs/opal-key.pem -out /etc/bridgehead/trusted-ca-certs/opal-cert.pem -days 3650 -subj "/CN=${HOST:-opal}/C=DE" + chmod g+r /etc/bridgehead/trusted-ca-certs/opal-key.pem + chown bridgehead:docker /etc/bridgehead/trusted-ca-certs/opal-key.pem + chown bridgehead:docker /etc/bridgehead/trusted-ca-certs/opal-cert.pem fi