SimpleAuthFilter for SSO gives Error "Internal error when authenticating user java.lang.ClassCastException"

I'm trying to implemnt SimpleAuthFilter – basic filter that has built-in login form, provided by spotifre.

i have followed the steps and i put the jar file in \WEB-INF\lib, and after restarting the spotfire 7.7.0 and when trying to login, it redirect me to the new login form provided by the SimpleAuthFilter jar file, after enting the correct user name and passoword that also defined the user.db under \WEB-INF\, it does not log on and redirects to error page, and when looking the server.log file of the spotfire server, i found below error:

Can you please help?

 

server.security.SecurityFilter: Internal error when authenticating user
java.lang.ClassCastException: com.spotfire.example.SimpleAuthFilter$WrappedHttpServletRequest cannot be cast to com.spotfire.server.security.RequestWrapper
    at com.spotfire.server.security.ExternalAuthenticator.authenticateUsingAuthFilter(ExternalAuthenticator.java:242)
    at com.spotfire.server.security.ExternalAuthenticator.authenticate(ExternalAuthenticator.java:191)
    at com.spotfire.server.security.ExternalAuthenticator.authenticate(ExternalAuthenticator.java:184)
    at com.spotfire.server.security.AuthenticationManager.doAuthenticate(AuthenticationManager.java:265)
    at com.spotfire.server.security.AuthenticationManager.authenticateNonAnonymously(AuthenticationManager.java:227)
    at com.spotfire.server.security.AuthenticationManager.authenticateFrontend(AuthenticationManager.java:133)
    at com.spotfire.server.security.AuthenticationManager.authenticate(AuthenticationManager.java:115)
    at com.spotfire.server.security.SecurityFilter.attemptAuthentication(SecurityFilter.java:540)
    at com.spotfire.server.security.SecurityFilter.processRequest(SecurityFilter.java:243)
    at com.spotfire.server.security.SecurityFilter.doFilter(SecurityFilter.java:179)
    at com.spotfire.server.security.AbstractFilter.doFilter(AbstractFilter.java:123)
    at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:344)
    at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:261)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
    at com.spotfire.example.SimpleAuthFilter.doFilter(SimpleAuthFilter.java:197)
    at com.spotfire.example.SimpleAuthFilter.doFilter(SimpleAuthFilter.java:159)
    at com.spotfire.server.security.CustomAuthFilterWrapper.doFilter(CustomAuthFilterWrapper.java:73)
    at com.spotfire.server.security.AbstractFilter.doFilter(AbstractFilter.java:123)
    at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:344)
    at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:261)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
    at com.spotfire.server.security.CsrfFilter.doFilter(CsrfFilter.java:79)
    at com.spotfire.server.security.AbstractFilter.doFilter(AbstractFilter.java:123)
    at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:344)
    at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:261)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
    at com.spotfire.server.security.HttpMethodsFilter.doFilter(HttpMethodsFilter.java:179)
    at com.spotfire.server.security.AbstractFilter.doFilter(AbstractFilter.java:123)
    at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:344)
    at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:261)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
    at com.spotfire.server.security.headers.HeadersFilter.doFilter(HeadersFilter.java:192)
    at com.spotfire.server.security.AbstractFilter.doFilter(AbstractFilter.java:123)
    at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:344)
    at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:261)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
    at com.spotfire.server.security.AccessLogFilter.doFilter(AccessLogFilter.java:76)
    at com.spotfire.server.security.AbstractFilter.doFilter(AbstractFilter.java:123)
    at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:344)
    at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:261)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
    at com.spotfire.server.security.RequestContextFilter.doFilter(RequestContextFilter.java:112)
    at com.spotfire.server.security.RequestContextFilter.doFilter(RequestContextFilter.java:79)
    at com.spotfire.server.security.AbstractFilter.doFilter(AbstractFilter.java:123)
    at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:344)
    at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:261)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:212)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:106)
    at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:502)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:141)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:528)
    at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1100)
    at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:687)
    at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1520)
    at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1476)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
    at java.lang.Thread.run(Thread.java:745)

Attachments

AttachmentSize
Plain text icon error_of_requestwrapper.txt6.61 KB

(1) Answer

Login