# Security on index level

**URL:** https://discuss.elastic.co/t/security-on-index-level/311831
**Category:** Elasticsearch
**Tags:** elastic-stack-security
**Created:** [August 10, 2022, 12:51pm UTC](https://discuss.elastic.co/t/security-on-index-level/311831 "2022-08-10T12:51:00Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![Casper\_Thrane](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/casper_thrane/32/49777_2.png) [@Casper\_Thrane](https://discuss.elastic.co/u/Casper_Thrane)
#### Post date: [August 10, 2022, 12:51pm UTC](https://discuss.elastic.co/t/security-on-index-level/311831/1 "2022-08-10T12:51:01Z")

</div>

Hi

Is it possible to create security on index level, so access to an index is role based controlled, instead of setting security on all documents in an index?

/Casper

---

<div class="post-metadata">

### Author: ![leandrojmp](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/leandrojmp/32/107231_2.png) [@leandrojmp](https://discuss.elastic.co/u/leandrojmp)
#### Post date: [August 10, 2022, 1:06pm UTC](https://discuss.elastic.co/t/security-on-index-level/311831/2 "2022-08-10T13:06:22Z")

</div>

You mean [document level](https://www.elastic.co/guide/en/elasticsearch/reference/current/document-level-security.html) security?

It is possible, but not on the Free Basic license, you need a Platinum or Enterprise License.

---

<div class="post-metadata">

### Author: ![Casper\_Thrane](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/casper_thrane/32/49777_2.png) [@Casper\_Thrane](https://discuss.elastic.co/u/Casper_Thrane)
#### Post date: [August 10, 2022, 1:28pm UTC](https://discuss.elastic.co/t/security-on-index-level/311831/3 "2022-08-10T13:28:56Z")

</div>

Thanks for a quick response 🙂

I know I can setup security for each document, going to an index. But is it possible, setup security on index level, for all documents going to an index?

---

<div class="post-metadata">

### Author: ![leandrojmp](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/leandrojmp/32/107231_2.png) [@leandrojmp](https://discuss.elastic.co/u/leandrojmp)
#### Post date: [August 10, 2022, 2:16pm UTC](https://discuss.elastic.co/t/security-on-index-level/311831/4 "2022-08-10T14:16:33Z")

</div>

It is not clear then what you want to do.

Per default the security works at index level, you create a role and give access to the index, this will allow read/write to the entire index.

---

<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: [September 7, 2022, 2:17pm UTC](https://discuss.elastic.co/t/security-on-index-level/311831/5 "2022-09-07T14:17:32Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
