We've been working on a spring boot application and the user session management is implemented using redis. Now we are converting the project to use multi tenant model. The problem is users from different tenants are stored under same redisNamespace
.
I'm looking for a way to keep the user session isolated for different tenants. Is it possible to configure spring to store session details under dynamic namespace like (redisNamespace + ":" +tenantId + ":")
. Or is there any other cleaner way of segregating user session in redis. Please suggest.