3
I have the following scenario:
- an application nodejs that saves the session in redis.
- another spring q application also saves the session in redis.
I would like to share this same session between the two applications. I thought about how to do this (I don’t know if it’s correct), rewrite the http filter by modifying the way it mounts the session, I found two classes I think I should rewrite: Sessionrepositoryfilter and Redisoperationssessionrepository.
Am I on the right track, or would I have a simpler way to solve my problem?
Are different applications in different environments and you want to share the same session? I could not understand your doubt very well... but if it is as I understood, I believe it is not possible (for security reasons and more) this type of sharing.
– Weslley Tavares
Well, the scenario I have is a little more complex, I have a Nginx server that when I enter the address my-server.com/app-Node it makes a load balancing between several nodes where my application is running, the same Nginx when accessing the path myserver.com/app-spring does the same service, which happens is that when the user accesses/app-Node asks for login and when it goes to/app-spring it asks for login again. Changing the description a little, I’d like to do a Singlesignon between them.
– arkanjoms
Really what you need is Single Sign On (SSO), but that doesn’t mean sharing a session, because each application identifies users differently. You need to set up a third application to work as an authentication server and the other two existing ones will rely on this third one to do this. I do not recommend you create your own solution, but use some known tool in the area. I’ve had contact with some tools like JOSSO, but honestly do not know what the state of the art today, even more if considering solutions in other technologies.
– utluiz
thank you @utluiz it was exactly in this conclusion that I ended up coming here with my team.
– arkanjoms
@arkanjoms If you can summarize your team’s decision in an answer here it would be great to help future people who have the same question. If I can’t I can turn my comment into a response.
– utluiz
good idea @utluiz I will edit my question adding the solution found.
– arkanjoms
You can answer your own question, it gets better.
– utluiz