Category "spring-security"

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. @

Derive tenant id for signed in user in OAuth2 based multi-tenant Spring Boot application using Spring Security

I am working on a Spring Boot B2B application, where I would like to onboard a considerable number of tenants. Each of the tenants has its own authentication pr

Spring Boot Oauth2 autoconfigure cycle after upgrade

I'm upgrading my application from Spring Boot 2.5.4 to 2.6.1 and having depency issues: **Description: The dependencies of some of the beans in the application

No qualifying bean of type 'javax.sql.DataSource' available

I am using spring mvc version 5. I am struggling in an autowire problem. I am following a spring security JDBC tutorial. Here is the AppConfiguration.class:

No qualifying bean of type 'javax.sql.DataSource' available

I am using spring mvc version 5. I am struggling in an autowire problem. I am following a spring security JDBC tutorial. Here is the AppConfiguration.class:

How to enable spring security kotlin DSL?

How can we enable support for the spring security kotlin DSL? As you can see from the Screenshot of the IDE (IntelliJ), the DSL is not available: This is the f

The dependencies in the application context form a cycle

The dependencies of some of the beans in the application context form a cycle: authController defined in file [...\AuthController.class] ↓ user

Check user role in Thymeleaf using Webflux security

I have a Spring Security 5 Reactive Applications using the "@EnableWebFluxSecurity" annotation.For my frontend I am using Thymeleaf.Now I have the problem that

Is it possible to require authentication on certain path, but not when certain request param is provided?

Controller: @GetMapping(path = "/new") public String method(@RequestParam(required = false) final String hash) { ... } Get request on /new without prov

Can i use two different tables for login in my spring boot application by spring security?

In my current project I have two separate entities. User :- TO authenticate users Customer :- To authenticate customers I'm confuse How will we manage log

How to configure Spring-Security AntPathRequestMatcher to case insensitive in XML configuration

We recently upgraded Spring-Security from 3.X to 5.6. Most of the issues we could iron out however one thing proves difficult. The problem was caused by a chang

InResponseToField error after Spring Session upgrade

We are not able to upgrade from Spring session 1.3.3 to 2.1.2 due to problems with Spring Security SAML. It seems that Spring Security SAML cannot verify the In

Spring Boot : CORS Issue

I am using Spring Boot version 2.0.2Release. Below is my security configuration @Configuration @EnableWebSecurity @EnableGlobalMethodSecurity( prePostE

Kafka authentication with Jaas config

I have set up my Kafka jaas config as an external bean in my spring boot application to read my configuration from my application.yaml file. But I am facing an

Getting error: 'Access-Control-Allow-Origin' header contains multiple values '*, *', but only one is allowed

I tried to make a connection between my Angular frontend and a REST Endpoint in Java / Spring (which I didn't developed and don't know so well). By GET, all wor

Authenticate certain endpoints with custom Filter | Spring Security [duplicate]

1. Overview First things first - I am pretty new to Spring Security so if you see something trivial, please keep that in mind 🤓 I am t

Spring Security Rejects Fetch OPTIONS Preflight Outright If content-type = 'application/json'

If a Fetch POST to a Spring Security (v 5.6.1) enabled service endpoint sends this header: headers.append("Content-Type", "application/json"); the OPTIONS pref

Sping security OpenSAML 4.1.1 artifacts not found

I have a maven multi module project where I'm using spring boot 2.6.4 and spring security in a saml2 scenario. As far as I know spring uses opensaml and more ex