Questions tagged [spring-session]

Spring Session provides a common infrastructure for managing user’s session information.

Filter by
Sorted by
Tagged with
1 vote
0 answers
18 views

How to disable spring session when store-type removed from ver3.0

I noticed that in order to disable spring session, the configuration property spring.session.store-type can be set to none. However, the property has been removed (ref). Thus, may I know how it can be ...
Tonny Tc's user avatar
  • 872
-1 votes
0 answers
29 views

Spring security configuration for multiple APi's and multiple types of users

So, I am making this portal for bus reservation in which I have multiple modules and APIs but I am facing issues with spring security. So, I have one table for all types of users (admin and regular ...
asskayy's user avatar
  • 15
0 votes
0 answers
28 views

Attempting to serialize the session as a JSON not converting types correctly

Serializing the Session using JSON specifies that I can create the following bean @Bean RedisSerializer<Object> springSessionDefaultRedisSerializer(ObjectMapper objectMapper) { return new ...
Archimedes Trajano's user avatar
0 votes
0 answers
43 views

storing spring boot sessions into hazelcast

I have hazelcast server started on my local computer where I'm trying to store sessions from spring boot application using spring-session-hazelcast:3.1.1 config: @Configuration(proxyBeanMethods = ...
lash's user avatar
  • 1
4 votes
1 answer
166 views

Can Spring Session be turned off in Spring Boot 3?

In my Spring Boot 2.7.4 project, I use Spring Session with Redis by including these dependencies: <dependency> <groupId>org.springframework.boot</groupId> ...
Jon H's user avatar
  • 404
0 votes
0 answers
27 views

Spring boot: how to disable session handler for the embedded server?

Our application does not need any session support but Spring adds session handler and a session id managed to the embedded Jetty server. I tried removing the handler in the server customizer but then ...
Anonymous Person's user avatar
0 votes
0 answers
37 views

Enhancement request: Add Base64 session ID generator. Deprecate UuidSessionIdGenerationStrategy

Spring Security 3.2 includes PR 2286 for Issue 11 to introduce a new feature for overriding session ID generation. This is a good improvement. My concern is UUID is still the default strategy here. I ...
Justin Cranford's user avatar
0 votes
0 answers
50 views

Persist session after browser is closed (Spring Boot edition)

This question has already been asked on SO, yet the answers were primarily using Security. I have the following constellations: I do not use Spring Security I use Spring Session JDBC When I restart ...
qarabala's user avatar
  • 178
0 votes
0 answers
31 views

Websocket session is not being persisted in JDBC session store type

Problem: WebSocker session data are not persisted in precreated session tables (SPRING_SESSION, SPRING_SESSION_ATTRIBUTES) I followed this guide to implement it https://docs.spring.io/spring-session/...
thomn9's user avatar
  • 1
0 votes
0 answers
20 views

spring-boot websocket server maxSessionsPreventsLogin(true) causes clients not able to re-connect after disconnection

I have a very simple stomp websocket server using spring-session backed by Jdbc. The sessions are created in the database and deleted when expiration time is reached. My problem is that the java ...
CT95's user avatar
  • 107
1 vote
0 answers
71 views

Unable to inject SessionRegistry with Spring boot 3.1.1 and Spring Session Redis

I would like to use the removeSessionInformation method on SessionRegistry I've read that with Spring Boot, the SessionRegistry bean should already be configured and ready to use. However, I don't ...
Colin Riddell's user avatar
0 votes
0 answers
72 views

Issue with Spring Boot 3 Spring Session: @EnableRedisIndexedHttpSession annotation sets the default value for Redis namespace

When I tried to use Redis indexing to solve the issue of concurrent control in Spring Security session clustering, I noticed that after adding the @EnableRedisIndexedHttpSession annotation, Spring ...
Blues's user avatar
  • 1
0 votes
0 answers
10 views

Springsecurity AJAX request authorized failed and redirect to login page,

In my project i use AuthorizationManager to authorizating my request with database. @Override public AuthorizationDecision check(Supplier<Authentication> authentication, ...
Alphasion's user avatar
1 vote
0 answers
43 views

Cannot reconnect/clear out timed out sessions in spring boot websocket server backed with Jdbc and Postgres using java websocket client

I have issues in having sessions properly deleted in my stomp websocket server, when clients are closed or after long inactivity. I attempted with and without spring session but could not achieve the ...
CT95's user avatar
  • 107
1 vote
0 answers
41 views

Spring Boot session based authentication post login other requests are not getting autheticated

I am trying to create a spring boot app which will expose a set of apis. Initially there will be a call to an authentication api, which sets a session cookie and then subsequent requests will send ...
Pinaki's user avatar
  • 473
0 votes
0 answers
33 views

org.springframework.data.redis.serializer.SerializationException: Cannot serialize data.redis.serializer.JdkSerializationRedisSerializer.serialize

I am working on a Spring boot project. I need to implement Spring Boot session using Redis db server. It works fine for the Session details. But I need to put some meta-data information into HashMaps ...
vsanandan's user avatar
0 votes
0 answers
165 views

springboot use redis manage session,session.invalidate()delete session,but redis session time become 300s

I use Redis as a session manager, the application.properties is spring.session.timeout=1500 when I add a session, Redis TTL = 1800 @PostMapping("/session/add") public String sessionAdd(...
th000's user avatar
  • 83
0 votes
1 answer
48 views

Integrate spring session into websocket for Http session clean up

I have a Spring Boot websocket server deployed on Heroku and need help to properly implement authentication and session management in order to clean up/invalidate the authenticated sessions when the ...
CT95's user avatar
  • 107
0 votes
0 answers
59 views

How to use Jedis client in Spring Session Redis

How to use Jedis client in Spring Session Redis Is there a way to use Jedis instead of Lettuce in spring session. It seems like spring-session-data uses Lettuce by default. Is there a way to override ...
Hemanth K N's user avatar
0 votes
0 answers
96 views

How to create a Spring Session when using a custom filter?

I'm using Spring Boot 3.1.1. I've created a custom filter which lets users authenticate using a POST request to the path "/login" with a JSON body containing their credentials. I would ...
Adrien H's user avatar
  • 643
1 vote
0 answers
106 views

Spring Security and Spring Session use different cookies

I was using Spring Security with this configuration: @Bean public SecurityFilterChain securityFilterChain(HttpSecurity http) throws Exception { http.csrf().disable().cors().and()....
italktothewind's user avatar
0 votes
0 answers
37 views

Is it possible to share HttpSession via redis between services that use different versions of Spring Security?

I am working on a product that's implemented using the micro-services architecture. Each microservice is deployed as a SpringBoot application. Some of these microservices have SpringSecurity and they ...
ahoxha's user avatar
  • 1,919
0 votes
0 answers
87 views

How to Prevent Session Saving for Anonymous Users or Reduce Its Validity in Spring Session/Spring security

I am currently using Spring Boot 3.1 with Spring Session and Spring Security for my project. The main goal is to prevent saving sessions for anonymous users or at least reduce the duration these ...
pleasebenice's user avatar
0 votes
0 answers
21 views

Spring access some pages via oauth authentication, others via session authentication [duplicate]

I will describe my attempt for a solution here but if you have a better idea on how to seperate Authentication via OAuth and Session/Token based feel free to suggest a completly different solution. So ...
Cowboy_Patrick's user avatar
0 votes
0 answers
111 views

How to make Spring Boot track HTTP session without authentication?

I have a simple Spring Boot app. I have created a session-scoped class and want for it to store some session related stuff. I want for the HTTP session to be created and tracked via the JSESSIONID ...
user435421's user avatar
0 votes
0 answers
68 views

A question about TransactionManager, spring-session-jdbc and seperate datasource

I'm using spring-session-jdbc to store HTTP sessions in a PostgreSQL database. I have another primary DataSource for my application. When using @SpringSessionDataSource, you can define a different ...
liumin's user avatar
  • 98
0 votes
0 answers
56 views

Spring Boot JPA Repository save not committing after implementing Spring Session on MySQL DB

I have a Java 11, Spring Boot 2.7.4 application using Spring MVC and Spring Security to allow users to upload and search for documents in a repository. After the great help I got on SO question ...
Jon H's user avatar
  • 404
0 votes
0 answers
133 views

Spring-Boot with Spring-Session (Redis) and HttpSessionListener - listener is not registered

I have recently switched my app from local http session to Spring-Session. It was pretty straight forward following instructions available on the internet. However, my HttpSessionListener stopped ...
Marcin's user avatar
  • 1
2 votes
0 answers
62 views

Should I configure sessionManagement in HttpSecurity if I use Spring Session?

I am trying to understand how Spring Security and Spring Session projects work together. In my project I want to save sessions into database that's why I am using Spring Session JDBC. But I can't ...
Scroll's user avatar
  • 158
1 vote
0 answers
392 views

How to configure Keycloak 21.0.1 to use redis session store

I'm looking for some guidance on how to configure Keycloak version 21.0.1 to use Redis for session storage. I've searched around and found many answers on this topic, but they all seem to be for ...
 Amine's user avatar
  • 11
0 votes
0 answers
26 views

Adding a new repository type to Spring Session

This question might seem silly, but I'm new to collaborative open source development. I've built a new type of session repository, targetted specifically at Db2 for LUW: https://github.com/...
Jeremy Rickard's user avatar
0 votes
0 answers
78 views

User get cookies owned by others when using SpringSession and redis?

Recently, i wrote a block of codes which make RequestAttributes visible to other threads which caused user get cookies owned by others in staging enviroment. I don't know what exactly happened after ...
Acech's user avatar
  • 1
0 votes
0 answers
428 views

Spring Boot 2 - Configure different spring session store type for different end points

I'm working on a library (based on Spring Boot 2.7) that provides a console (admin console of sorts) with authentication support. This console would be exposed in /console context. So, I have the ...
Dilip Raj Baral's user avatar
1 vote
0 answers
72 views

How to use Basic Auth or JWT in Spring Security to create a session for multi tenancy?

I am not in the context of login authorization, I validate the request using a basic auth header or JWT token. I have an API that validates the authorization using a token that redirects the requests ...
Cristiano Nascimento's user avatar
0 votes
1 answer
302 views

How to handle Redis SecurityContext serialization with two different serialVersionUID

I am two different services (Service A and Service B) that share Redis Session and both services were using Spring-boot 1.5 Service A is the authentication service (SSO) While Service B is the User ...
Darotudeen's user avatar
  • 2,034
2 votes
2 answers
799 views

Does setting spring.session.store-type to 'redis' no longer provide a FindByIndexNameSessionRepository bean?

I wrote a little spring security demo some time ago and I used redis for storing user sessions. I've been trying to upgrade it to Spring Boot 3 and Spring Security 6 but after raising project versions ...
bjaklic's user avatar
  • 49
1 vote
1 answer
1k views

Upgrade spring boot app from 2 to 3, fail to 'Set-Cookie' on auth

I'm attempting to upgrade my angular spring boot 2.x.x app to spring boot 3.x.x. I am seeing my authentication REST call to my user endpoint NOT return the 'Set-Cookie' header after it authenticates ...
Bill Pfeiffer's user avatar
0 votes
1 answer
199 views

How to set the provider for OAuth2ClientAuthenticationToken in Spring Authorization Server

How can I set the provider class for OAuth2ClientAuthenticationToken object. I am working on springboot using spring security 5 and Spring Authorization Server ver 0.3.1 I already make the ...
jetpack's user avatar
  • 179
0 votes
0 answers
380 views

Spring security HttpSessionRequestCache saved request not persisted between requests

I'm building a new authentication filter to use with spring authorization server and have copied the code from FormLoginConfigurer to configure my filter. When I run the code using .formLogin(), the ...
user3677636's user avatar
0 votes
1 answer
186 views

Spring session with Hazelcast is still stored in InMemoryWebSessionStore

I'm developing spring boot application. I want to store my session to Hazelcast. I followed this guide. Since I already have hazelcast standalone, I want to use Hazelcast client instead of the ...
Tobi's user avatar
  • 171
1 vote
0 answers
87 views

Unable to get SessionRepository while integrating Spring Session using JDBC with Grails3

I am unable to integrate Spring Session with Grails-3.3.15 application using JDBC to persist HttpSession in PostgreSQL db. I get BeanCreationException upon startup of the application. Background: I ...
Manish Kapoor's user avatar
0 votes
0 answers
119 views

Spring Session Redis with OAuth2LoginAuthenticationToken

In our Spring Gateway (Spring Boot 3, Webflux, Kotlin) we have configured security for Oauth2+oidc in a multi-tenancy setup. As AuthenticationManager we use Spring's ...
sculeb's user avatar
  • 1
0 votes
0 answers
146 views

spring-session-data-redis: about the SaveMode.ON_GET_ATTRIBUTE

I find the is just to be used in the method of org.springframework.session.data.redis.RedisIndexedSessionRepository.RedisSession#getAttribute In my opinion, getAttribute has not function, because the ...
liruo's user avatar
  • 1
0 votes
0 answers
46 views

Detecting Session Creation and Destroy with Spring Session JDBC

I am using Spring Session JDBC to persist sessions in my application. I am aware that this implementation does not support HTTP event publishing. However, I have a requirement to log session creation, ...
Jason's user avatar
  • 3,942
0 votes
0 answers
156 views

Spring Session MapSessionRepository

I am attempting to use a MapSessionRepository and HttpSessionEventPublisher in Spring Session declared like this: @Bean public MapSessionRepository sessionRepository() { return new ...
Jason's user avatar
  • 3,942
0 votes
1 answer
297 views

Spring authorization server authenticate for each client

I'm trying to build an Identity Provider using Spring authorization-server that third party applications are going to use for FIM (federated identity management). We want each OAuth client to require ...
user3677636's user avatar
0 votes
0 answers
24 views

Spring authorization server sample with charles proxy not working due to session

I'm trying to figure out what's actually going on under the hood with spring authorization server and are using charles proxy to monitor the http traffic. However, I didn't get charles proxy to work ...
user3677636's user avatar
0 votes
0 answers
70 views

JDBC spring session not visible on Filters and Listeners

I have enabled EnableJdbcHttpSession on my spring app and it works fine except that I am getting different sessionIds depending on context. A call like this: ((ServletRequestAttributes) ...
Andrew_M's user avatar
0 votes
0 answers
64 views

Ready for use with Spring Boot 3.x?

In GitHub, I see that Spring Session 3.0.0 has been released: https://github.com/spring-projects/spring-session/releases/tag/3.0.0 However, on Spring.io, I see that it is marked pre-release (still RC2)...
gooboo's user avatar
  • 141
2 votes
0 answers
351 views

Spring 6: Problem Storing Session Attributes and invalidate Session

While migrating to spring 6 and spring boot 3, we have two problems: The session attributes are not stored in the database anymore The session is not invalidated correctly on logoff. In Spring 5 we ...
gema's user avatar
  • 21

1
2 3 4 5
15