Questions tagged [spring-session]

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

Spring Session provides a common infrastructure for managing user’s session information. This provides many Benefits including:

  • Accessing a session from any environment (i.e. web, messaging infrastructure, etc)

  • In a web environment

    • Support for clustering in a vendor neutral way

    • Pluggable strategy for determining the session id

    • Easily keep the HttpSession alive when a WebSocket is active

Resources

748 questions
6
votes
2 answers

Session not replicated on session creation with Spring Boot, Session, and Redis

I'm attempting to implement a microservices architecture using Spring Cloud's Zuul, Eureka, and my own services. I have multiple services that have UIs and services and each can authenticate users using x509 security. Now I'm trying to place Zuul…
Andrew Serff
  • 2,117
  • 4
  • 21
  • 32
6
votes
2 answers

Best way to propagate credentials between micro services using spring-session

We are using an architecture very similar to the one described in this great guide on spring.io. Our gateway handles authentication, and sessions are stored in Redis using spring-session. Endpoints of our micro services are secured and also use…
lejeune.n
  • 312
  • 2
  • 11
6
votes
2 answers

receive sessionid after login via spring security

I am writing a small app with a spring boot rest based backend and a polymer dart based frontend. Currently I'm struggling to receive the session id from the login mechanism... Initially I planned to use the HeaderHttpSessionStrategy and use this to…
6
votes
1 answer

How to set order for SessionRepositoryFilter?

I am evaluating spring-session with my web application. During the very first request to the web app, multiple httpsession is being created for a single client. After debugging I found that the problem is, the response is committed earlier in the…
Thilak
  • 656
  • 7
  • 15
5
votes
1 answer

Spring boot Websocket scaling

I have a spring boot application using web-sockets and stomp, I have to use the xhr-polling protocol because of limitations to our ISAM setup and this application will be hosted on Pivotal Cloud Foundry (PCF). When I run a single instance, with the…
5
votes
1 answer

Using multiple OAuth2 clients in single browser session using Spring boot

We have Multi tenant WebApp designed using Spring Boot + Spring Security. This app is used to manage certain resources in Azure. User login into our WebApp using OAuth2.0 and can access Azure resources through our app. Now we need to allow multiple…
5
votes
1 answer

How does Spring Security handle JSESSIONID with various Session Creation and Session Fixation combinations?

I have a J2EE REST-based app using Spring Security 4.0.1.RELEASE. Needless to say, Spring documentation on sessionCreationPolicy and sessionFixation is sparse, aside from targeted questions here on StackOverflow. I'm using a Java-based config for…
Matt
  • 23,363
  • 39
  • 111
  • 152
5
votes
3 answers

Disable spring session with redis in integrationtests

I am using spring session with redis, but I want to disable it while doing tests. My class is annotated: @ActiveProfiles("integrationtests") and my application-integrationtests.tml file contains: spring.autoconfigure.exclude:…
hi_my_name_is
  • 4,894
  • 3
  • 34
  • 50
5
votes
1 answer

Share Websocket Session between Spring Micro Service

I've a Spring boot Application for Web sockets. I'm not using Stomp Web socket. Is there way we can share web socket sessions across multiple instance of micro service. Is there a way we can save websocket session in Redis or cassandra? My use case…
5
votes
0 answers

Get current session in spring boot application that utilize spring-session backed by MongoDB

I have an instance of HandlerInterceptorAdapter that intercept request to check locale... public class LocaleControllerInterceptor extends HandlerInterceptorAdapter { @Override public boolean preHandle(HttpServletRequest…
Jalal Sajadi
  • 412
  • 6
  • 12
5
votes
5 answers

Spring Session Redis serializer SerializationException

In an attempt to externalize tomcat session for my existing application I am trying the Spring Session Redis solution. After following the steps to include necessary dependencies in pom.xml like so :
joeflux
  • 71
  • 1
  • 1
  • 4
5
votes
1 answer

Production considerations for Spring Cloud, Spring Data Redis & Eureka

I have a Spring Cloud micro services application spanning 4 server types: A security gateway, two UI servers and a REST APIs server. Each one of these will run on its own VM in a production environment: 4 server instances of the REST server and 2…
odedia
  • 931
  • 2
  • 11
  • 27
5
votes
1 answer

How to configure spring-session with spring-boot WITHOUT Redis and without auto configuration to use another db store

I would like to utilize spring-boot + spring-session WITHOUT Redis but use dynamodb as the sessionRepository implementation. All of the examples available are tightly coupled with Redis or Hazelcast and are mostly auto configurations that abstract…
Selwyn
  • 3,118
  • 1
  • 26
  • 33
5
votes
1 answer

Equivalent of org.springframework.boot.context.embedded.FilterRegistrationBean for non-Boot Spring project?

I'm trying to implement external session handling in Spring, as per this tutorial. I'm having some trouble adding the right filter though. Spring Boot appears to have defined the proper bean/filter, but my project is not Spring Boot, so it cannot…
Joseph Blair
  • 1,385
  • 2
  • 12
  • 25
5
votes
1 answer

How does Spring Session support multiple sessions within a single browser?

The Spring Session documentations describes as one of its usage benefits as written below. Allowing for a single browser to have multiple simultaneous sessions in a transparent fashion. For example, many developers wish to allow a user to…
Newbie
  • 7,031
  • 9
  • 60
  • 85