-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Allow dynamic Redis namespace configuration #1301
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
My main concern is that two different tenants end up with the same Session ID, and so the wrong session, for the wrong tenant is passed up. |
@danielfariati Default session id generation strategy is Also note that we have #11 still open to consider providing a custom session id generation strategy. |
Yes, that was my only concern. |
Thanks for following up @danielfariati! |
Allow to dynamically define whats the current namespace for Redis.
The scenario is that I currently have a multi-tenant service (subdomain based) that will consult the Session Data within Redis, so I would like to define the tenant to be part of the namespace for the current request.
There is an option to customize the namespace via
@EnableRedisHttpSession(redisNamespace = "foo")
, but it is not dynamic, so it wouldn't change based on the current tenant.Calling the
setRedisKeyNamespace
for theRedisOperationsSessionRepository
would also not work well because, as far as I know, it is a singleton.Also, overriding the
RedisOperationsSessionRepository
is currently a pain because there are some private methods that are using thethis.namespace
directly.The text was updated successfully, but these errors were encountered: