Added AAF SSL certs related changes 52/101552/2
authorRamesh Parthasarathy <ramesh.parthasarathy@att.com>
Tue, 11 Feb 2020 18:39:37 +0000 (18:39 +0000)
committerRamesh Parthasarathy <ramesh.parthasarathy@att.com>
Wed, 12 Feb 2020 19:24:12 +0000 (19:24 +0000)
if AAF_SSL_CERTS_ENABLED environment variable is
turned on it will try initialize other environment
variables related to AAF SSL certs. SO OOM application
overrides will be dynamically configured whether or not
to use AAF SSL certs.

Issue-ID: SO-2451
Signed-off-by: Ramesh Parthasarathy(rp6768)<ramesh.parthasarathy@att.com>
Change-Id: I46eb8fa2f8f790232635a3e1926fd2464c48d173

packages/docker/src/main/docker/docker-files/scripts/start-app.sh

index cea680c..75d64fe 100644 (file)
@@ -83,6 +83,26 @@ fi
 
 jvmargs="${JVM_ARGS} -Dspring.profiles.active=${ACTIVE_PROFILE} -Djava.security.egd=file:/dev/./urandom -Dlogs_dir=${LOG_PATH} -Dlogging.config=/app/logback-spring.xml $jksargs -Dspring.config.additional-location=$CONFIG_PATH ${SSL_DEBUG} ${DISABLE_SNI}"
 
+
+read_properties(){
+    while IFS="=" read -r key value; do
+        case "${key}" in
+          '#'*) ;;
+             *)
+               eKey=$(echo $key | tr '[:lower:]' '[:upper:]')
+               export "$eKey"="$value"
+        esac
+    done <<-EOF
+       $1
+       EOF
+}
+
+
+
+if [ -n "${AAF_SSL_CERTS_ENABLED}" ]; then
+read_properties "$(head -n 4 /app/certs/.passphrases)"
+fi
+
 echo "JVM Arguments: ${jvmargs}"
 
 java ${jvmargs} -jar app.jar