Skip to content

Commit b6fccb7

Browse files
goekayfaculoyarte
authored andcommitted
disable CSRF for SOAP endpoints
1 parent bbc3868 commit b6fccb7

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/main/java/de/rwth/idsg/steve/config/SecurityConfiguration.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,10 @@ public SecurityFilterChain securityFilterChain(HttpSecurity http) throws Excepti
104104
).permitAll()
105105
.requestMatchers(prefix + "/**").hasRole("ADMIN")
106106
)
107+
// SOAP stations are making POST calls for communication. even though the following path is permitted for
108+
// all access, there is a global default behaviour from spring security: enable CSRF for all POSTs.
109+
// we need to disable CSRF for SOAP paths explicitly.
110+
.csrf(c -> c.ignoringRequestMatchers(CONFIG.getCxfMapping() + "/**"))
107111
.sessionManagement(
108112
req -> req.invalidSessionUrl(prefix + "/signin")
109113
)

0 commit comments

Comments
 (0)