From 8a5795ece3e857cad937db7314aa5a29600bd924 Mon Sep 17 00:00:00 2001 From: Gianluca Barbon Date: Thu, 29 Oct 2020 16:38:45 +0100 Subject: [PATCH] Removing redundant OpenID var in console entrypoint Signed-off-by: Gianluca Barbon --- assembly/console/entrypoint/run-console | 34 ++++++++++--------------- 1 file changed, 14 insertions(+), 20 deletions(-) diff --git a/assembly/console/entrypoint/run-console b/assembly/console/entrypoint/run-console index 0dbe0047db7..83f5a876e06 100755 --- a/assembly/console/entrypoint/run-console +++ b/assembly/console/entrypoint/run-console @@ -33,27 +33,21 @@ if [ -n "$KEYCLOAK_URL" ] && [ -n "$KAPUA_CONSOLE_URL" ]; then fi # Check for generic OpenID Connect provider integration -if [ -n "$KAPUA_CONSOLE_URL" ] && [ -n "$OPENID_JWT_ISSUER" ] && [ -n "$OPENID_AUTH_ENDPOINT" ] && [ -n "$OPENID_LOGOUT_ENDPOINT" ] && [ -n "$OPENID_TOKEN_ENDPOINT" ]; then +if [ -n "${KAPUA_CONSOLE_URL}" ] && [ -n "${OPENID_JWT_ISSUER}" ]; then echo "Activating OpenID Connect Generic integration..." - echo " Kapua: $KAPUA_CONSOLE_URL" - echo " OpenID Issuer: $OPENID_JWT_ISSUER" - echo " Auth Endpoint: $OPENID_AUTH_ENDPOINT" - echo " Logout Endpoint: $OPENID_LOGOUT_ENDPOINT" - echo " Token Endpoint: $OPENID_TOKEN_ENDPOINT" - - : OPENID_CLIENT_ID=${OPENID_CLIENT_ID:=console} - : JWT_AUDIENCE=${JWT_AUDIENCE:=console} - - JAVA_OPTS="$JAVA_OPTS -Dsso.provider=generic" - JAVA_OPTS="$JAVA_OPTS -Dsso.openid.client.id=${OPENID_CLIENT_ID}" - test -n "$CLIENT_SECRET" && JAVA_OPTS="$JAVA_OPTS -Dsso.openid.client.secret=${CLIENT_SECRET}" - JAVA_OPTS="$JAVA_OPTS -Dconsole.sso.home.uri=${KAPUA_CONSOLE_URL}" - - JAVA_OPTS="$JAVA_OPTS -Dsso.generic.openid.jwt.audience.allowed=${JWT_AUDIENCE}" - JAVA_OPTS="$JAVA_OPTS -Dsso.generic.openid.jwt.issuer.allowed=${OPENID_JWT_ISSUER}" - JAVA_OPTS="$JAVA_OPTS -Dsso.generic.openid.server.endpoint.auth=${OPENID_AUTH_ENDPOINT}" - JAVA_OPTS="$JAVA_OPTS -Dsso.generic.openid.server.endpoint.logout=${OPENID_LOGOUT_ENDPOINT}" - JAVA_OPTS="$JAVA_OPTS -Dsso.generic.openid.server.endpoint.token=${OPENID_TOKEN_ENDPOINT}" + echo " OpenID Issuer: ${OPENID_JWT_ISSUER}" + echo " Console: ${KAPUA_CONSOLE_URL}" + + JAVA_OPTS="${JAVA_OPTS} -Dsso.provider=generic" + JAVA_OPTS="${JAVA_OPTS} -Dsso.openid.client.id=${OPENID_CLIENT_ID:-console}" + test -n "${CLIENT_SECRET}" && JAVA_OPTS="${JAVA_OPTS} -Dsso.openid.client.secret=${CLIENT_SECRET}" + JAVA_OPTS="${JAVA_OPTS} -Dconsole.sso.home.uri=${KAPUA_CONSOLE_URL}" + + JAVA_OPTS="${JAVA_OPTS} -Dsso.generic.openid.jwt.audience.allowed=${JWT_AUDIENCE:-console}" + JAVA_OPTS="${JAVA_OPTS} -Dsso.generic.openid.jwt.issuer.allowed=${OPENID_JWT_ISSUER}" + test -n "${OPENID_AUTH_ENDPOINT}" && JAVA_OPTS="${JAVA_OPTS} -Dsso.generic.openid.server.endpoint.auth=${OPENID_AUTH_ENDPOINT}" + test -n "${OPENID_LOGOUT_ENDPOINT}" && JAVA_OPTS="${JAVA_OPTS} -Dsso.generic.openid.server.endpoint.logout=${OPENID_LOGOUT_ENDPOINT}" + test -n "${OPENID_TOKEN_ENDPOINT}" && JAVA_OPTS="${JAVA_OPTS} -Dsso.generic.openid.server.endpoint.token=${OPENID_TOKEN_ENDPOINT}" fi export JAVA_OPTS