File tree Expand file tree Collapse file tree 2 files changed +5
-6
lines changed
src/main/java/com/iexec/core/security Expand file tree Collapse file tree 2 files changed +5
-6
lines changed Original file line number Diff line number Diff line change @@ -14,6 +14,7 @@ All notable changes to this project will be documented in this file.
1414- Improve switch statements after Java 17 migration. (#729 )
1515- Remove redundant blockchain calls to diminish pressure on Ethereum JSON-RPC API. (#734 )
1616- Compute alive workers metrics in ` WorkerService#updateMetrics ` scheduled job. (#739 )
17+ - Fix Spring Security deprecations after Spring Boot 3.3.8 upgrade. (#740 )
1718
1819### Breaking API changes
1920
Original file line number Diff line number Diff line change 2020import org .springframework .context .annotation .Configuration ;
2121import org .springframework .security .config .annotation .method .configuration .EnableMethodSecurity ;
2222import org .springframework .security .config .annotation .web .builders .HttpSecurity ;
23+ import org .springframework .security .config .annotation .web .configurers .AbstractHttpConfigurer ;
2324import org .springframework .security .config .http .SessionCreationPolicy ;
2425import org .springframework .security .web .SecurityFilterChain ;
2526
@@ -30,13 +31,10 @@ public class WebSecurityConfig {
3031 @ Bean
3132 public SecurityFilterChain filterChain (HttpSecurity http ) throws Exception {
3233 // Disable CSRF (cross site request forgery)
33- http .csrf ().disable ();
34-
34+ http .csrf (AbstractHttpConfigurer ::disable );
3535 // No session will be created or used by spring security
36- http .sessionManagement ().sessionCreationPolicy (SessionCreationPolicy .STATELESS );
37-
38- http .authorizeHttpRequests ()
39- .anyRequest ().permitAll ();
36+ http .sessionManagement (sessionMgt -> sessionMgt .sessionCreationPolicy (SessionCreationPolicy .STATELESS ));
37+ http .authorizeHttpRequests (request -> request .anyRequest ().permitAll ());
4038 return http .build ();
4139 }
4240}
You can’t perform that action at this time.
0 commit comments