- Kibana Guide: other versions:
- What is Kibana?
- What’s new in 7.14
- Kibana concepts
- Quick start
- Set up
- Install Kibana
- Configure Kibana
- Alerting and action settings
- APM settings
- Banners settings
- Development tools settings
- Graph settings
- Fleet settings
- i18n settings
- Logging settings
- Logs settings
- Metrics settings
- Machine learning settings
- Monitoring settings
- Reporting settings
- Secure settings
- Search sessions settings
- Security settings
- Spaces settings
- Task Manager settings
- Telemetry settings
- URL drilldown settings
- Start and stop Kibana
- Access Kibana
- Securing access to Kibana
- Add data
- Upgrade Kibana
- Configure security
- Configure reporting
- Configure monitoring
- Production considerations
- Discover
- Dashboard
- Canvas
- Maps
- Build a map to compare metrics by country or region
- Track, visualize, and alert on assets in real time
- Map custom regions with reverse geocoding
- Heat map layer
- Tile layer
- Vector layer
- Plot big data
- Search geographic data
- Configure map settings
- Connect to Elastic Maps Service
- Import geospatial data
- Troubleshoot
- Reporting and sharing
- Machine learning
- Graph
- Alerting
- Observability
- APM
- Security
- Dev Tools
- Stack Monitoring
- Stack Management
- Fleet
- REST API
- Get features API
- Kibana spaces APIs
- Kibana role management APIs
- User session management APIs
- Saved objects APIs
- Index patterns APIs
- Alerting APIs
- Action and connector APIs
- Import and export dashboard APIs
- Logstash configuration management APIs
- Shorten URL
- Get Task Manager health
- Upgrade assistant APIs
- Kibana plugins
- Accessibility
- Release notes
- Developer guide
Session management
editSession management
editWhen you log in, Kibana creates a session that is used to authenticate subsequent requests to Kibana. A session consists of two components: an encrypted cookie that is stored in your browser, and an encrypted document in a dedicated Elasticsearch hidden index. By default, the name of that index is .kibana_security_session_1
, where the prefix is derived from the primary .kibana
index. If either of these components are missing, the session is no longer valid.
When your session expires, or you log out, Kibana will invalidate your cookie and remove session information from the index. Kibana also periodically invalidates and removes any expired sessions that weren’t explicitly invalidated.
To manage user sessions programmatically, Kibana exposes session management APIs.
Session idle timeout
editYou can use xpack.security.session.idleTimeout
to expire sessions after a period of inactivity. This and xpack.security.session.lifespan
are both highly recommended.
By default, sessions don’t expire because of inactivity. To define a sliding session expiration, set the property in the kibana.yml
configuration file. The idle timeout is formatted as a duration of <count>[ms|s|m|h|d|w|M|Y]
(e.g. 20m, 24h, 7d, 1w). For example, set the idle timeout to expire sessions after 1 hour of inactivity:
xpack.security.session.idleTimeout: "1h"
Session lifespan
editYou can use xpack.security.session.lifespan
to configure the maximum session duration or "lifespan" — also known as the "absolute timeout". This and xpack.security.session.idleTimeout
are both highly recommended. By default, sessions don’t have a fixed lifespan, and if an idle timeout is defined, a session can still be extended indefinitely. To define a maximum session lifespan, set the property in the kibana.yml
configuration file. The lifespan is formatted as a duration of <count>[ms|s|m|h|d|w|M|Y]
(e.g. 20m, 24h, 7d, 1w). For example, set the lifespan to expire sessions after 30 days:
xpack.security.session.lifespan: "30d"
Session cleanup interval
editIf you specify neither session idle timeout nor lifespan, then Kibana will not automatically remove session information from the index unless you explicitly log out. This might lead to an infinitely growing session index. Configure the idle timeout and lifespan settings for the Kibana sessions so that they can be cleaned up even if you don’t explicitly log out.
You can configure the interval at which Kibana tries to remove expired and invalid sessions from the session index. By default, this value is 1 hour and cannot be less than 10 seconds. To define another interval, set the xpack.security.session.cleanupInterval
property in the kibana.yml
configuration file. The interval is formatted as a duration of <count>[ms|s|m|h|d|w|M|Y]
(e.g. 20m, 24h, 7d, 1w). For example, schedule the session index cleanup to perform once a day:
xpack.security.session.cleanupInterval: "1d"