More issues

why @WithMockUser still got 401 unauthorized

@AutoConfigureMockMvc for none reactive spring application, the Servlet API and Servlet containers, spring-boot-starter-web, please use MockMvc. import org.springframework.boot.test.autoconfigure.web.servlet.AutoConfigureMockMvc; @DirtiesContext(classMode = ClassMode.AFTER_EACH_TEST_METHOD) @AutoConfigureMockMvc @SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT) public class IntegrationTestsBase { @Autowired protected MockMvc mockMvc; ... mockMvc.perform(
1 min read

Bypassing Client Authentication for Specific Endpoints in Spring Boot with mTLS(2 way SSL) enabled

In Spring Boot applications secured with SSL, enabling client authentication (configured as server.ssl.client-auth: need) typically requires that all incoming requests provide a valid client certificate. However, there are scenarios where certain endpoints require bypassing this client authentication while maintaining SSL security. For instance, consider a SOAP service where
5 min read

Subscribe to Post, Code and Quiet Time.

Don’t miss out on the latest issues. Sign up now to get access to the library of members-only issues.
jamie@example.com
Subscribe