diff --git a/pom.xml b/pom.xml index a83bb0f2..fd53914e 100644 --- a/pom.xml +++ b/pom.xml @@ -30,7 +30,7 @@ 4.2.16.Final 7.1.0 7.0.8 - 42.7.11 + 42.7.12 10.9.1 security @@ -73,6 +73,11 @@ org.apache.tomcat.embed tomcat-embed-el + + tools.jackson.core + jackson-databind + 3.1.5 + diff --git a/src/test/java/com/decathlon/idp_core/TestSecurityConfiguration.java b/src/test/java/com/decathlon/idp_core/TestSecurityConfiguration.java deleted file mode 100644 index 39831934..00000000 --- a/src/test/java/com/decathlon/idp_core/TestSecurityConfiguration.java +++ /dev/null @@ -1,35 +0,0 @@ -package com.decathlon.idp_core; - -import org.springframework.boot.test.context.TestConfiguration; -import org.springframework.context.annotation.Bean; -import org.springframework.context.annotation.Profile; -import org.springframework.security.config.annotation.web.builders.HttpSecurity; -import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity; -import org.springframework.security.web.SecurityFilterChain; - -/// Test security configuration that disables authentication for integration tests. -/// -/// **Why this exists:** Integration tests need to bypass security mechanisms -/// to focus on business logic testing rather than authentication flows. -/// This configuration ensures all requests are permitted without authentication. -@TestConfiguration -@EnableWebSecurity -@Profile({"test"}) -public class TestSecurityConfiguration { - /// Configures a permissive security filter chain for testing. - /// - /// **Security settings:** - /// - CSRF protection disabled (not needed for API tests) - /// - All requests permitted without authentication - /// - /// **Why permissive security:** Test scenarios focus on business logic - /// validation - /// rather than security enforcement, requiring unrestricted access. - @Bean - public SecurityFilterChain securityFilterChainTest(HttpSecurity http) throws Exception { - - http.csrf(csrf -> csrf.disable()) - .authorizeHttpRequests(authz -> authz.anyRequest().permitAll()); - return http.build(); - } -}