3 # ============LICENSE_START=======================================================
4 # Copyright (C) 2019-2021 AT&T Intellectual Property. All rights reserved.
5 # Modifications Copyright (C) 2019-2022 Nordix Foundation.
6 # Modifications Copyright (C) 2022 Bell Canada. All rights reserved.
7 # ================================================================================
8 # Licensed under the Apache License, Version 2.0 (the "License");
9 # you may not use this file except in compliance with the License.
10 # You may obtain a copy of the License at
12 # http://www.apache.org/licenses/LICENSE-2.0
14 # Unless required by applicable law or agreed to in writing, software
15 # distributed under the License is distributed on an "AS IS" BASIS,
16 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17 # See the License for the specific language governing permissions and
18 # limitations under the License.
20 # SPDX-License-Identifier: Apache-2.0
21 # ============LICENSE_END=========================================================
24 KEYSTORE="${KEYSTORE:-$POLICY_HOME/etc/ssl/policy-keystore}"
25 TRUSTSTORE="${TRUSTSTORE:-$POLICY_HOME/etc/ssl/policy-truststore}"
26 KEYSTORE_PASSWD="${KEYSTORE_PASSWD:-Pol1cy_0nap}"
27 TRUSTSTORE_PASSWD="${TRUSTSTORE_PASSWD:-Pol1cy_0nap}"
29 if [ "$#" -eq 1 ]; then
32 CONFIG_FILE=${CONFIG_FILE}
35 if [ -z "$CONFIG_FILE" ]; then
36 CONFIG_FILE="${POLICY_HOME}/etc/apiParameters.yaml"
39 echo "Policy api config file: $CONFIG_FILE"
41 if [ -f "${POLICY_HOME}/etc/mounted/policy-truststore" ]; then
42 echo "overriding policy-truststore"
43 cp -f "${POLICY_HOME}"/etc/mounted/policy-truststore "${TRUSTSTORE}"
46 if [ -f "${POLICY_HOME}/etc/mounted/policy-keystore" ]; then
47 echo "overriding policy-keystore"
48 cp -f "${POLICY_HOME}"/etc/mounted/policy-keystore "${KEYSTORE}"
51 if [ -f "${POLICY_HOME}/etc/mounted/logback.xml" ]; then
52 echo "overriding logback.xml"
53 cp -f "${POLICY_HOME}"/etc/mounted/logback.xml "${POLICY_HOME}"/etc/
57 -Dlogging.config="${POLICY_HOME}/etc/logback.xml" \
58 -Dserver.ssl.key-store="${KEYSTORE}" \
59 -Dserver.ssl.key-store-password="${KEYSTORE_PASSWD}" \
60 -Djavax.net.ssl.trustStore="${TRUSTSTORE}" \
61 -Djavax.net.ssl.trustStorePassword="${TRUSTSTORE_PASSWD}" \
63 --spring.config.location="${CONFIG_FILE}"