# Access based on fieldvalue

**URL:** <https://discuss.elastic.co/t/access-based-on-fieldvalue/32414>\
**Category:** Elasticsearch\
**Tags:** elastic-stack-security\
**Created:** [October 16, 2015, 8:16pm UTC](https://discuss.elastic.co/t/access-based-on-fieldvalue/32414 "2015-10-16T20:16:12Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![etfeet](https://avatars.discourse-cdn.com/v4/letter/e/4da419/32.png) [@etfeet](https://discuss.elastic.co/u/etfeet)\
**Post date:** [October 16, 2015, 8:16pm UTC](https://discuss.elastic.co/t/access-based-on-fieldvalue/32414/1 "2015-10-16T20:16:12Z")

</div>

Is it possible to grant/deny access to index documents based on field value?

ie user mycorpuser will only be able to access documents in index where the customer field = mycorp.

Thanks,

Rory

---

<div class="post-metadata">

**Author:** ![skearns](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/skearns/32/125945_2.png) [@skearns](https://discuss.elastic.co/u/skearns)\
**Post date:** [October 16, 2015, 8:35pm UTC](https://discuss.elastic.co/t/access-based-on-fieldvalue/32414/2 "2015-10-16T20:35:45Z")

</div>

Hi Rory,

Yes, this is most easily supported with Elasticsearch / Shield 2.0, which is currently in RC. We call this Document Level Security in our documentation:

[https://www.elastic.co/guide/en/shield/2.0.0-beta2/setting-up-field-and-document-level-security.html#\_document\_level\_security](https://www.elastic.co/guide/en/shield/2.0.0-beta2/setting-up-field-and-document-level-security.html#_document_level_security)

Cheers,  
Steve

---

<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:48pm UTC](https://discuss.elastic.co/t/access-based-on-fieldvalue/32414/3 "2017-07-06T13:48:13Z")

</div>


