# Encrypt Translog or completely disable it?

**URL:** <https://discuss.elastic.co/t/encrypt-translog-or-completely-disable-it/142533>\
**Category:** Elasticsearch\
**Created:** [August 1, 2018, 10:10am UTC](https://discuss.elastic.co/t/encrypt-translog-or-completely-disable-it/142533 "2018-08-01T10:10:13Z")\
**Posts on this page:** 1\
**Showing post:** 5

<div class="post-metadata">

**Author:** ![nukarak](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/nukarak/32/33948_2.png) [@nukarak](https://discuss.elastic.co/u/nukarak)\
**Post date:** [August 2, 2018, 8:02am UTC](https://discuss.elastic.co/t/encrypt-translog-or-completely-disable-it/142533/5 "2018-08-02T08:02:14Z")

</div>

We implemented an ActionPlugin.  
In the "onIndexModule" - Method we add a new IndexStore, that delivers a custom DirectoryFactory, that one a custom FSDirectory and that one is using encrypted Streams ... Our index template is configured so that this index store is used .

In the action filters of the plugin we intercept the HTTP headers sent to the node, that hold the key for the index and put it into a local cache (indexname to key) with 5 minutes eviction time. In the IOFactory we retrieve the key again from that cache.

Currently this only is failing in 2 situations:

1. if a document update should be written into a replica shard on a non-master node, because then our ActionFilter is not called (I created another posting for this here)
2. if the cluster is restarted and the index still is open =\> there we intend to close all indexes on shutdown and/or on startup (also another posting here) .

Do you have an idea regarding the Translog?

Or would it be possible, to re-merge the former funcationality to have a TranslogStore that could be customized ?

Cheers,  
Martin

---

_[View the full topic](https://discuss.elastic.co/t/encrypt-translog-or-completely-disable-it/142533)._
