Questions tagged [spring-boot-security]

49 questions
1
vote
3 answers

Upgrading Spring Security from Spring boot 2.6.6 to Spring Boot 3.1.2

I am migrating a Spring Boot application from Spring boot 2.6.6 to 3.1.2 in which most of the methods in http security are either deprecated or removed. I googled a lot of places but I am unable to convert this specific configuration into Spring…
1
vote
1 answer

Spring-Boot Security use Roles

I have recently looked into Spring-Boot and wanted to make a registration and login form for my application. I have watched a video and build my application around, what he said in the video. The authentication works and a jwt token is generated.…
Max
  • 11
  • 3
1
vote
1 answer

Spring Boot security filter chain

how to convert this method in the security configuration to the newest spring boot security version (there are many deprecated methods): @Bean public SecurityFilterChain filterChain(HttpSecurity http) throws Exception { …
1
vote
0 answers

Here is challange. Spring boot JWT token. Handling exception

I have API for blogging application. Working fine When i send request for login it give me token like…
0
votes
0 answers

Error 403 when testing api rest with role based authentication

I made a simple api rest application with role based authentication. When I text the endpoints in postman or swagger if I put role restrictions I get the 403 error even if I log in with the user that has the appropriate role. Class…
epa
  • 1
  • 1
0
votes
1 answer

Keycloak Springboot/Vaadin SSO integration and Ui.navigate problem

I integrated https://vaadin.com/docs/latest/tools/sso/integrations/keycloak Keycloak SSO Kit and it works pretty well. What I now want to achieve is, that some pages were secured and some not. For that I add @PermitAll to those which I want to…
0
votes
1 answer

Force login just for dialog component

I configured and tested security feature in general for views according description in vaadin documentation: https://vaadin.com/docs/latest/security/enabling-security I use org.springframework.boot
0
votes
0 answers

Spring Security 401 unauthorized error even when permitAll() is given

@Bean public SecurityFilterChain filterChain(HttpSecurity http) throws Exception{ return http .csrf(csrf -> csrf.disable()) .authorizeHttpRequests(auth -> { auth.requestMatchers("/auth/**").permitAll(); …
0
votes
2 answers

Spring Boot Security: Deprecated commands

this is my code and in order to avoid WebSecurityConfigurerAdapter I used SecuirtyFilterChain and UserDetailsService. Now I'm getting an error for the User.Builder() that can not be defined "The method builder() is undefined for the type User". I…
0
votes
0 answers

Configuring Keycloak 21.1.1 admin client with springboot 3 kotlin

Trying to setup a keycloak admin client in spring boot 3 to manage Keycloak users, clients, roles and realms. Most guides that are available are for version 18.0.0 and bellow but I am using version 21.1.1 because of compatibility with spring…
0
votes
1 answer

Spring Security Configuration update for Springboot Version 3.x

I am updating from Springboot 2.7.x to 3.1.x version and noticed that there is a change to the Security configuration. I followed the steps provided in the Spring Security and facing issue converting below configuration to the latest that is…
0
votes
0 answers

How resolve 401 Unauthorized with EnableWebFluxSecurity

My code: @Configuration @EnableWebFluxSecurity @EnableHotmartSecurity @EnableReactiveMethodSecurity(useAuthorizationManager = true) class HttpSecurityConfig { @Bean fun springSecurityFilterChain(http: ServerHttpSecurity ):…
0
votes
1 answer

Spring Boot APPLICATION FAILED TO START due to required a bean of type AuthenticationManager

I am working in a spring web application with JWT. Spring Boot: 3.1.0 Java: 17 Database: mysql I can able to build successfully. When I try to run, then getting an error Field authenticationManager in com.myapp.controller.LoginController required a…
Pamba
  • 776
  • 1
  • 16
  • 29
0
votes
0 answers

Need clarity on Spring Security and Spring boot security

Basically, Spring boot uses Spring security feature , I understood. When i search for spring boot security, i could find 2 configre methods(1 for username auth and 1 for Allowing the authorization) @Autowired --> Configuring Authentication using…
0
votes
1 answer

Upgrading Spring-Security to latest(6.1.0)

I am trying to upgrade my old code(2 years old) to a newer project that is currently holding the latest version(Spring boot security V6.1.0) due to a serious vulnerability in its artifacts. I'm trying to keep the same structure, but I am facing some…
Itzik.B
  • 1,023
  • 2
  • 15
  • 35
1
2 3 4