ActiveStash gives you encrypted search on ActiveRecord models using application-level encryption.
It works by adding search on top of existing libraries like Lockbox and ActiveRecord Encryption.
When records are created or updated, they are indexed into a CipherStash collection, which can be queried via an
(Don’t worry about this detail too much, it’s all ✨ magic ✨ that happens behind the scenes.)
Searchable Encrypted Rails models with ActiveStash!
ActiveStash uses the “look-aside” pattern to create an external, fully encrypted index for your ActiveRecord models. Every time you create or update a record, the data is indexed to CipherStash via ActiveRecord callbacks. Queries are delegated to CipherStash but return ActiveRecord models so things just work.
If you’ve used Elasticsearch with gems like Searchkick, this pattern will be familiar to you.
Let’s jump in and install ActiveStash!