Я не могу заставить CAS перенаправить на мой URL обратного вызова для выхода из SP после успешного HttpRedirect SLO в CAS-Idp.
Некоторые из соответствующих свойств в моем cas.properties
файле - -
cas.logout.followServiceRedirects=true
cas.logout.redirectParameter=service
cas.logout.confirmLogout=false
cas.slo.disabled=false
cas.slo.asynchronous=true
Я определил следующее в моем idp-metadata.xml
-
<SingleLogoutService Binding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect" Location="https://cas-server:8443/cas/idp/profile/SAML2/Redirect/SLO"/>
Я вызываю эту конечную точку перенаправления HTTP в GET из моего кода SP для сценария выхода из системы.
Я использую шаблон cas-overlay для версии 5.1
Вот трассировка стека для сервера cas:
2020-04-26 12:28:06,768 DEBUG [org.springframework.web.servlet.DispatcherServlet] - <DispatcherServlet with name 'dispatcherServlet' processing GET request for [/cas/idp/profile/SAML2/Redirect/SLO]>
2020-04-26 12:28:06,769 DEBUG [org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping] - <Looking up handler method for path /idp/profile/SAML2/Redirect/SLO>
2020-04-26 12:28:06,769 DEBUG [org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping] - <Returning handler method [protected void org.apereo.cas.support.saml.web.idp.profile.slo.SLORedirectProfileHandlerController.handleSaml2ProfileSLOPostRequest(javax.servlet.http.HttpServletResponse,javax.servlet.http.HttpServletRequest) throws java.lang.Exception]>
2020-04-26 12:28:06,769 DEBUG [org.springframework.web.servlet.DispatcherServlet] - <Last-Modified value for [/cas/idp/profile/SAML2/Redirect/SLO] is: -1>
2020-04-26 12:28:06,777 DEBUG [org.springframework.web.servlet.DispatcherServlet] - <Null ModelAndView returned to DispatcherServlet with name 'dispatcherServlet': assuming HandlerAdapter completed request handling>
2020-04-26 12:28:06,777 DEBUG [org.springframework.web.servlet.DispatcherServlet] - <Successfully completed request>
2020-04-26 12:28:06,784 DEBUG [org.springframework.web.servlet.DispatcherServlet] - <DispatcherServlet with name 'dispatcherServlet' processing GET request for [/cas/logout]>
2020-04-26 12:28:06,785 DEBUG [org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping] - <Looking up handler method for path /logout>
2020-04-26 12:28:06,785 DEBUG [org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping] - <Did not find handler method for [/logout]>
2020-04-26 12:28:06,785 DEBUG [org.springframework.web.servlet.DispatcherServlet] - <Last-Modified value for [/cas/logout] is: -1>
2020-04-26 12:28:08,682 DEBUG [org.springframework.web.servlet.DispatcherServlet] - <Null ModelAndView returned to DispatcherServlet with name 'dispatcherServlet': assuming HandlerAdapter completed request handling>
2020-04-26 12:28:08,683 DEBUG [org.springframework.web.servlet.DispatcherServlet] - <Successfully completed request>
2020-04-26 12:28:08,708 DEBUG [org.springframework.web.servlet.DispatcherServlet] - <DispatcherServlet with name 'dispatcherServlet' processing POST request for [/cas/idp/profile/SAML2/Redirect/SLO]>
2020-04-26 12:28:08,708 DEBUG [org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping] - <Looking up handler method for path /idp/profile/SAML2/Redirect/SLO>
2020-04-26 12:28:08,708 DEBUG [org.springframework.web.servlet.mvc.method.annotation.ExceptionHandlerExceptionResolver] - <Resolving exception from handler [null]: org.springframework.web.HttpRequestMethodNotSupportedException: Request method 'POST' not supported>
2020-04-26 12:28:08,708 DEBUG [org.springframework.web.servlet.mvc.annotation.ResponseStatusExceptionResolver] - <Resolving exception from handler [null]: org.springframework.web.HttpRequestMethodNotSupportedException: Request method 'POST' not supported>
2020-04-26 12:28:08,708 DEBUG [org.springframework.web.servlet.mvc.support.DefaultHandlerExceptionResolver] - <Resolving exception from handler [null]: org.springframework.web.HttpRequestMethodNotSupportedException: Request method 'POST' not supported>
2020-04-26 12:28:08,708 WARN [org.springframework.web.servlet.PageNotFound] - <Request method 'POST' not supported>
2020-04-26 12:28:08,709 DEBUG [org.springframework.web.servlet.DispatcherServlet] - <Null ModelAndView returned to DispatcherServlet with name 'dispatcherServlet': assuming HandlerAdapter completed request handling>
2020-04-26 12:28:08,709 DEBUG [org.springframework.web.servlet.DispatcherServlet] - <Successfully completed request>
С включенным уровнем debug для журналов org.springframework.web.servlet
я вижу, что POST вызывается после начального GET и не знает, ожидается ли это, или мне не хватает какого-либо свойства конфигурации и т. д. c.
Пожалуйста помогите мне разобраться с этим.
TIA