# Decrypt data before decoding

**URL:** https://discuss.elastic.co/t/decrypt-data-before-decoding/86295
**Category:** Logstash
**Created:** [May 18, 2017, 3:28pm UTC](https://discuss.elastic.co/t/decrypt-data-before-decoding/86295 "2017-05-18T15:28:33Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![pollux](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/pollux/32/31600_2.png) [@pollux](https://discuss.elastic.co/u/pollux)
#### Post date: [May 18, 2017, 3:28pm UTC](https://discuss.elastic.co/t/decrypt-data-before-decoding/86295/1 "2017-05-18T15:28:34Z")

</div>

Hi,

I need to fetch file from ftp. Last time I checked, logstash didn't have an input plug-in for ftp. So I'll mount the ftp and logstash will read from file.

The real thing is, can I said to logstash "ok read this file, pass it to openssl with this options (decrypt it), then decode it as a json". Is it doable ?

My question is, I think, about chaining filter (but maybe I am wrong)

In advance thanks, Rémi

---

<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: [May 23, 2017, 3:52am UTC](https://discuss.elastic.co/t/decrypt-data-before-decoding/86295/2 "2017-05-23T03:52:46Z")

</div>

Perhaps surprisingly I don't think anybody has written a filter that passes events through a child process which is what you'd need here. However, you could use a ruby filter to do that if you're able and willing to write some code.

---

<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: [June 20, 2017, 3:52am UTC](https://discuss.elastic.co/t/decrypt-data-before-decoding/86295/3 "2017-06-20T03:52:48Z")

</div>

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