Category "spring-security"

Whitelist for redirect URLs in spring boot

We have a security issue in our project. An attacker can intercept a login request and modify a 'Host' header in it. The server would respond with a redirect (3

Spring Boot Custom Authentication Provider with Java Configuration not working

I am trying to setup a REST based web application, where the frontend is using Reactjs and the backend is using Spring Boot. I am also trying to setup a custom

NoSuchMethodError java.lang.reflect.Method org.springframework.util.ClassUtils.getInterfaceMethodIfPossible(java.lang.reflect.Method, java.lang.Class)

I have a project that JSF works for which I wanted to integrate spring security through the following modifications: Add dependencies in pom.xml: (Updated) <

Authentication Manager Builder in Spring Security

I was exploring spring security and tried to build a small application wherein I have a an entity name User and a userRepository having a one declared method fi

What is the purpose of AuthenticationEntryPoint in Spring Web Security?

What is the purpose of AuthenticationEntryPoint in Spring Web Security? The documentation does not provide much details. When should this be used, and does it

Can not resolve symbol "security" in spring boot application

I'm trying to learn Java Spring and doing exactly like here: https://spring.io/guides/gs/securing-web/ But my IDE says "cannot resolve 'security' symbol" while

Deprecated: KeyStoreKeyFactory is Deprecated

Since security.oauth2 is deprecated, what can be used to generate a KeyPair from .jks file instead of KeyStoreKeyFactory?

Spring-mvc + Spring-Security + Thymeleaf - Error Resolving Template

I'm following a simple online tutorial for building a Spring + Spring Security + Thymeleaf + Maven project and I'm getting the following error: [ERROR] [tomcat

Spring Security CAS - After Receiving the ticket unable to land to login screen

After receiving ticket unable to login to home screen, how I can debug the spring security part in my application? How can I debug the entry point of the appli

@PreAuthorize stops propagating exceptions thrown during evaluation of security checks

I have a controller with several endpoints. Every endpoint is mapped to a service which could return 200 or throw an exception, that is then handled and will re

How to set SameSite=None in JSESSIONID Cookie

I have a spring boot API hosted at Heroku and when I try to access it via a Angular app in Google Chrome (In Firefox it works fine) I'm facing the following pro

Bug in Grails / Spring Security when using user groups and roles - can't authenticate

I think I have found a bug in Grails Spring Security 3.1.1, and latest Grails 3.2.6. I have installed the Spring Security plugin. From the command line console

Serving static web resources in Spring Boot & Spring Security application

I am trying to develop Spring Boot web application and securing it using Spring security java configuration. After placing my static web resources in 'src/main

Spring Interceptor is not compatible with @RepositoryRestResource

@Component public class TestInterceptor implements HandlerInterceptor { @Override public void afterCompletion(HttpServletRequest arg0, HttpS

SAML response and assertion is signed/unsigned?

I have deployed and run spring saml sample successfully. From SAML Response (IdP -> SP) shown below, can it be identified whether: the SAML response is sig

Spring Security with Java Configuration: How to handle BadCredentialsException from a custom provider

I need to authenticate some rest services using a token id in the url (or maybe in the request header - but this is not important for now). I am trying to use j

Authentication Principal is empty while using Spring Session Redis

I am building rest API using Spring Boot v1.3.3. API is secured by Spring Security. I have implemented custom user details service to have custom principal in a

Spring security - Disable logout redirect

I'm using spring security with REST, and I'm using the URL (/logout) as an endpoint for my logout method. But after calling this method, it redirect me to (/log

automatically redirect to login page after session timeout - JSP, Spring

I can redirect a user to home page upon session logout.. this was very simple. However, if an user had logged into the app and had the page open, even on sessio

How does SecurityContextHolder.getContext().getAuthentication() work?

SecurityContextHolder.getContext().getAuthentication() obtains the currently authenticated principal, or an authentication request token, but in which context s