- Shield Reference for 2.x and 1.x:
- Introduction
- Getting Started with Shield
- Installing Shield
- How Shield Works
- User Authentication
- How Authentication Works
- Enabling Anonymous Access [1.1.0] Added in 1.1.0.
- Native User Authentication
- LDAP User Authentication
- Active Directory User Authentication
- PKI User Authentication [1.3.0] Added in 1.3.0.
- File-based User Authentication
- Integrating with Other Authentication Systems
- Controlling the User Cache
- Role-based Access Control
- Auditing Security Events
- Securing Communications with Encryption and IP Filtering
- Configuring Clients and Integrations
- Managing Your License
- Example Shield Deployments
- Reference
- Limitations
- Troubleshooting
- Setting Up a Certificate Authority
- Release Notes
Controlling the User Cache
editControlling the User Cache
editUser credentials are cached in memory on each node to avoid connecting to a remote authentication
server 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, Shield uses a salted sha-256
hash algorigthm. You can use a different algorithm by setting the cache-hash_algo
setting
to any of the supported cache hash algorithms:
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
editShield 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/_shield/realm/ad1/_clear_cache'
To clear the cache for multiple realms, specify the realms as a comma-separated list:
$ curl -XPOST 'http://localhost:9200/_shield/realm/ad1,ad2/_clear_cache'
You can also evict specific users:
$ curl -XPOST 'http://localhost:9200/_shield/realm/ad1/_clear_cache?usernames=rdeniro,alpacino'
On this page