aboutsummaryrefslogtreecommitdiffstats
path: root/packages/apex-pdp-package-full
diff options
context:
space:
mode:
authorliamfallon <liam.fallon@est.tech>2019-05-03 12:08:27 +0000
committerliamfallon <liam.fallon@est.tech>2019-05-03 12:08:27 +0000
commit728f9132fa2c774ad5e6e5ec3c32dbd1bfd4bbfa (patch)
tree26923ffc5cda5f53ba95e05f7df3c326e053523d /packages/apex-pdp-package-full
parent62bc4a162b169971349bce415f97ace15c15eeef (diff)
Fix HTTPS configuration on PDP-A
This review enables HTTPS for health check on PDP-A Issue-ID: POLICY-1732 Change-Id: I139a4c3ba043f978d1a75ae560037f713def1c1f Signed-off-by: liamfallon <liam.fallon@est.tech>
Diffstat (limited to 'packages/apex-pdp-package-full')
-rw-r--r--packages/apex-pdp-package-full/src/main/package/scripts/apexApps.bat10
-rwxr-xr-xpackages/apex-pdp-package-full/src/main/package/scripts/apexApps.sh13
2 files changed, 18 insertions, 5 deletions
diff --git a/packages/apex-pdp-package-full/src/main/package/scripts/apexApps.bat b/packages/apex-pdp-package-full/src/main/package/scripts/apexApps.bat
index 9798fa545..ad176ce0a 100644
--- a/packages/apex-pdp-package-full/src/main/package/scripts/apexApps.bat
+++ b/packages/apex-pdp-package-full/src/main/package/scripts/apexApps.bat
@@ -50,12 +50,20 @@ if defined APEX_HOME (
exit /b
)
+:: Environment variables for HTTPS
+set KEYSTORE=%APEX_HOME%/etc/ssl/policy-keystore"
+set KEYSTORE_PASSWD="Pol1cy_0nap"
+set TRUSTSTORE=%APEX_HOME%/etc/ssl/policy-truststore"
+set TRUSTSTORE_PASSWD="Pol1cy_0nap"
+
+:: HTTPS parameters
+set HTTPS_PARAMETERS=-Djavax.net.ssl.keyStore=%KEYSTORE% -Djavax.net.ssl.keyStorePassword=%KEYSTORE_PASSWD% -Djavax.net.ssl.trustStore=%TRUSTSTORE% -Djavax.net.ssl.trustStorePassword=%TRUSTSTORE_PASSWD%
:: script name for output
set MOD_SCRIPT_NAME=apexApps
:: config for CP apps
-SET _CONFIG=-Dlogback.configurationFile=%APEX_HOME%\etc\logback.xml -Dhazelcast.config=%APEX_HOME%\etc\hazelcast.xml -Dhazelcast.mancenter.enabled=false
+SET _CONFIG=%HTTPS_PARAMETERS% -Dlogback.configurationFile=%APEX_HOME%\etc\logback.xml -Dhazelcast.config=%APEX_HOME%\etc\hazelcast.xml -Dhazelcast.mancenter.enabled=false
:: Maven/APEX version
set /p _VERSION=<%APEX_HOME%\etc\app-version.txt
diff --git a/packages/apex-pdp-package-full/src/main/package/scripts/apexApps.sh b/packages/apex-pdp-package-full/src/main/package/scripts/apexApps.sh
index 52e1f3df9..4c0d0fcdc 100755
--- a/packages/apex-pdp-package-full/src/main/package/scripts/apexApps.sh
+++ b/packages/apex-pdp-package-full/src/main/package/scripts/apexApps.sh
@@ -33,7 +33,6 @@
## DO NOT CHANGE CODE BELOW, unless you know what you are doing
##
-
if [ -z $APEX_HOME ]
then
APEX_HOME="/opt/app/policy/apex-pdp"
@@ -47,6 +46,14 @@ then
exit
fi
+## Environment variables for HTTPS
+KEYSTORE="${APEX_HOME}/etc/ssl/policy-keystore"
+KEYSTORE_PASSWD="Pol1cy_0nap"
+TRUSTSTORE="${APEX_HOME}/etc/ssl/policy-truststore"
+TRUSTSTORE_PASSWD="Pol1cy_0nap"
+
+## HTTPS parameters
+HTTPS_PARAMETERS="-Djavax.net.ssl.keyStore=${KEYSTORE} -Djavax.net.ssl.keyStorePassword=${KEYSTORE_PASSWD} -Djavax.net.ssl.trustStore=${TRUSTSTORE} -Djavax.net.ssl.trustStorePassword=${TRUSTSTORE_PASSWD}"
## script name for output
MOD_SCRIPT_NAME=`basename $0`
@@ -60,12 +67,11 @@ if [ "${BASH_VERSION:0:1}" -lt 4 ] ; then
fi
## config for CP apps
-_config="-Dlogback.configurationFile=$APEX_HOME/etc/logback.xml -Dhazelcast.config=$APEX_HOME/etc/hazelcast.xml -Dhazelcast.mancenter.enabled=false"
+_config="${HTTPS_PARAMETERS} -Dlogback.configurationFile=$APEX_HOME/etc/logback.xml -Dhazelcast.config=$APEX_HOME/etc/hazelcast.xml -Dhazelcast.mancenter.enabled=false"
## Maven/APEX version
_version=`cat $APEX_HOME/etc/app-version.txt`
-
## system to get CygWin paths
system=`uname -s | cut -c1-6`
cpsep=":"
@@ -77,7 +83,6 @@ fi
## CP for CP apps
CLASSPATH="$APEX_HOME/etc${cpsep}$APEX_HOME/etc/hazelcast${cpsep}$APEX_HOME/etc/infinispan${cpsep}$APEX_HOME/lib/*"
-
## array of applications with name=command
declare -A APEX_APP_MAP
APEX_APP_MAP["ws-console"]="java -jar $APEX_HOME/lib/applications/simple-wsclient-$_version-jar-with-dependencies.jar -c"