# Disabling shield user caching

**URL:** <https://discuss.elastic.co/t/disabling-shield-user-caching/52424>\
**Category:** Elasticsearch\
**Tags:** elastic-stack-security\
**Created:** [June 10, 2016, 8:59am UTC](https://discuss.elastic.co/t/disabling-shield-user-caching/52424 "2016-06-10T08:59:17Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Kiran\_Reddy](https://avatars.discourse-cdn.com/v4/letter/k/e9a140/32.png) [@Kiran\_Reddy](https://discuss.elastic.co/u/Kiran_Reddy)\
**Post date:** [June 10, 2016, 8:59am UTC](https://discuss.elastic.co/t/disabling-shield-user-caching/52424/1 "2016-06-10T08:59:17Z")

</div>

Hello everyone,

I am have installed ES, Kibana and Shield.

I have also configured shield to authenticate users when logging into ES, Kibana everything is working fine except that shield asks for the user credentials just once when logging into kibana. The next time i access it assumes i am using the same user and does not ask for the credential. I need the user to be authenticated when ever we submit a request.

When i did some research i found out that i needed to modify the elasticserarch.yml file to include the esuser realm and the property called cache.ttl which i have set to 2 ms meaning that every 2 millisecond the user cache expires but this is not working can someone tell me if this is the right way to do it? if not please tell me how.

Thank you in advance

---

<div class="post-metadata">

**Author:** ![jaymode](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jaymode/32/50103_2.png) [@jaymode](https://discuss.elastic.co/u/jaymode)\
**Post date:** [June 10, 2016, 11:23am UTC](https://discuss.elastic.co/t/disabling-shield-user-caching/52424/2 "2016-06-10T11:23:48Z")

</div>

Hi Kiran,

Can you clarify the versions of Elasticsearch, Shield, and Kibana that you are using? Also, do you have the Shield plugin installed in Kibana?

-Jay

---

<div class="post-metadata">

**Author:** ![Kiran\_Reddy](https://avatars.discourse-cdn.com/v4/letter/k/e9a140/32.png) [@Kiran\_Reddy](https://discuss.elastic.co/u/Kiran_Reddy)\
**Post date:** [June 13, 2016, 6:04am UTC](https://discuss.elastic.co/t/disabling-shield-user-caching/52424/3 "2016-06-13T06:04:18Z")

</div>

Hi Jay,

I am using

ElasticSearch 2.3.3  
Kibana 4.5.1  
shield 2.3.3  
Yes i have the plugin installed.

I just want to remove the feature of user caching and force the Shield to authenticate the user for all requests (not once every 20mins or 30mins). I did some research on the portal and added a few properties like cache.ttl for the esuser realm in the elasticsearch.yml file but to no avail.

---

<div class="post-metadata">

**Author:** ![jaymode](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jaymode/32/50103_2.png) [@jaymode](https://discuss.elastic.co/u/jaymode)\
**Post date:** [June 13, 2016, 10:50am UTC](https://discuss.elastic.co/t/disabling-shield-user-caching/52424/4 "2016-06-13T10:50:23Z")

</div>

I think there is a misunderstanding about what Shield's user caching does. The user caching is on the elasticsearch side and allows for _faster_ authentication but does not disable authentication completely. The user cache changes you are trying will not do anything for the Shield Kibana Session.

It actually sounds like you want to disable the Kibana sessions; I do not believe this method of operation is something we can currently support.

---

<div class="post-metadata">

**Author:** ![Kiran\_Reddy](https://avatars.discourse-cdn.com/v4/letter/k/e9a140/32.png) [@Kiran\_Reddy](https://discuss.elastic.co/u/Kiran_Reddy)\
**Post date:** [June 14, 2016, 10:26am UTC](https://discuss.elastic.co/t/disabling-shield-user-caching/52424/5 "2016-06-14T10:26:54Z")

</div>

got it jay thank you for your help 🙂

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 6, 2017, 1:44pm UTC](https://discuss.elastic.co/t/disabling-shield-user-caching/52424/6 "2017-07-06T13:44:03Z")

</div>


