# Encrypt incoming beats

**URL:** https://discuss.elastic.co/t/encrypt-incoming-beats/127726
**Category:** Logstash
**Created:** [April 12, 2018, 4:22am UTC](https://discuss.elastic.co/t/encrypt-incoming-beats/127726 "2018-04-12T04:22:06Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![Kissa\_Koira](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kissa_koira/32/20893_2.png) [@Kissa\_Koira](https://discuss.elastic.co/u/Kissa_Koira)
#### Post date: [April 12, 2018, 4:22am UTC](https://discuss.elastic.co/t/encrypt-incoming-beats/127726/1 "2018-04-12T04:22:06Z")

</div>

So far I have been able to encode some of the parts from my message ([Mask parts of the message](https://discuss.elastic.co/t/mask-parts-of-the-message/125693)) now I would like to make this even better and use encryption instead. Could someone show me an example how to do this? Encryption and decryption.

---

<div class="post-metadata">

### Author: ![magnusbaeck](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/magnusbaeck/32/44943_2.png) [@magnusbaeck](https://discuss.elastic.co/u/magnusbaeck)
#### Post date: [April 12, 2018, 6:25am UTC](https://discuss.elastic.co/t/encrypt-incoming-beats/127726/2 "2018-04-12T06:25:47Z")

</div>

What's your end goal? Where should encryption take place? Where should decryption take place?

---

<div class="post-metadata">

### Author: ![Kissa\_Koira](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kissa_koira/32/20893_2.png) [@Kissa\_Koira](https://discuss.elastic.co/u/Kissa_Koira)
#### Post date: [April 12, 2018, 8:10am UTC](https://discuss.elastic.co/t/encrypt-incoming-beats/127726/3 "2018-04-12T08:10:56Z")

</div>

My end goal is to be able to encrypt parts of the data when it flows through the logstash. Basically I am using winlogbeat , sending data to logstash and forwarding it to elasticsearch. It should be already encrypted before arriving to elasticsearch.

I would need to decrypt it when necessary. Most of the data will be without encryption so I would need to decrypt just in special cases when the encrypted data is needed for some cases. For example, in my previous case I encoded user field now I would need to encrypt it.

---

<div class="post-metadata">

### Author: ![magnusbaeck](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/magnusbaeck/32/44943_2.png) [@magnusbaeck](https://discuss.elastic.co/u/magnusbaeck)
#### Post date: [April 12, 2018, 8:35am UTC](https://discuss.elastic.co/t/encrypt-incoming-beats/127726/4 "2018-04-12T08:35:38Z")

</div>

Have you looked at the cipher filter?

---

<div class="post-metadata">

### Author: ![Kissa\_Koira](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kissa_koira/32/20893_2.png) [@Kissa\_Koira](https://discuss.elastic.co/u/Kissa_Koira)
#### Post date: [April 12, 2018, 9:30am UTC](https://discuss.elastic.co/t/encrypt-incoming-beats/127726/5 "2018-04-12T09:30:25Z")

</div>

I have but I did not figure out how to even start with it, hence the need for example for my use.

---

<div class="post-metadata">

### Author: ![Kissa\_Koira](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kissa_koira/32/20893_2.png) [@Kissa\_Koira](https://discuss.elastic.co/u/Kissa_Koira)
#### Post date: [April 13, 2018, 9:56am UTC](https://discuss.elastic.co/t/encrypt-incoming-beats/127726/6 "2018-04-13T09:56:44Z")

</div>

Any help for this?

---

<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: [May 11, 2018, 9:56am UTC](https://discuss.elastic.co/t/encrypt-incoming-beats/127726/7 "2018-05-11T09:56:46Z")

</div>

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