Camunda in SSO platform

Hello All ,

I am new to the camunda platform . We have a simple bpmn process intergated with spring boot and deployed in SSO platform. Below are the dependencies used . Below are my 1 queries

camunda spring boot version : 3.3.3
camunda-engine-plugin-connect : 7.11.0
camunda-connect core+http: 1.2.1

  1. I want to remove the login page of the camunda , instead it must use the userdetails retrived from the SSO platform and login automatically --> is there any easy way to acheive the same
  2. We have used some piece of codes to achieve point 1 , but when we tried to access the camunda tasklist page it fails with the error message as below

post reading few of the earlier posts : i have hosted it under /camunda and it doesnot work

Code:

@Bean
    public FilterRegistrationBean<AutoLoginAuthenticationFilter> webAppFilterRegistrationBean() {
        FilterRegistrationBean<AutoLoginAuthenticationFilter> registrationBean = new FilterRegistrationBean<>();
        AutoLoginAuthenticationFilter customFilter = new AutoLoginAuthenticationFilter();
        registrationBean.setFilter(customFilter);
        registrationBean.addUrlPatterns("/app/*","/api/*");
        registrationBean.setOrder(2); //set precedence
        return registrationBean;
    }

public class AutoLoginAuthenticationFilter implements Filter {



    public void doFilter(final ServletRequest request, final ServletResponse response, final FilterChain chain)
            throws IOException, ServletException {
        final HttpServletRequest req = (HttpServletRequest) request;
		
        // get authentication from session {which is already SSO authenticated }
        Authentications authentications = Authentications.getFromSession(req.getSession());

        // need some help here to disable the authentication and login with the above session details which has username and roles of the user
       

        
    }

Exception:
2020-07-31 17:37:52.990 ERROR 1 — [nio-8080-exec-4] o.a.c.c.C.[.[.[.[Engine Api] : Servlet.service() for servlet [Engine Api] in context with path [/camunda] threw exception

java.lang.IllegalStateException: Cannot create a session after the response has been committed
at org.apache.catalina.connector.Request.doGetSession(Request.java:3007) ~[tomcat-embed-core-9.0.21.jar:9.0.21]
at org.apache.catalina.connector.Request.getSession(Request.java:2442) ~[tomcat-embed-core-9.0.21.jar:9.0.21]
at org.apache.catalina.connector.RequestFacade.getSession(RequestFacade.java:908) ~[tomcat-embed-core-9.0.21.jar:9.0.21]
at org.apache.catalina.connector.RequestFacade.getSession(RequestFacade.java:920) ~[tomcat-embed-core-9.0.21.jar:9.0.21]
at javax.servlet.http.HttpServletRequestWrapper.getSession(HttpServletRequestWrapper.java:250) ~[tomcat-embed-core-9.0.21.jar:9.0.21]
at javax.servlet.http.HttpServletRequestWrapper.getSession(HttpServletRequestWrapper.java:250) ~[tomcat-embed-core-9.0.21.jar:9.0.21]
at javax.servlet.http.HttpServletRequestWrapper.getSession(HttpServletRequestWrapper.java:250) ~[tomcat-embed-core-9.0.21.jar:9.0.21]
at javax.servlet.http.HttpServletRequestWrapper.getSession(HttpServletRequestWrapper.java:250) ~[tomcat-embed-core-9.0.21.jar:9.0.21