generated from it-at-m/oss-repository-en-template
-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* implementing secure cockpit * implement secure cockpit via gateway * #402: add camunda plugin filter rule * integration of groups * fixed review comments * deactivating CSRF filter of Camunda Webapps --------- Co-authored-by: stephan.strehler <[email protected]>
- Loading branch information
1 parent
fcc59ce
commit bfb4e6c
Showing
3 changed files
with
27 additions
and
2 deletions.
There are no files selected for viewing
26 changes: 26 additions & 0 deletions
26
...main/java/de/muenchen/oss/digiwf/cockpit/security/camunda/CsrfDisablingConfiguration.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
package de.muenchen.oss.digiwf.cockpit.security.camunda; | ||
|
||
import org.springframework.boot.web.servlet.ServletContextInitializer; | ||
import org.springframework.context.annotation.Bean; | ||
import org.springframework.context.annotation.Configuration; | ||
|
||
/** | ||
* Disable CSRF Camunda Filter. | ||
* | ||
* <a href="https://forum.camunda.io/t/how-to-disable-csrfpreventionfilter/13095/8">Camunda Forum</a> | ||
*/ | ||
@Configuration | ||
public class CsrfDisablingConfiguration { | ||
private static final String CSRF_PREVENTION_FILTER = "CsrfPreventionFilter"; | ||
|
||
/** | ||
* Overwrite csrf filter from Camunda configured here | ||
* org.camunda.bpm.spring.boot.starter.webapp.CamundaBpmWebappInitializer | ||
* org.camunda.bpm.spring.boot.starter.webapp.filter.SpringBootCsrfPreventionFilter | ||
* Is configured with basically a 'no-op' filter | ||
*/ | ||
@Bean | ||
public ServletContextInitializer csrfOverwrite() { | ||
return servletContext -> servletContext.addFilter(CSRF_PREVENTION_FILTER, (request, response, chain) -> chain.doFilter(request, response)); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters