29,147 questions
0
votes
1
answer
39
views
Customizing Mfa in spring security 7
Is there a way i can customize mfa so that if a user logs in with an oidc provider like google or facebook they can simply access my app but if a user wants to log in using a username password ...
0
votes
0
answers
76
views
Spring Boot 4 with Kotlin - Jackson deserialization problems
I'm working on a Spring Boot 4.0 API server using Kotlin and JWT authorization. So far I only GET methods are working fine, but POST methods are giving a 403 error. After some debugging I've ...
-3
votes
0
answers
62
views
How to customize and create Spring Security JDBC custom tables [closed]
I am working on an auth service and using Spring Boot 4, Spring Security 7 and using a PostgreSQL database to authenticate users using my auth service.
One problem I'm running into is that JDBC ...
-1
votes
0
answers
80
views
Spring Security intercepts controller exceptions and always returns 401 instead of actual error response
I am a beginner learning Spring Security. I have implemented JWT authentication along with a custom AuthenticationEntryPoint and AccessDeniedHandler.
When Spring Security is not enabled, any exception ...
-3
votes
0
answers
46
views
Spring Boot REST API returning 404 even though controller mapping exists [closed]
I am building a Smart Parking application using Spring Boot.
I have defined a REST controller with @RestController and @RequestMapping, but when I hit the API endpoint, I get a 404 Not Found error.
...
Advice
0
votes
2
replies
55
views
How to validate multiple Bearer tokens using Spring Security
I'm working on a Spring Boot (3.5.x) web application using Spring Security and OAuth2 Resource Server. I need to support two types of Bearer tokens for authentication:
Standard Bearer JWT: Sent in ...
-3
votes
0
answers
37
views
constructor DaoAuthenticationProvider in class org.springframework.security.authentication.dao.DaoAuthenticationProvider cannot be applied to given [closed]
@Bean
public DaoAuthenticationProvider authenticationProvider(UserDetailsService userDetailsService, PasswordEncoder passwordEncoder) {
DaoAuthenticationProvider authProvider = new ...
0
votes
0
answers
72
views
Why /error endpoint called before each successful API call with HTTP Basic authentication [closed]
I have got a legacy Spring Boot 3.2 application with Spring Security 6.2 and I need to do some updates. It is a stateless API service with HTTP Basic authentication and the following config:
@...
0
votes
1
answer
60
views
Webflux onAthenticationFailure isn't triggering in API
I have a Webflux API that will send customized to end points when user provide wrong credentials. Accordingly I have coded a customized a serverAuthenticationFailureHandler below.
import com....
1
vote
1
answer
64
views
Public endpoints still require authentication in BFF → Gateway → Resource Server (Spring Security, OAuth2)
I have a Spring Boot microservices architecture with BFF Service, API Gateway, and multiple backend services (Product, Order, etc.).
Authentication is handled with Keycloak (OAuth2 / JWT).
Request ...
-2
votes
0
answers
50
views
Unable to open React link from email when JWT token is missing [closed]
I send an email containing a link to a protected page, for example:
http://localhost:8080/application/main/page
If the user is already logged in, the page opens correctly.
If the user is NOT logged ...
2
votes
1
answer
93
views
how to set springsecurity config?
I use spring boot 4.0.0 & spring security & jsp for web
my security config is
@Bean
SecurityFilterChain securityFilterChain(HttpSecurity http) throws Exception {
log.info("...
0
votes
2
answers
247
views
WebMvcTest security unit tests no longer working with Spring Boot 4
I have a (jwt) security enabled application and have written unit tests to verify the security filtering works as expected. With Spring Boot 3 these unit tests work fine, however, after upgrading to ...
-1
votes
0
answers
52
views
Authentication manager authenticates the post request but jsession is not authenticating futher requests [duplicate]
@GetMapping("/find")
public List<User> getUsers(){
return service.getUsers();
}
@PostMapping("/loging")
public ResponseEntity<String> Authenticate(@RequestBody ...
1
vote
1
answer
100
views
Spring Boot OAuth2 Client with Keycloak in Docker redirects browser to internal hostname [duplicate]
I am running Keycloak and all my Spring Boot microservices (including a BFF) inside Docker.
The BFF service (port: 8989) is configured as an OAuth2 client (confidential client) using Authorization ...