-
Notifications
You must be signed in to change notification settings - Fork 8.5k
Description
Kibana version: 7.5
Elasticsearch version: 7.5
Server OS version: macOS Mojave 10.14.6
Browser version: Google Chrome 77.0.3865.120
Browser OS version: macOS Mojave 10.14.6
Original install method (e.g. download page, yum, from source, etc.): from source
Describe the bug: When a user makes certain API calls, the user's session gets extended due to user activity (e.g., "sliding session" expiration), but the session idle timeout notification does not get rescheduled. The notification displays anyway, and the logout event gets triggered, and the user is redirected to the login page.
Steps to reproduce:
- Start a new ES cluster
- In Kibana, set "xpack.security.sessionTimeout" to a low value (like 90000 ms)
- Start Kibana
- Log into Kibana and navigate to the Logs app
- Click to view details on any log event
- In your browser's developer tools, view the API call to "
/foo/api/infra/graphql" and observe a new session cookie being set in the HTTP response header - Continue clicking view details on log events
- After 30 seconds, the session idle timeout notification will be displayed
- The session idle timeout notification will not be dismissed, even though the session is being extended with each API call
- After a total of 90 seconds, the logout event will be triggered, the session will be destroyed, and the user will be redirected to the login page
Expected behavior: The session notification should be rescheduled when the session is extended. The behavior on other pages (such as Dashboard) is consistent with this expectation. The discrepancy seems to be that behavior is different when API calls are made to "/foo/elasticsearch/*" routes, which successfully reschedule the notification.
Screenshots (if relevant): N/A
Errors in browser console (if relevant): N/A
Provide logs and/or server output (if relevant): N/A
Any additional context: Every time an API call is made to the Kibana backend: 1. the browser's session cookie is authenticated, 2. the session "expires" value is updated, and 3. the old session cookie is overwritten with a new one. However, the session timeout notification isn't currently based on when the user's session actually expires. When the page loads, the session timeout notification is scheduled based on the server-side config value for "xpack.security.sessionTimeout".