-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
Absolute Session Timeout #18566
Comments
I'm thinking it would be less effort to tackle this and #36528 in a single enhancement. |
I haven't done any real analysis on these issues yet, but my gut feeling says that it'd be easier to tackle absolute session timeouts via a Role-based session timeouts also means that any user with the I'm curious to hear your thoughts though, as I'm likely missing something! |
Yeah, I mentioned that before looking at the code or putting too much thought into what a solution for per-role session timeouts would look like. |
OK, I propose the following:
So, if lifespan is not set, sessions will continue to function as they do today. Design considerations:
|
Looks great to me! |
++ I think this makes sense too. I had to read the proposal a couple of times, as I kept conflating the existing Currently, we have:
What do you two think about something like:
The legacy platform has config deprecations that can be leveraged to automatically perform the rename from kibana/x-pack/legacy/plugins/security/index.js Lines 61 to 65 in 0210ce4
Adding the following would perform the rename: rename('sessionTimeout', 'session.idleTimeout') |
Agree the naming is currently less than ideal. I was under the assumption it would be difficult / we would lean away from renaming existing config properties. I think renaming them would be better. |
So, as this functions today -- when the user receives the session expiring notification, this accomplishes two things:
Ideally I'd like to accomplish the same thing when a session's lifespan is exceeded. Point 1 is easy, just a small change to the text of the notification. However, I don't see a clean way to accomplish point 2. It would be great to show a login form in the re-auth prompt, but that wouldn't work for all authentication realms (e.g., SSO). I don't love this, but I am thinking we can change the color of the notification modal to something more irritating, and warn the user to save his work because he is about to be logged out. Unless we agree on a "re-auth" login modal for a subset of compatible authentication realms? |
I like this approach. I think waiting to add a "re-auth" login modal until later is a good call, as we'd have to figure out how to make this work with our SSO integrations (it likely wouldn't because they all do redirects). |
I'm also on board with this -- most Kibana installations won't take advantage of this feature (we aren't enabling a As an aside, we need to confirm whether we want to enable this setting for cloud (ESS) installations. The current |
Well, if I had my druthers, it would be enabled by default..! But that's another conversation I suppose. OK, I'll be in touch regarding ESS installations. Digging into this a bit more, it looks like the UX changes will be somewhat non-trivial. The current idle timeout notification isn't based on the user's actual session info. I discovered and opened two new bugs, see #48858 and #48859. I think we need to change this notification so it has actual context of the user's session expiration. With the addition of session lifetimes, we will no longer be able to "estimate" the expiration based on the
I think approach number 1 is simpler, number 2 is a bit cleaner but probably unnecessary. I'd lean towards number 1. Thoughts? |
Yeah, I vaguely remember talking about a related issue with Brandon not too long ago (#18751). We've historically counted API calls as "user activity" for the purpose of session expiration, but since Kibana is a collection of massive SPAs, it's possible that a user could be doing meaningful work without making server calls. I think it'd be interesting to explore a
Taking a step back though, we can keep this as two separate issues -- a simple So I guess that's my long-winded way of saying I prefer your second option, but could be convinced otherwise. edit |
To potentially further complicate matters, I have a PR open to move the "idle session timeouts" client-side to the new platform: #39477 |
Well, after thinking on it some more, the cookie approach is somewhat problematic because of customer security audits. Having a non-HttpOnly cookie, which an end-user could edit to influence the session timeout, could raise some eyebrows in customer security audits. Even though we could make the argument that it's not a real concern, it's probably best to avoid opening that can of worms entirely. I'll work with the |
Currently, we have the
sessionTimeout
that is used as the idle timeout for Kibana sessions, but we don't have a mechanism to enforce an absolute expiration.Enforcing an absolute expiration minimizes the amount of time an attacker could use a hijacked session.
https://github.com/OWASP/CheatSheetSeries/blob/master/cheatsheets/Session_Management_Cheat_Sheet.md#absolute-timeout
The text was updated successfully, but these errors were encountered: