ahamdsuhail
ahamdsuhail

Reputation: 113

Spring session redis store for multi tenant application

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.

Upvotes: 3

Views: 388

Answers (1)

namizaru
namizaru

Reputation: 824

You could probably do this using a CacheKeyPrefix, but I have not specifically tried this myself

Upvotes: 0

Related Questions