diff --git a/deploy/docker/compose/src/main/scripts/.env.sample b/deploy/docker/compose/src/main/scripts/.env.sample index 9e53283c..a585319b 100644 --- a/deploy/docker/compose/src/main/scripts/.env.sample +++ b/deploy/docker/compose/src/main/scripts/.env.sample @@ -114,24 +114,15 @@ # --- relative login path from external authentication service # REPOSITORY_SERVICE_AUTH_EXTERNAL_LOGIN=/shibboleth +# --- relative logout path from external authentication service +# REPOSITORY_SERVICE_AUTH_EXTERNAL_LOGOUT=/logout + # --- absolut path from external authentication provider # REPOSITORY_SERVICE_HOME_AUTH_EXTERNAL_LOGIN_PROVIDERS_URL= # --- relative logout path from external authentication target provider # REPOSITORY_SERVICE_HOME_AUTH_EXTERNAL_LOGIN_PROVIDER_TARGET_URL= -# --- relative logout path from external authentication service -# REPOSITORY_SERVICE_AUTH_EXTERNAL_LOGOUT=/Shibboleth.sso/Logout - -# --- should edu-sharing destroy it's session or does this the idp for us -# REPOSITORY_SERVICE_HOME_AUTH_EXTERNAL_LOGOUT_DESTROY_SESSION=false - -# --- should edu-sharing redirected us to a page after the logout? -# REPOSITORY_SERVICE_HOME_AUTH_EXTERNAL_LOGOUT_REDIRECT=false - -# --- the url to redirect to if redirect is true -# REPOSITORY_SERVICE_HOME_AUTH_EXTERNAL_LOGOUT_REDIRECT_URL= - # --- guest user name # REPOSITORY_SERVICE_GUEST_USER= diff --git a/deploy/docker/repository/build/service/src/main/build/assets/entrypoint.sh b/deploy/docker/repository/build/service/src/main/build/assets/entrypoint.sh index 7a03a794..f63f2799 100755 --- a/deploy/docker/repository/build/service/src/main/build/assets/entrypoint.sh +++ b/deploy/docker/repository/build/service/src/main/build/assets/entrypoint.sh @@ -26,12 +26,7 @@ my_home_appid="${REPOSITORY_SERVICE_HOME_APPID:-local}" my_home_auth="${REPOSITORY_SERVICE_HOME_AUTH:-}" my_home_auth_external="${REPOSITORY_SERVICE_HOME_AUTH_EXTERNAL:-false}" my_home_auth_external_login="${REPOSITORY_SERVICE_HOME_AUTH_EXTERNAL_LOGIN:-$my_path_external/shibboleth}" - -my_home_auth_external_logout="${REPOSITORY_SERVICE_HOME_AUTH_EXTERNAL_LOGOUT:-/Shibboleth.sso/Logout}" -my_home_auth_external_logout_destroy_session="${REPOSITORY_SERVICE_HOME_AUTH_EXTERNAL_LOGOUT_DESTROY_SESSION:-"false"}" -my_home_auth_external_logout_redirect="${REPOSITORY_SERVICE_HOME_AUTH_EXTERNAL_LOGOUT_REDIRECT:-"false"}" -my_home_auth_external_logout_redirect_url="${REPOSITORY_SERVICE_HOME_AUTH_EXTERNAL_LOGOUT_REDIRECT_URL:-$my_base_external}" - +my_home_auth_external_logout="${REPOSITORY_SERVICE_HOME_AUTH_EXTERNAL_LOGOUT:-}" my_home_auth_external_login_providers_url="${REPOSITORY_SERVICE_HOME_AUTH_EXTERNAL_LOGIN_PROVIDERS_URL:-}" my_home_auth_external_login_provider_target_url="${REPOSITORY_SERVICE_HOME_AUTH_EXTERNAL_LOGIN_PROVIDER_TARGET_URL:-}" my_home_provider="${REPOSITORY_SERVICE_HOME_PROVIDER:-}" @@ -458,25 +453,19 @@ xmlstarlet ed -L \ -s '/config/values' -t elem -n 'loginProviderTargetUrl' -v '' \ -d '/config/values/loginProviderTargetUrl[position() != 1]' \ -u '/config/values/loginProviderTargetUrl' -v "${my_home_auth_external_login_provider_target_url}" \ - -s '/config/values' -t elem -n 'logout' -v '' \ - -d '/config/values/logout[position() != 1]' \ - -s '/config/values/logout' -t elem -n 'url' -v '' \ - -d '/config/values/logout/url[position() != 1]' \ - -u '/config/values/logout/url' -v "${my_home_auth_external_logout}" \ - -s '/config/values/logout' -t elem -n 'destroySession' -v '' \ - -d '/config/values/logout/destroySession[position() != 1]' \ - -u '/config/values/logout/destroySession' -v "${my_home_auth_external_logout_destroy_session}" \ ${eduCConf} - if [[ "${my_home_auth_external_logout_redirect}" == "true" ]] ; then - xmlstarlet ed -L \ - -s '/config/values/logout' -t elem -n 'ajax' -v '' \ - -d '/config/values/logout/ajax[position() != 1]' \ - -u '/config/values/logout/ajax' -v 'true' \ - -s '/config/values/logout' -t elem -n 'next' -v '' \ - -d '/config/values/logout/next[position() != 1]' \ - -u '/config/values/logout/next' -v "${my_home_auth_external_logout_redirect_url}" \ - ${eduCConf} + if [[ -n "${my_home_auth_external_logout}" ]] ; then + xmlstarlet ed -L \ + -s '/config/values' -t elem -n 'logout' -v '' \ + -d '/config/values/logout[position() != 1]' \ + -s '/config/values/logout' -t elem -n 'url' -v '' \ + -d '/config/values/logout/url[position() != 1]' \ + -u '/config/values/logout/url' -v "${my_home_auth_external_logout}" \ + -s '/config/values/logout' -t elem -n 'destroySession' -v '' \ + -d '/config/values/logout/destroySession[position() != 1]' \ + -u '/config/values/logout/destroySession' -v 'false' \ + ${eduCConf} fi else sed -i -r 's|