# Elasticsearch Immutable Documents in Indexes

**URL:** <https://discuss.elastic.co/t/elasticsearch-immutable-documents-in-indexes/295825>\
**Category:** Elasticsearch\
**Tags:** elastic-stack-security\
**Created:** [January 31, 2022, 10:48am UTC](https://discuss.elastic.co/t/elasticsearch-immutable-documents-in-indexes/295825 "2022-01-31T10:48:04Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![nirvanah](https://avatars.discourse-cdn.com/v4/letter/n/6f9a4e/32.png) [@nirvanah](https://discuss.elastic.co/u/nirvanah)\
**Post date:** [January 31, 2022, 10:48am UTC](https://discuss.elastic.co/t/elasticsearch-immutable-documents-in-indexes/295825/1 "2022-01-31T10:48:04Z")

</div>

I am using Elastic Stack to store logs of multiple servers. I need to make the logs/document immutable, i.e. Write-once only. There is a compliance requirement to prevent alteration of logs. I am using Elasticsearch 7.10.2 with Basic license. I am unable to find anything to achieve this, apart from an external vendor called search-guard. Can anyone help?

---

<div class="post-metadata">

**Author:** ![Tomo\_M](https://avatars.discourse-cdn.com/v4/letter/t/848f3c/32.png) [@Tomo\_M](https://discuss.elastic.co/u/Tomo_M)\
**Post date:** [January 31, 2022, 11:14am UTC](https://discuss.elastic.co/t/elasticsearch-immutable-documents-in-indexes/295825/2 "2022-01-31T11:14:35Z")

</div>

How about [Security privileges | Elasticsearch Guide [7.16] | Elastic](https://www.elastic.co/guide/en/elasticsearch/reference/current/security-privileges.html#privileges-list-indices) ?  
If you deprive `all`, `create`, `index`...etc from every role and add just `create_doc` and other necessary priviledges, the docs could be immutable as a result. It is not as simple as just tag `"immutable"` to index settings, you will need to give careful consideration to the design of index names and roles.

---

<div class="post-metadata">

**Author:** ![nirvanah](https://avatars.discourse-cdn.com/v4/letter/n/6f9a4e/32.png) [@nirvanah](https://discuss.elastic.co/u/nirvanah)\
**Post date:** [January 31, 2022, 11:16am UTC](https://discuss.elastic.co/t/elasticsearch-immutable-documents-in-indexes/295825/3 "2022-01-31T11:16:12Z")

</div>

So you mean I need to simulate this using a combination of privileges and there's no native setting to do that?

---

<div class="post-metadata">

**Author:** ![Tomo\_M](https://avatars.discourse-cdn.com/v4/letter/t/848f3c/32.png) [@Tomo\_M](https://discuss.elastic.co/u/Tomo_M)\
**Post date:** [January 31, 2022, 11:29am UTC](https://discuss.elastic.co/t/elasticsearch-immutable-documents-in-indexes/295825/4 "2022-01-31T11:29:03Z")

</div>

I think so. As far as I know, there is no such native setting.

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [February 1, 2022, 12:11am UTC](https://discuss.elastic.co/t/elasticsearch-immutable-documents-in-indexes/295825/5 "2022-02-01T00:11:19Z")

</div>

Welcome to our community! 😃

The native setting is the included Security functionality that lets you create these sorts of access limitations.

---

<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:** [March 1, 2022, 12:11am UTC](https://discuss.elastic.co/t/elasticsearch-immutable-documents-in-indexes/295825/6 "2022-03-01T00:11:43Z")

</div>

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