summaryrefslogtreecommitdiffstats
path: root/src/main/bin/start.sh
diff options
context:
space:
mode:
authormark.j.leonard <mark.j.leonard@gmail.com>2019-03-29 16:29:44 +0000
committermark.j.leonard <mark.j.leonard@gmail.com>2019-04-03 10:44:28 +0100
commit61607b8e66f19aba46d0c0f7cec3a9fe2c6e1e08 (patch)
treeb330dc7b884643a04b38801a92a2400df3850535 /src/main/bin/start.sh
parent60457e41054465e9fa10c8e6bfdbfa62a45d1f0a (diff)
Move REQUIRE_CLIENT_AUTH code to start script
Move the conversion from the REQUIRE_CLIENT_AUTH env variable to the Spring setting server.ssl.client-auth out of the Java code and in to the start script. This declutters the code and exposes this setting. Refactor the code for readability: have Jetty deobfuscate the password string for us rather than manually detecting the "OBF:" prefix. Also fix a typo (spelling mistake). Change-Id: Ic670c04f97f59e06e48ca2cf4d7a0188020b3eaa Issue-ID: AAI-2280 Signed-off-by: mark.j.leonard <mark.j.leonard@gmail.com>
Diffstat (limited to 'src/main/bin/start.sh')
-rw-r--r--src/main/bin/start.sh4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/main/bin/start.sh b/src/main/bin/start.sh
index 3121c8e..8c4cdf5 100644
--- a/src/main/bin/start.sh
+++ b/src/main/bin/start.sh
@@ -35,6 +35,10 @@ PROPS="-DAPP_HOME=${APP_HOME}"
PROPS="${PROPS} -DCONFIG_HOME=${CONFIG_HOME}"
PROPS="${PROPS} -Dtosca.mappings.config=${CONFIG_HOME}/tosca-mappings.json"
PROPS="${PROPS} -DKEY_STORE_PASSWORD=${KEY_STORE_PASSWORD}"
+if [ ! -z "$REQUIRE_CLIENT_AUTH" ]; then
+ PROPS="$PROPS -Dserver.ssl.client-auth=${REQUIRE_CLIENT_AUTH}"
+fi
+
JVM_MAX_HEAP=${MAX_HEAP:-1024}
exec java -Xmx${JVM_MAX_HEAP}m ${PROPS} -jar ${APP_HOME}/babel.jar