# Document level security alternatives for indexing requests

**URL:** <https://discuss.elastic.co/t/document-level-security-alternatives-for-indexing-requests/298328>\
**Category:** Elasticsearch\
**Created:** [February 26, 2022, 9:56am UTC](https://discuss.elastic.co/t/document-level-security-alternatives-for-indexing-requests/298328 "2022-02-26T09:56:38Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![duongcongtoai](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/duongcongtoai/32/102368_2.png) [@duongcongtoai](https://discuss.elastic.co/u/duongcongtoai)\
**Post date:** [February 26, 2022, 9:56am UTC](https://discuss.elastic.co/t/document-level-security-alternatives-for-indexing-requests/298328/1 "2022-02-26T09:56:38Z")

</div>

At my company, i use Elasticsearch to store data of multiple tenants, and go with the approach using 1 index to store 1 document type for all tenants.  
I'm adopting Elasticsearch document level security, and all read requests are protected using DLS policy.  
Each read request will have a signed token containing the tenant\_id, and we have policy to enforce filter document.tenant\_id=tokenclaim.tenant\_id =\> There is no way user from tenant\_1 can read data from other tenant.  
But DLS does not apply for write request, and for indexing operation, there is no way to protect one document with tenant\_1's id from being overwritten to a tenant\_2's id, if anything wrong happen in our code (mostly from human). I'm finding a way to prevent that, or at least, have a reliable way to monitor it, so i would like to hear some suggestions. Thanks

---

<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 26, 2022, 9:57am UTC](https://discuss.elastic.co/t/document-level-security-alternatives-for-indexing-requests/298328/2 "2022-03-26T09:57:24Z")

</div>

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