Skip to content

Commit

Permalink
fix: set correct protocol using start script (#3486)
Browse files Browse the repository at this point in the history
Signed-off-by: achmelo <[email protected]>
  • Loading branch information
achmelo authored Mar 27, 2024
1 parent 567c261 commit 52528ad
Show file tree
Hide file tree
Showing 5 changed files with 52 additions and 2 deletions.
11 changes: 11 additions & 0 deletions api-catalog-package/src/main/resources/bin/start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,17 @@ truststore_pass="${ZWE_configs_certificate_truststore_password:-${ZWE_zowe_certi
keystore_location="${ZWE_configs_certificate_keystore_file:-${ZWE_zowe_certificate_keystore_file}}"
truststore_location="${ZWE_configs_certificate_truststore_file:-${ZWE_zowe_certificate_truststore_file}}"

if [ "${keystore_type}" = "JCERACFKS" ]; then
keystore_location=$(echo "${keystore_location}" | sed s_safkeyring://_safkeyringjce://_)
truststore_location=$(echo "${truststore_location}" | sed s_safkeyring://_safkeyringjce://_)
elif [ "${keystore_type}" = "JCECCARACFKS" ]; then
keystore_location=$(echo "${keystore_location}" | sed s_safkeyring://_safkeyringjcecca://_)
truststore_location=$(echo "${truststore_location}" | sed s_safkeyring://_safkeyringjcecca://_)
elif [ "${keystore_type}" = "JCEHYBRIDRACFKS" ]; then
keystore_location=$(echo "${keystore_location}" | sed s_safkeyring://_safkeyringjcehybrid://_)
truststore_location=$(echo "${truststore_location}" | sed s_safkeyring://_safkeyringjcehybrid://_)
fi

# NOTE: these are moved from below
# -Dapiml.service.ipAddress=${ZOWE_IP_ADDRESS:-127.0.0.1} \
# -Dapiml.service.preferIpAddress=false \
Expand Down
10 changes: 10 additions & 0 deletions caching-service-package/src/main/resources/bin/start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,16 @@ truststore_pass="${ZWE_configs_certificate_truststore_password:-${ZWE_zowe_certi
keystore_location="${ZWE_configs_certificate_keystore_file:-${ZWE_zowe_certificate_keystore_file}}"
truststore_location="${ZWE_configs_certificate_truststore_file:-${ZWE_zowe_certificate_truststore_file}}"

if [ "${keystore_type}" = "JCERACFKS" ]; then
keystore_location=$(echo "${keystore_location}" | sed s_safkeyring://_safkeyringjce://_)
truststore_location=$(echo "${truststore_location}" | sed s_safkeyring://_safkeyringjce://_)
elif [ "${keystore_type}" = "JCECCARACFKS" ]; then
keystore_location=$(echo "${keystore_location}" | sed s_safkeyring://_safkeyringjcecca://_)
truststore_location=$(echo "${truststore_location}" | sed s_safkeyring://_safkeyringjcecca://_)
elif [ "${keystore_type}" = "JCEHYBRIDRACFKS" ]; then
keystore_location=$(echo "${keystore_location}" | sed s_safkeyring://_safkeyringjcehybrid://_)
truststore_location=$(echo "${truststore_location}" | sed s_safkeyring://_safkeyringjcehybrid://_)
fi
# NOTE: these are moved from below
# -Dapiml.service.ipAddress=${ZOWE_IP_ADDRESS:-127.0.0.1} \
# -Dapiml.service.preferIpAddress=${APIML_PREFER_IP_ADDRESS:-false} \
Expand Down
10 changes: 10 additions & 0 deletions cloud-gateway-package/src/main/resources/bin/start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,16 @@ truststore_pass="${ZWE_configs_certificate_truststore_password:-${ZWE_zowe_certi
keystore_location="${ZWE_configs_certificate_keystore_file:-${ZWE_zowe_certificate_keystore_file}}"
truststore_location="${ZWE_configs_certificate_truststore_file:-${ZWE_zowe_certificate_truststore_file}}"

if [ "${keystore_type}" = "JCERACFKS" ]; then
keystore_location=$(echo "${keystore_location}" | sed s_safkeyring://_safkeyringjce://_)
truststore_location=$(echo "${truststore_location}" | sed s_safkeyring://_safkeyringjce://_)
elif [ "${keystore_type}" = "JCECCARACFKS" ]; then
keystore_location=$(echo "${keystore_location}" | sed s_safkeyring://_safkeyringjcecca://_)
truststore_location=$(echo "${truststore_location}" | sed s_safkeyring://_safkeyringjcecca://_)
elif [ "${keystore_type}" = "JCEHYBRIDRACFKS" ]; then
keystore_location=$(echo "${keystore_location}" | sed s_safkeyring://_safkeyringjcehybrid://_)
truststore_location=$(echo "${truststore_location}" | sed s_safkeyring://_safkeyringjcehybrid://_)
fi

CLOUD_GATEWAY_CODE=CG
_BPX_JOBNAME=${ZWE_zowe_job_prefix}${CLOUD_GATEWAY_CODE} java \
Expand Down
13 changes: 11 additions & 2 deletions discovery-package/src/main/resources/bin/start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ ADD_OPENS="--add-opens=java.base/java.lang=ALL-UNNAMED
--add-opens=java.base/java.util=ALL-UNNAMED
--add-opens=java.base/java.util.concurrent=ALL-UNNAMED
--add-opens=java.base/javax.net.ssl=ALL-UNNAMED"

keystore_type="${ZWE_configs_certificate_keystore_type:-${ZWE_zowe_certificate_keystore_type:-PKCS12}}"
keystore_pass="${ZWE_configs_certificate_keystore_password:-${ZWE_zowe_certificate_keystore_password}}"
key_pass="${ZWE_configs_certificate_key_password:-${ZWE_zowe_certificate_key_password:-${keystore_pass}}}"
Expand All @@ -148,7 +148,16 @@ truststore_pass="${ZWE_configs_certificate_truststore_password:-${ZWE_zowe_certi
keystore_location="${ZWE_configs_certificate_keystore_file:-${ZWE_zowe_certificate_keystore_file}}"
truststore_location="${ZWE_configs_certificate_truststore_file:-${ZWE_zowe_certificate_truststore_file}}"
#echo "keystore='$keystore_location' truststore='$truststore_location'"

if [ "${keystore_type}" = "JCERACFKS" ]; then
keystore_location=$(echo "${keystore_location}" | sed s_safkeyring://_safkeyringjce://_)
truststore_location=$(echo "${truststore_location}" | sed s_safkeyring://_safkeyringjce://_)
elif [ "${keystore_type}" = "JCECCARACFKS" ]; then
keystore_location=$(echo "${keystore_location}" | sed s_safkeyring://_safkeyringjcecca://_)
truststore_location=$(echo "${truststore_location}" | sed s_safkeyring://_safkeyringjcecca://_)
elif [ "${keystore_type}" = "JCEHYBRIDRACFKS" ]; then
keystore_location=$(echo "${keystore_location}" | sed s_safkeyring://_safkeyringjcehybrid://_)
truststore_location=$(echo "${truststore_location}" | sed s_safkeyring://_safkeyringjcehybrid://_)
fi
# NOTE: these are moved from below
# -Dapiml.service.ipAddress=${ZOWE_IP_ADDRESS:-127.0.0.1} \
# -Dapiml.service.preferIpAddress=${APIML_PREFER_IP_ADDRESS:-false} \
Expand Down
10 changes: 10 additions & 0 deletions gateway-package/src/main/resources/bin/start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,16 @@ truststore_pass="${ZWE_configs_certificate_truststore_password:-${ZWE_zowe_certi
keystore_location="${ZWE_configs_certificate_keystore_file:-${ZWE_zowe_certificate_keystore_file}}"
truststore_location="${ZWE_configs_certificate_truststore_file:-${ZWE_zowe_certificate_truststore_file}}"

if [ "${keystore_type}" = "JCERACFKS" ]; then
keystore_location=$(echo "${keystore_location}" | sed s_safkeyring://_safkeyringjce://_)
truststore_location=$(echo "${truststore_location}" | sed s_safkeyring://_safkeyringjce://_)
elif [ "${keystore_type}" = "JCECCARACFKS" ]; then
keystore_location=$(echo "${keystore_location}" | sed s_safkeyring://_safkeyringjcecca://_)
truststore_location=$(echo "${truststore_location}" | sed s_safkeyring://_safkeyringjcecca://_)
elif [ "${keystore_type}" = "JCEHYBRIDRACFKS" ]; then
keystore_location=$(echo "${keystore_location}" | sed s_safkeyring://_safkeyringjcehybrid://_)
truststore_location=$(echo "${truststore_location}" | sed s_safkeyring://_safkeyringjcehybrid://_)
fi
# NOTE: these are moved from below
# -Dapiml.service.preferIpAddress=${APIML_PREFER_IP_ADDRESS:-false} \
# -Dapiml.service.ipAddress=${ZOWE_IP_ADDRESS:-127.0.0.1} \
Expand Down

0 comments on commit 52528ad

Please sign in to comment.