-
Notifications
You must be signed in to change notification settings - Fork 6.1k
Support varying maxSessions by user in Servlet #16206
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
Maybe you can do like this
|
This approach makes sense when using Java classes to define the Spring Beans, but I am using the XML Schema-based configuration. Checking the docs, I have not found anything to configure Additionally, I believe the framework could apply the same concept of the Session Limit strategy to both non-servlet and servlet applications. What do you think? |
Thanks for the suggestion, @ClaudenirFreitas. I think this is a reasonable thing to consider. For completeness I'll mention that @kse-music's suggestion should work if you publish a That said, I think it would be reasonable to add In this same ticket, we should add Are you able to provide a PR that adds this functionality? |
Thanks for the feedback @jzheaux !
Yes, of course. I will create the PR tomorrow, ok? I am working on creating the unit tests. |
PR has been created. Could you review it @jzheaux @kse-music ? |
@ClaudenirFreitas, we typically only add features to the latest feature branch, which at the time of this writing is |
- Move to the web.authentication.session package since it is only needed by web.authentication.session elements and does not access any other web element itself. - Add Kotlin support - Add documentation Issue gh-16206
Closes spring-projectsgh-16206 Signed-off-by: Daeho Kwon <[email protected]>
- Move to the web.authentication.session package since it is only needed by web.authentication.session elements and does not access any other web element itself. - Add Kotlin support - Add documentation Issue spring-projectsgh-16206 Signed-off-by: Daeho Kwon <[email protected]>
Expected Behavior
For Reactive Applications, the
maximumSessions
value can be configured using theSessionLimit
abstraction (refer to this documentation) which also allows us to return the value based on the current authentication e.g.The SessionLimit abstraction was introduced by this Pull Request.
Current Behavior
For Servlet Applications, we do not have this mechanism (refer to this page). The
maximumSessions
is an Integer (this sample illustrate this).Context
I have a Servlet Application running in production and cannot migrate it to a Reactive Application. I would like a similar SessionLimit abstraction for the Servlet Application. I have not found an elegant way to do it by checking the
spring-security
code.I have the tenant identifier in the User Details and want to use it to retrieve the maximum session value per tenant using a service layer. This feature will be handy for the community.
I already cloned the spring-security repo and implemented a solution to support the
SessionLimit
abstraction for the Servlet Application.Before creating a Pull Request, I would like your input on this.
I just closed this one because I think it is more related to this repo.
The text was updated successfully, but these errors were encountered: