camunda / camunda-bpm-spring-boot-starter

Camunda BPM bootified!
Apache License 2.0
328 stars 161 forks source link

Camunda webapp css and js dose not load in my spring boot app #419

Closed azizkhani closed 4 years ago

azizkhani commented 4 years ago
2020-09-25 15:28:09.647 DEBUG 10469 --- [nio-8087-exec-2] o.s.security.web.FilterChainProxy        : /camunda/app/cockpit/styles/styles.css?bust=7.13.0 at position 1 of 13 in additional filter chain; firing Filter: 'WebAsyncManagerIntegrationFilter'
2020-09-25 15:28:09.647 DEBUG 10469 --- [nio-8087-exec-2] o.s.security.web.FilterChainProxy        : /camunda/app/cockpit/styles/styles.css?bust=7.13.0 at position 2 of 13 in additional filter chain; firing Filter: 'SecurityContextPersistenceFilter'
2020-09-25 15:28:09.647 DEBUG 10469 --- [nio-8087-exec-2] w.c.HttpSessionSecurityContextRepository : HttpSession returned null object for SPRING_SECURITY_CONTEXT
2020-09-25 15:28:09.647 DEBUG 10469 --- [nio-8087-exec-2] w.c.HttpSessionSecurityContextRepository : No SecurityContext was available from the HttpSession: org.apache.catalina.session.StandardSessionFacade@5015b2cf. A new one will be created.
2020-09-25 15:28:09.647 DEBUG 10469 --- [nio-8087-exec-2] o.s.security.web.FilterChainProxy        : /camunda/app/cockpit/styles/styles.css?bust=7.13.0 at position 3 of 13 in additional filter chain; firing Filter: 'HeaderWriterFilter'
2020-09-25 15:28:09.647 DEBUG 10469 --- [nio-8087-exec-2] o.s.security.web.FilterChainProxy        : /camunda/app/cockpit/styles/styles.css?bust=7.13.0 at position 4 of 13 in additional filter chain; firing Filter: 'LogoutFilter'
2020-09-25 15:28:09.647 DEBUG 10469 --- [nio-8087-exec-2] o.s.s.web.util.matcher.OrRequestMatcher  : Trying to match using Ant [pattern='/logout', GET]
2020-09-25 15:28:09.647 DEBUG 10469 --- [nio-8087-exec-2] o.s.s.w.u.matcher.AntPathRequestMatcher  : Checking match of request : '/camunda/app/cockpit/styles/styles.css'; against '/logout'
2020-09-25 15:28:09.647 DEBUG 10469 --- [nio-8087-exec-2] o.s.s.web.util.matcher.OrRequestMatcher  : Trying to match using Ant [pattern='/logout', POST]
2020-09-25 15:28:09.647 DEBUG 10469 --- [nio-8087-exec-2] o.s.s.w.u.matcher.AntPathRequestMatcher  : Request 'GET /camunda/app/cockpit/styles/styles.css' doesn't match 'POST /logout'
2020-09-25 15:28:09.647 DEBUG 10469 --- [nio-8087-exec-2] o.s.s.web.util.matcher.OrRequestMatcher  : Trying to match using Ant [pattern='/logout', PUT]
2020-09-25 15:28:09.647 DEBUG 10469 --- [nio-8087-exec-2] o.s.s.w.u.matcher.AntPathRequestMatcher  : Request 'GET /camunda/app/cockpit/styles/styles.css' doesn't match 'PUT /logout'
2020-09-25 15:28:09.647 DEBUG 10469 --- [nio-8087-exec-2] o.s.s.web.util.matcher.OrRequestMatcher  : Trying to match using Ant [pattern='/logout', DELETE]
2020-09-25 15:28:09.647 DEBUG 10469 --- [nio-8087-exec-2] o.s.s.w.u.matcher.AntPathRequestMatcher  : Request 'GET /camunda/app/cockpit/styles/styles.css' doesn't match 'DELETE /logout'
2020-09-25 15:28:09.647 DEBUG 10469 --- [nio-8087-exec-2] o.s.s.web.util.matcher.OrRequestMatcher  : No matches found
2020-09-25 15:28:09.647 DEBUG 10469 --- [nio-8087-exec-2] o.s.security.web.FilterChainProxy        : /camunda/app/cockpit/styles/styles.css?bust=7.13.0 at position 5 of 13 in additional filter chain; firing Filter: 'UsernamePasswordAuthenticationFilter'
2020-09-25 15:28:09.647 DEBUG 10469 --- [nio-8087-exec-2] o.s.s.w.u.matcher.AntPathRequestMatcher  : Request 'GET /camunda/app/cockpit/styles/styles.css' doesn't match 'POST /login'
2020-09-25 15:28:09.648 DEBUG 10469 --- [nio-8087-exec-2] o.s.security.web.FilterChainProxy        : /camunda/app/cockpit/styles/styles.css?bust=7.13.0 at position 6 of 13 in additional filter chain; firing Filter: 'ConcurrentSessionFilter'
2020-09-25 15:28:09.648 DEBUG 10469 --- [nio-8087-exec-2] o.s.security.web.FilterChainProxy        : /camunda/app/cockpit/styles/styles.css?bust=7.13.0 at position 7 of 13 in additional filter chain; firing Filter: 'RequestCacheAwareFilter'
2020-09-25 15:28:09.648 DEBUG 10469 --- [nio-8087-exec-2] o.s.s.w.s.HttpSessionRequestCache        : saved request doesn't match
2020-09-25 15:28:09.648 DEBUG 10469 --- [nio-8087-exec-2] o.s.security.web.FilterChainProxy        : /camunda/app/cockpit/styles/styles.css?bust=7.13.0 at position 8 of 13 in additional filter chain; firing Filter: 'SecurityContextHolderAwareRequestFilter'
2020-09-25 15:28:09.648 DEBUG 10469 --- [nio-8087-exec-2] o.s.security.web.FilterChainProxy        : /camunda/app/cockpit/styles/styles.css?bust=7.13.0 at position 9 of 13 in additional filter chain; firing Filter: 'RememberMeAuthenticationFilter'
2020-09-25 15:28:09.648 DEBUG 10469 --- [nio-8087-exec-2] o.s.security.web.FilterChainProxy        : /camunda/app/cockpit/styles/styles.css?bust=7.13.0 at position 10 of 13 in additional filter chain; firing Filter: 'AnonymousAuthenticationFilter'
2020-09-25 15:28:09.648 DEBUG 10469 --- [nio-8087-exec-2] o.s.s.w.a.AnonymousAuthenticationFilter  : Populated SecurityContextHolder with anonymous token: 'org.springframework.security.authentication.AnonymousAuthenticationToken@493bd1d7: Principal: anonymousUser; Credentials: [PROTECTED]; Authenticated: true; Details: org.springframework.security.web.authentication.WebAuthenticationDetails@0: RemoteIpAddress: 0:0:0:0:0:0:0:1; SessionId: 2D6A6FD1DA92A8FBB795407B171BDC09; Granted Authorities: ROLE_ANONYMOUS'
2020-09-25 15:28:09.648 DEBUG 10469 --- [nio-8087-exec-2] o.s.security.web.FilterChainProxy        : /camunda/app/cockpit/styles/styles.css?bust=7.13.0 at position 11 of 13 in additional filter chain; firing Filter: 'SessionManagementFilter'
2020-09-25 15:28:09.648 DEBUG 10469 --- [nio-8087-exec-2] o.s.security.web.FilterChainProxy        : /camunda/app/cockpit/styles/styles.css?bust=7.13.0 at position 12 of 13 in additional filter chain; firing Filter: 'ExceptionTranslationFilter'
2020-09-25 15:28:09.648 DEBUG 10469 --- [nio-8087-exec-2] o.s.security.web.FilterChainProxy        : /camunda/app/cockpit/styles/styles.css?bust=7.13.0 at position 13 of 13 in additional filter chain; firing Filter: 'FilterSecurityInterceptor'
2020-09-25 15:28:09.648 DEBUG 10469 --- [nio-8087-exec-2] o.s.s.web.util.matcher.OrRequestMatcher  : Trying to match using Ant [pattern='/logout', GET]
2020-09-25 15:28:09.648 DEBUG 10469 --- [nio-8087-exec-2] o.s.s.w.u.matcher.AntPathRequestMatcher  : Checking match of request : '/camunda/app/cockpit/styles/styles.css'; against '/logout'
2020-09-25 15:28:09.648 DEBUG 10469 --- [nio-8087-exec-2] o.s.s.web.util.matcher.OrRequestMatcher  : Trying to match using Ant [pattern='/logout', POST]
2020-09-25 15:28:09.648 DEBUG 10469 --- [nio-8087-exec-2] o.s.s.w.u.matcher.AntPathRequestMatcher  : Request 'GET /camunda/app/cockpit/styles/styles.css' doesn't match 'POST /logout'
2020-09-25 15:28:09.648 DEBUG 10469 --- [nio-8087-exec-2] o.s.s.web.util.matcher.OrRequestMatcher  : Trying to match using Ant [pattern='/logout', PUT]
2020-09-25 15:28:09.648 DEBUG 10469 --- [nio-8087-exec-2] o.s.s.w.u.matcher.AntPathRequestMatcher  : Request 'GET /camunda/app/cockpit/styles/styles.css' doesn't match 'PUT /logout'
2020-09-25 15:28:09.648 DEBUG 10469 --- [nio-8087-exec-2] o.s.s.web.util.matcher.OrRequestMatcher  : Trying to match using Ant [pattern='/logout', DELETE]
2020-09-25 15:28:09.648 DEBUG 10469 --- [nio-8087-exec-2] o.s.s.w.u.matcher.AntPathRequestMatcher  : Request 'GET /camunda/app/cockpit/styles/styles.css' doesn't match 'DELETE /logout'
2020-09-25 15:28:09.648 DEBUG 10469 --- [nio-8087-exec-2] o.s.s.web.util.matcher.OrRequestMatcher  : No matches found
2020-09-25 15:28:09.648 DEBUG 10469 --- [nio-8087-exec-2] o.s.s.w.u.matcher.AntPathRequestMatcher  : Checking match of request : '/camunda/app/cockpit/styles/styles.css'; against '/login'
2020-09-25 15:28:09.648 DEBUG 10469 --- [nio-8087-exec-2] o.s.s.w.u.matcher.AntPathRequestMatcher  : Checking match of request : '/camunda/app/cockpit/styles/styles.css'; against '/rest/security/user/login'
2020-09-25 15:28:09.648 DEBUG 10469 --- [nio-8087-exec-2] o.s.s.w.u.matcher.AntPathRequestMatcher  : Checking match of request : '/camunda/app/cockpit/styles/styles.css'; against '/assets/**'
2020-09-25 15:28:09.648 DEBUG 10469 --- [nio-8087-exec-2] o.s.s.w.u.matcher.AntPathRequestMatcher  : Checking match of request : '/camunda/app/cockpit/styles/styles.css'; against '/rest/**'
2020-09-25 15:28:09.648 DEBUG 10469 --- [nio-8087-exec-2] o.s.s.w.u.matcher.AntPathRequestMatcher  : Checking match of request : '/camunda/app/cockpit/styles/styles.css'; against '/camunda/**'
2020-09-25 15:28:09.649 DEBUG 10469 --- [nio-8087-exec-2] o.s.s.w.a.i.FilterSecurityInterceptor    : Secure object: FilterInvocation: URL: /camunda/app/cockpit/styles/styles.css?bust=7.13.0; Attributes: [permitAll]
2020-09-25 15:28:09.649 DEBUG 10469 --- [nio-8087-exec-2] o.s.s.w.a.i.FilterSecurityInterceptor    : Previously Authenticated: org.springframework.security.authentication.AnonymousAuthenticationToken@493bd1d7: Principal: anonymousUser; Credentials: [PROTECTED]; Authenticated: true; Details: org.springframework.security.web.authentication.WebAuthenticationDetails@0: RemoteIpAddress: 0:0:0:0:0:0:0:1; SessionId: 2D6A6FD1DA92A8FBB795407B171BDC09; Granted Authorities: ROLE_ANONYMOUS
2020-09-25 15:28:09.649 DEBUG 10469 --- [nio-8087-exec-2] o.s.s.access.vote.AffirmativeBased       : Voter: org.springframework.security.web.access.expression.WebExpressionVoter@7c8fafef, returned: 1
2020-09-25 15:28:09.649 DEBUG 10469 --- [nio-8087-exec-2] o.s.s.w.a.i.FilterSecurityInterceptor    : Authorization successful
2020-09-25 15:28:09.649 DEBUG 10469 --- [nio-8087-exec-2] o.s.s.w.a.i.FilterSecurityInterceptor    : RunAsManager did not change Authentication object
2020-09-25 15:28:09.649 DEBUG 10469 --- [nio-8087-exec-2] o.s.security.web.FilterChainProxy        : /camunda/app/cockpit/styles/styles.css?bust=7.13.0 reached end of additional filter chain; proceeding with original chain
2020-09-25 15:28:09.651 DEBUG 10469 --- [nio-8087-exec-2] o.s.s.w.header.writers.HstsHeaderWriter  : Not injecting HSTS header since it did not match the requestMatcher org.springframework.security.web.header.writers.HstsHeaderWriter$SecureRequestMatcher@9b79f2
2020-09-25 15:28:09.651 DEBUG 10469 --- [nio-8087-exec-2] w.c.HttpSessionSecurityContextRepository : SecurityContext is empty or contents are anonymous - context will not be stored in HttpSession.
2020-09-25 15:28:09.651 DEBUG 10469 --- [nio-8087-exec-2] o.s.s.w.a.ExceptionTranslationFilter     : Chain processed normally

