- X-Pack Reference for 6.0-6.2 and 5.x:
- Introduction
- Setting Up X-Pack
- Breaking Changes
- X-Pack APIs
- Graphing Connections in Your Data
- Profiling your Queries and Aggregations
- Reporting from Kibana
- Securing the Elastic Stack
- Getting Started with Security
- How Security Works
- Setting Up User Authentication
- Configuring SAML Single-Sign-On on the Elastic Stack
- Configuring Role-based Access Control
- Auditing Security Events
- Encrypting Communications
- Restricting Connections with IP Filtering
- Cross Cluster Search, Tribe, Clients and Integrations
- Reference
- Monitoring the Elastic Stack
- Alerting on Cluster and Index Events
- Machine Learning in the Elastic Stack
- Troubleshooting
- Getting Help
- X-Pack security
- Can’t log in after upgrading to 6.2.4
- Some settings are not returned via the nodes settings API
- Authorization exceptions
- Users command fails due to extra arguments
- Users are frequently locked out of Active Directory
- Certificate verification fails for curl on Mac
- SSLHandshakeException causes connections to fail
- Common SSL/TLS exceptions
- Internal Server Error in Kibana
- Setup-passwords command fails due to connection failure
- X-Pack Watcher
- X-Pack monitoring
- X-Pack machine learning
- Limitations
- License Management
- Release Notes
WARNING: Version 6.2 of the Elastic Stack has passed its EOL date.
This documentation is no longer being maintained and may be removed. If you are running this version, we strongly advise you to upgrade. For the latest information, see the current release documentation.
Controlling the User Cache
editControlling the User Cache
editUser credentials are cached in memory on each node to avoid connecting to a
remote authentication service or hitting the disk for every incoming request.
You can configure characteristics of the user cache with the cache.ttl
,
cache.max_users
, and cache.hash_algo
realm settings.
PKI realms do not use the user cache.
The cached user credentials are hashed in memory. By default, X-Pack security uses a
salted sha-256
hash algorithm. You can use a different hashing algorithm by
setting the cache_hash_algo
setting to any of the following:
Table 6. Cache hash algorithms
Algorithm |
Description |
||
|
Uses a salted |
||
|
Uses |
||
|
Uses |
||
|
Uses |
||
|
Uses |
||
|
Uses |
||
|
Uses |
||
|
Uses |
||
|
Uses |
||
|
Uses |
||
|
Doesn’t hash the credentials and keeps it in clear text in
memory. CAUTION: keeping clear text is considered insecure
and can be compromised at the OS level (for example through
memory dumps and using |
Evicting Users from the Cache
editX-Pack security exposes a
Clear Cache API you can use
to force the eviction of cached users. For example, the following request evicts
all users from the ad1
realm:
$ curl -XPOST 'http://localhost:9200/_xpack/security/realm/ad1/_clear_cache'
To clear the cache for multiple realms, specify the realms as a comma-separated list:
$ curl -XPOST 'http://localhost:9200/_xpack/security/realm/ad1,ad2/_clear_cache'
You can also evict specific users:
$ curl -XPOST 'http://localhost:9200/_xpack/security/realm/ad1/_clear_cache?usernames=rdeniro,alpacino'
On this page