diff options
author | Dan Timoney <dtimoney@att.com> | 2021-09-08 12:29:10 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@onap.org> | 2021-09-08 12:29:10 +0000 |
commit | d929b3be347ccc3265af9b787ee0f3822efbfb0b (patch) | |
tree | d554308ff8971032bc129bf50da6732799d08810 | |
parent | 6b3071cd8dca04d5d1f17ff0d2921d8965732880 (diff) | |
parent | a798bc41d90d1a9370a524de6d0e17dcc33e933b (diff) |
Merge "Use cert-initializer truststore instead of hard-coded ONAP Root CA"
-rwxr-xr-x | ms/blueprintsprocessor/application/src/main/docker/startService.sh | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/ms/blueprintsprocessor/application/src/main/docker/startService.sh b/ms/blueprintsprocessor/application/src/main/docker/startService.sh index bbe550b57..ff6471b97 100755 --- a/ms/blueprintsprocessor/application/src/main/docker/startService.sh +++ b/ms/blueprintsprocessor/application/src/main/docker/startService.sh @@ -1,11 +1,16 @@ #!/bin/sh +TRUSTSTORE_PASSWD=${TRUSTSTORE_PASSWD:-changeit} + nodeName=BlueprintsProcessor_1.0.0_$(cat /proc/self/cgroup | grep docker | sed s/\\//\\n/g | tail -1) -echo "${CLUSTER_ID}:${CLUSTER_NODE_ID} APP Config HOME : ${APP_CONFIG_HOME}" export APP_HOME=/opt/app/onap -keytool -import -noprompt -trustcacerts -keystore $JAVA_HOME/lib/security/cacerts -storepass changeit -alias ONAP -file $APP_CONFIG_HOME/ONAP_RootCA.cer +#echo "${CLUSTER_ID}:${CLUSTER_NODE_ID} APP Config HOME : ${APP_CONFIG_HOME}" +#[[ - $APP_CONFIG_HOME/${PRIVATE_CA} ]] && keytool -import -noprompt -trustcacerts -keystore $JAVA_HOME/lib/security/cacerts -storepass ${TRUSTSTORE_PASSWD} -alias ${PRIVATE_CA} -file $APP_CONFIG_HOME/${PRIVATE_CA} + +#Instead of above, using cert-initializer truststore to replace the default java cacerts +[[ -f $AAF_CREDSPATH/truststoreONAPall.jks ]] && cp $AAF_CREDSPATH/truststoreONAPall.jks $JAVA_HOME/lib/security/cacerts exec java -classpath "/etc:${APP_HOME}/lib/*:/lib/*:/src:/schema:/generated-sources:${APP_CONFIG_HOME}:${APP_HOME}" \ -DappName=${APP_NAME} -DappVersion=${BUNDLEVERSION} \ |