Custom Session generated by spring

1

I have the following scenario:

  • a nodejs application that saves the session in redis.
  • another spring application that also saves the session in redis.

I would like to share this same session between the two applications. I thought of the following way of doing this (I do not know if it's correct), rewriting the http filter by modifying the way it mounts the session, I found two classes that I think I should rewrite: SessionRepositoryFilter and RedisOperationsSessionRepository.

Am I on the right track, or would it have a simpler way to solve my problem?

    
asked by anonymous 30.01.2016 / 16:38

1 answer

0

Solution

We set the environment as follows:

  • nginx as load balancer and proxy-reverse, it intercepts any request and redirects to url / auth, where there is an authentication-only application that returns 200 if the user is authenticated and redirects to the original url, if not authenticated it returns error 401 and nginx redirects to the login page;
  • node and spring application only accepts nginx requests to prevent unauthorized access.
  • So far we have not had any major problems working this way, but we are still validating and seeing alternatives.

        
    03.02.2016 / 21:23