I have spring security with this configuration


package org.openprojects.framework.config;

import org.openprojects.framework.security.*;
import org.springframework.context.annotation.Bean;
import org.springframework.http.HttpMethod;
import org.springframework.security.config.annotation.method.configuration.EnableGlobalMethodSecurity;
import org.springframework.security.config.annotation.web.builders.HttpSecurity;
import org.springframework.security.config.annotation.web.builders.WebSecurity;
import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity;
import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter;
import org.springframework.security.core.session.SessionRegistry;
import org.springframework.security.core.session.SessionRegistryImpl;
import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;
import org.springframework.security.web.AuthenticationEntryPoint;
import org.springframework.security.web.access.AccessDeniedHandler;
import org.springframework.security.web.access.intercept.FilterSecurityInterceptor;
import org.springframework.security.web.authentication.switchuser.SwitchUserFilter;

import javax.inject.Inject;

@EnableWebSecurity
@EnableGlobalMethodSecurity(prePostEnabled = true, securedEnabled = true)
public class SecurityConfiguration extends WebSecurityConfigurerAdapter {

    @Inject
    private CustomAuthenticationSuccessHandler customAuthenticationSuccessHandler;

    @Inject
    private AuthenticationFailureHandler authenticationFailureHandler;

    @Inject
    private AuthenticationEntryPoint authenticationEntryPoint;

