Category "spring-security"

Can't use WebSecurityConfigurerAdapter in a custom spring boot starter

I'm trying to create my own spring boot starter for my custom security configuration (LDAP + JWT) via defining configuration class which extends from WebSecurit

Spring Boot Azure Multiple HttpSecurity

Is it possible to mix two authentication modes? Internal user: Azure ad External user: form authentication So far I have this: @EnableWebSecurity @EnableGlobalM

Keycloak Adapter requires SSL error in AKS

I deployed my spring mvc aplication with tomcat docker image as server in Aks and ingress controller is used for redirection. My application is secured with K

Sessionless form login for Spring OAuth2 authorization server?

I would like to avoid leaving a login session open after an OAuth2 authorization code (spring-authorization-server) has been issued. Currently the flow looks li

Getting 401 Unauthorized Even when the user is authenticated (Spring Security)

I am working on a simple project with 2 defined roles Admin and User,The admin role has authority to view users by thier usernames but when I login as an admin

How to update the password in Spring SecurityContext?

Using Spring Boot 2.6.4. Here is my SecurityConfig class: @Configuration public class SecurityConfig extends WebSecurityConfigurerAdapter { @Autowired Secur

Spring boot WebSecurityConfigurerAdapter basic authentication user password validation issue

I'm writing a simple REST API using Spring Boot and I want to enable basic authentication. Therefore I have used the WebSecurityConfigurerAdapter as shown below

Keycloak and spring security usage

I have used spring security in the past and understand that most of the features of keycloak can be achieved by using spring security ( ldap integration etc ).

spring security authorization error 401 unauthorized

I'm new to spring security and I am trying to create a web application with Jwt Token the problem is that i cant authenticate it always give me 401 error with i

I can't update my webapp to Spring Boot 2.6.0 (2.5.7 works but 2.6.0 doesn't)

As mentioned in the title I can't update my webapp to Spring Boot 2.6.0. I wrote my webapp using Spring Boot 2.5.5 and everything works perfectly. If I update t

Spring Boot Resource Server & Keycloak scope vs. role

is there anybody out there who is using Spring Boot Resource Server & Keycloak? I configured my application.properties withspring.security.oauth2.resourcese

How to get an object of current user in Spring Boot+JPA

I need to create shopping cart. I have a model CartItem: @Entity @Table(name = "cart_items") public class CartItem { @Id @GeneratedValue(strategy = Generation

Why validation not work for encoded password

In my project i add some validation for Signup form fields. While click on submit button password validation not check orignal password like @AAAzzz123 but it c

Unable to resolve the OpenID Configuration with the provided Issuer (JHipster with KeyCloak)

I started keycloak by docker-compose -f src/main/docker/keycloak.yml up -d and then gradlew in my project exception occurred as Exception encountered during con

How do you disable the auto generated pages /login and /logout using Spring SAML2?

I am using Spring Boot - 2.6.6 and Spring Security - 5.7.0-M2 with the spring-security-saml2-service-provider library to create a SAML service provider applicat

How to add bearer token for prometheus job

I have started working on the Prometheus for my microservices. I was able to achieve it initially. Now, it's time to push the actuator endpoint under the spring

Unable to logout using spring security OidcClientInitiatedLogoutSuccessHandler from ADFS server

When I do logout, It should redirect to end_session_endpoint of ADFS which is "https://fed04.fcagroup.com/adfs/oauth2/logout" however its redirecting back to ho

hasAnyRole() not working with Spring Security 5.4.6

I have changed my spring framework version from 4.1.4.RELEASE to 5.3.6 and spring security version from 3.2.5.RELEASE to 5.4.6. I'm facing problem when using &l

How to log-out Spring Security in Vaadin?

Is there a practical working example of how to programmatically log out from Spring Security? I tried many ways, and no one works; the session ID stays valid in

Custom security expression root not working on docker

I have problem with working with custom spring security expressions in Docker. I have functionality for using custom expressions in @PreAuthorize functions. @