For certain necessities, I've to implement a
switchable SSO scheme in WebApp side.
Current plan is to add a top-level filter which retrieves SSO ON/OFF config, forwards to 4 SSO filters + 1 SLO filter when SSO's on, or keep on to non-SSO authentication when SSO' off.
if (!isSsoOn){
chain.doFilter(request, response);
}else{
String path = request.getRequestURI().substring(request.getContextPath().length());
request.getRequestDispatcher("/sso" + path).forward(request, response);
}
For this, I need to filter-mapping SSO filters to pattern like ”/sso/*“ and remove this prefix after SSO handling (authentication, ticket-validation, request-wrapper, assertion-thread-localization). Is it secure, or appropriate to do so, considering all those afterwards redirecting between cas-server and cas-client?