# How to use dm\_crypt with elasticsearch

**URL:** <https://discuss.elastic.co/t/how-to-use-dm-crypt-with-elasticsearch/214781>\
**Category:** Elasticsearch\
**Created:** [January 13, 2020, 9:07am UTC](https://discuss.elastic.co/t/how-to-use-dm-crypt-with-elasticsearch/214781 "2020-01-13T09:07:21Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Yungyoung\_Ok](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/yungyoung_ok/32/43465_2.png) [@Yungyoung\_Ok](https://discuss.elastic.co/u/Yungyoung_Ok)\
**Post date:** [January 13, 2020, 9:07am UTC](https://discuss.elastic.co/t/how-to-use-dm-crypt-with-elasticsearch/214781/1 "2020-01-13T09:07:22Z")

</div>

In my case, the data stored in elasticsearch must be encrypted.  
So i will use dm\_crypt + LUKS.

Here is my file system.

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/f/6/f6f9e7f31388f228cde4a3fe498378660681e595.png)

elasticsearch.yml

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/a/0/a0e0ec23498454af1b6494ecb4c641b96f34ca01.png)

In the current state, inserting and searching data using kibana dev tools works fine.  
like this...

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/2/0/20ff8cd3316d28f357aa0b79bfb910c844e8360d.png)

But, I have two questions.

**First, Can dm\_crypt be used with a elasticsearch basic license?**  
currently my elastic cluster is a basic license.  
The official documentation says that platinum licenses are only supported.  
Is there a task to run separately in elasticsearch for dm crypt?

**Second, Can server users see data sources(plain text) even using dm\_crpyt?**  
I can connect to the server(login elasticsearch user) and see the text(plain text) of the translog in /var/elasticsearch/data.

Is dm\_crypt currently applied?  
Or is it not applied because of the license?

---

<div class="post-metadata">

**Author:** ![DavidTurner](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/davidturner/32/22453_2.png) [@DavidTurner](https://discuss.elastic.co/u/DavidTurner)\
**Post date:** [January 13, 2020, 9:23am UTC](https://discuss.elastic.co/t/how-to-use-dm-crypt-with-elasticsearch/214781/2 "2020-01-13T09:23:19Z")

</div>

> [@Yungyoung\_Ok](#):
>
> **First, Can dm\_crypt be used with a elasticsearch basic license?**

Yes it will work, but it's not officially supported. If you are using `dm_crypt` with a non-platinum licence and you encounter an issue then the support team may ask you to reproduce the issue with `dm_crypt` disabled before they can help you resolve it.

> [@Yungyoung\_Ok](#):
>
> **Second, Can server users see data sources(plain text) even using dm\_crpyt?**

Yes, `dm_crypt` transparently encrypts the data stored on disk so it looks like normal data to users of the host machine.

---

<div class="post-metadata">

**Author:** ![Yungyoung\_Ok](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/yungyoung_ok/32/43465_2.png) [@Yungyoung\_Ok](https://discuss.elastic.co/u/Yungyoung_Ok)\
**Post date:** [January 16, 2020, 1:54am UTC](https://discuss.elastic.co/t/how-to-use-dm-crypt-with-elasticsearch/214781/3 "2020-01-16T01:54:32Z")

</div>

How can I make sure that the host user cannot see the stored data transparently?

Can you guide me?

---

<div class="post-metadata">

**Author:** ![DavidTurner](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/davidturner/32/22453_2.png) [@DavidTurner](https://discuss.elastic.co/u/DavidTurner)\
**Post date:** [January 16, 2020, 5:41am UTC](https://discuss.elastic.co/t/how-to-use-dm-crypt-with-elasticsearch/214781/4 "2020-01-16T05:41:38Z")

</div>

That isn't possible. Elasticsearch itself runs as a normal user on the host, and needs access to the unencrypted data. If you do not want untrusted users to have access to this data then you should not permit untrusted users to access the host.

---

<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:** [February 13, 2020, 5:41am UTC](https://discuss.elastic.co/t/how-to-use-dm-crypt-with-elasticsearch/214781/5 "2020-02-13T05:41:39Z")

</div>

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