    @Inject
    private UserDetailService userDetailsService;

    @Bean
    public BCryptPasswordEncoder passwordEncoder() {
        return new BCryptPasswordEncoder();
    }

@Override
    public void configure(WebSecurity web) throws Exception {
        web.ignoring()
                .antMatchers(HttpMethod.OPTIONS, "/**")
                .antMatchers("/camunda/**/**")
                .antMatchers("/app/**/*.{js,html}");
    }

    @Override
    protected void configure(HttpSecurity http) throws Exception {
        // @formatter:off
        http
                .csrf()
                .disable()
                .exceptionHandling()
                .authenticationEntryPoint(authenticationEntryPoint)
                .accessDeniedHandler(accessDeniedHandler())
            .and()
                .formLogin()
                .loginPage("/login")
                .loginProcessingUrl("/login")
                .successHandler(customAuthenticationSuccessHandler)
                .failureHandler(authExceptionHandler())
                .usernameParameter("username")
                .passwordParameter("password")
                .permitAll()
            .and()
                .rememberMe()
            .and()
                .logout()
                .logoutUrl("/logout")
                .logoutSuccessUrl("/")
                .permitAll()
            .and()
                .headers()
                .frameOptions()
                .disable()
            .and()
                .authorizeRequests()
                .antMatchers("/login").permitAll()
                .antMatchers("/rest/security/user/login").permitAll()
                .antMatchers("/assets/**").permitAll()
                .antMatchers("/rest/**").fullyAuthenticated()
                .antMatchers("/camunda/**").permitAll()
                .antMatchers("/switchUser").access("hasAnyRole('ROLE_5', 'ROLE_PREVIOUS_ADMINISTRATOR')")
            .and()
                .sessionManagement()
                .maximumSessions(1);
        // @formatter:on
    }

}
azizkhani commented 4 years ago

image

Sanlisi commented 4 years ago

@azizkhani I am so sorry to disturb you,I want to ask a question,have you ever done camunda conversion to flowable? thank you

yanavasileva commented 4 years ago

Hello @azizkhani,

Please raise questions in our forum: https://forum.camunda.org/ or report bugs in the Issue tracker: https://jira.camunda.com/projects/CAM

Best regards, Yana

azizkhani commented 4 years ago

Hi @yanavasileva nobody answer to questions in forum .I asked some question and still wait for answer😔

yanavasileva commented 4 years ago

Hi @azizkhani, I am sorry to hear that, please make sure to follow the guidelines of the forum: https://forum.camunda.org/faq and provide as much as possible details about your scenario. Please keep in mind that the questions you post there are answered by the members of the community who volunteer their time to share their knowledge. Note that nobody keeps track on the issues here, you need to use one of the two options provided in my previous comment. I saw the opened issue by coincidence.