aboutsummaryrefslogtreecommitdiffstats
path: root/packages/docker/src
diff options
context:
space:
mode:
authorJorge Hernandez <jh1730@att.com>2018-08-17 16:40:58 -0500
committerJim Hahn <jrh3@att.com>2018-08-20 11:50:01 -0400
commit3bbdb237654a09496c2916ce2c7545f2aabbe339 (patch)
tree0c2fe9969405b77622d3a8709ebaf3314ac640b0 /packages/docker/src
parent763a2328d939c1d400fd1c9595bec5717645914b (diff)
https certs with aaf+pdpd containers compatibility
Updated license date (jrh3). Change-Id: I1bc244da64f4a1e683f8c6a1be53157474f46ee9 Issue-ID: POLICY-1026 Signed-off-by: Jorge Hernandez <jh1730@att.com>
Diffstat (limited to 'packages/docker/src')
-rw-r--r--packages/docker/src/main/docker/do-start.sh9
-rw-r--r--packages/docker/src/main/docker/docker-install.sh13
2 files changed, 17 insertions, 5 deletions
diff --git a/packages/docker/src/main/docker/do-start.sh b/packages/docker/src/main/docker/do-start.sh
index fa4cd6ab..0a550694 100644
--- a/packages/docker/src/main/docker/do-start.sh
+++ b/packages/docker/src/main/docker/do-start.sh
@@ -56,9 +56,14 @@ else
. /opt/app/policy/etc/profile.d/env.sh
+ # override the policy keystore and truststore if present
+
if [[ -f config/policy-keystore ]]; then
- # install policy keystore if present
- cp config/policy-keystore ${POLICY_HOME}/etc/ssl
+ cp -f config/policy-keystore ${POLICY_HOME}/etc/ssl
+ fi
+
+ if [[ -f config/policy-truststore ]]; then
+ cp -f config/policy-trustore ${POLICY_HOME}/etc/ssl
fi
if [[ -f config/drools-tweaks.sh ]] ; then
diff --git a/packages/docker/src/main/docker/docker-install.sh b/packages/docker/src/main/docker/docker-install.sh
index c17cba2a..98560202 100644
--- a/packages/docker/src/main/docker/docker-install.sh
+++ b/packages/docker/src/main/docker/docker-install.sh
@@ -154,6 +154,7 @@ function configure_component() {
SED_LINE+=" -e 's!\${{POLICY_USER}}!${POLICY_USER}!g' "
SED_LINE+=" -e 's!\${{POLICY_GROUP}}!${POLICY_GROUP}!g' "
SED_LINE+=" -e 's!\${{KEYSTORE_PASSWD}}!${KEYSTORE_PASSWD}!g' "
+ SED_LINE+=" -e 's!\${{TRUSTSTORE_PASSWD}}!${TRUSTSTORE_PASSWD}!g' "
SED_LINE+=" -e 's!\${{JAVA_HOME}}!${JAVA_HOME}!g' "
while read line || [ -n "${line}" ]; do
@@ -245,11 +246,17 @@ function configure_keystore() {
set -x
fi
- local DEFAULT_KEYSTORE_PASSWORD="Pol1cy_0nap"
+ local DEFAULT_TRUSTSTORE_PASSWORD='Pol1cy_0nap'
+ local DEFAULT_KEYSTORE_PASSWORD='Pol1cy_0nap'
+
+ if [[ -n ${TRUSTSTORE_PASSWD} ]]; then
+ keytool -storepasswd -storepass "${DEFAULT_TRUSTSTORE_PASSWORD}" -keystore "${POLICY_HOME}/etc/ssl/policy-truststore" -new "${TRUSTSTORE_PASSWD}"
+ keytool -list -keystore "${POLICY_HOME}/etc/ssl/policy-truststore" -storepass "${TRUSTSTORE_PASSWD}"
+ fi
if [[ -n ${KEYSTORE_PASSWD} ]]; then
- keytool -storepasswd -storepass ${DEFAULT_KEYSTORE_PASSWORD} -keystore ${POLICY_HOME}/etc/ssl/policy-keystore -new ${KEYSTORE_PASSWD}
- keytool -list -keystore ${POLICY_HOME}/etc/ssl/policy-keystore -storepass ${KEYSTORE_PASSWD}
+ keytool -storepasswd -storepass "${DEFAULT_KEYSTORE_PASSWORD}" -keystore "${POLICY_HOME}/etc/ssl/policy-keystore" -new "${KEYSTORE_PASSWD}"
+ keytool -list -keystore "${POLICY_HOME}/etc/ssl/policy-keystore" -storepass "${KEYSTORE_PASSWD}"
fi
}