# Encryption of saved logs

**URL:** <https://discuss.elastic.co/t/encryption-of-saved-logs/347612>\
**Category:** Elastic Security\
**Created:** [November 21, 2023, 9:47am UTC](https://discuss.elastic.co/t/encryption-of-saved-logs/347612 "2023-11-21T09:47:52Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Hamada](https://avatars.discourse-cdn.com/v4/letter/h/ac91a4/32.png) [@Hamada](https://discuss.elastic.co/u/Hamada)\
**Post date:** [November 21, 2023, 9:47am UTC](https://discuss.elastic.co/t/encryption-of-saved-logs/347612/1 "2023-11-21T09:47:52Z")

</div>

I am using Elastic 8.1 in a Windows environment,  
How do you implement encryption of saved logs?

---

<div class="post-metadata">

**Author:** ![carly.richmond](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/carly.richmond/32/104935_2.png) [@carly.richmond](https://discuss.elastic.co/u/carly.richmond)\
**Post date:** [November 21, 2023, 5:40pm UTC](https://discuss.elastic.co/t/encryption-of-saved-logs/347612/2 "2023-11-21T17:40:23Z")

</div>

Hi @Hamada,

Welcome! By encryption of saved logs do you mean encryption of log entries (documents) you have sent to Elasticsearch?

---

<div class="post-metadata">

**Author:** ![Hamada](https://avatars.discourse-cdn.com/v4/letter/h/ac91a4/32.png) [@Hamada](https://discuss.elastic.co/u/Hamada)\
**Post date:** [November 22, 2023, 12:05am UTC](https://discuss.elastic.co/t/encryption-of-saved-logs/347612/3 "2023-11-22T00:05:28Z")

</div>

Yes,

---

<div class="post-metadata">

**Author:** ![carly.richmond](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/carly.richmond/32/104935_2.png) [@carly.richmond](https://discuss.elastic.co/u/carly.richmond)\
**Post date:** [November 22, 2023, 10:26am UTC](https://discuss.elastic.co/t/encryption-of-saved-logs/347612/4 "2023-11-22T10:26:12Z")

</div>

Thanks for confirming @Hamada. I'm not sure if you're using the free basic install versus an enterprise licence.

There is some guidance in the enterprise documentation [here](https://www.elastic.co/guide/en/cloud-enterprise/current/ece-securing-considerations.html#ece_encryption), but generally the approach is the same for basic on-prem installs.

But generally logs should be encrypted before storing, using a tool such as `dm-crypt`. This would impact searching on the fields to which encryption is applied.

I would recommend having a look at these threads for more information:

1. [How can I encrypt the data stored in indexes? - #2 by leandrojmp](https://discuss.elastic.co/t/how-can-i-encrypt-the-data-stored-in-indexes/315691/2)
2. [How should I encrypt data at rest with Elasticsearch?](https://discuss.elastic.co/t/how-should-i-encrypt-data-at-rest-with-elasticsearch/96)

Hope that helps!

---

<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:** [November 22, 2023, 12:36pm UTC](https://discuss.elastic.co/t/encryption-of-saved-logs/347612/5 "2023-11-22T12:36:36Z")

</div>

> [@Hamada](#):
>
> How do you implement encryption of saved logs?

Elasticsearch does not encrypt data, you have two options:

- Encrypt it before sending, but this makes the logs unsearchable as well, or you would need to search for encrypted strings and decrypt it yourself, so it does not make much sense.
- Use encryption at rest, which means that the hard-disk where the path data is stored will have some level of encryption, if I'm not wrong in Windows you can use BitLocker to encrypt the disk volume.

---

<div class="post-metadata">

**Author:** ![Hamada](https://avatars.discourse-cdn.com/v4/letter/h/ac91a4/32.png) [@Hamada](https://discuss.elastic.co/u/Hamada)\
**Post date:** [November 24, 2023, 1:08am UTC](https://discuss.elastic.co/t/encryption-of-saved-logs/347612/6 "2023-11-24T01:08:57Z")

</div>

Understand.Thanks for your answers.

---

<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:** [December 22, 2023, 1:09am UTC](https://discuss.elastic.co/t/encryption-of-saved-logs/347612/7 "2023-12-22T01:09:43Z")

</div>

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