Skip to content

Commit 0e3df7a

Browse files
authored
fix: configurable jwt alias at startup (#1442)
* configurable jwt alias at startup Signed-off-by: achmelo <a.chmelo@gmail.com> * use APIML_SECURITY_AUTH_JWTKEYALIAS if PKCS11_TOKEN_LABEL is not available Signed-off-by: achmelo <a.chmelo@gmail.com> * remove echo Signed-off-by: achmelo <a.chmelo@gmail.com>
1 parent e694c0f commit 0e3df7a

File tree

1 file changed

+6
-0
lines changed
  • gateway-package/src/main/resources/bin

1 file changed

+6
-0
lines changed

gateway-package/src/main/resources/bin/start.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,11 @@ then
4848
LOG_LEVEL=$DIAG_MODE
4949
fi
5050

51+
if [[ -z ${PKCS11_TOKEN_LABEL} && ! -z ${APIML_SECURITY_AUTH_JWTKEYALIAS} ]]
52+
then
53+
PKCS11_TOKEN_LABEL=${APIML_SECURITY_AUTH_JWTKEYALIAS}
54+
fi
55+
5156
if [[ -z ${APIML_GATEWAY_CATALOG_ID} ]]
5257
then
5358
APIML_GATEWAY_CATALOG_ID="apicatalog"
@@ -100,6 +105,7 @@ _BPX_JOBNAME=${ZOWE_PREFIX}${GATEWAY_CODE} java \
100105
-Dapiml.security.ssl.nonStrictVerifySslCertificatesOfServices=${NONSTRICT_VERIFY_CERTIFICATES:-false} \
101106
-Dapiml.security.auth.zosmf.serviceId=${APIML_ZOSMF_ID:-zosmf} \
102107
-Dapiml.security.auth.provider=${APIML_SECURITY_AUTH_PROVIDER} \
108+
-Dapiml.security.auth.jwtKeyAlias=${PKCS11_TOKEN_LABEL:-jwtsecret} \
103109
-Dapiml.zoweManifest=${ZOWE_MANIFEST} \
104110
-Dserver.address=0.0.0.0 \
105111
-Dserver.maxConnectionsPerRoute=${APIML_MAX_CONNECTIONS_PER_ROUTE:-10} \

0 commit comments

Comments
 (0)