Currently i am using elastic 7.17.5 along with spring boot. Index creation and data save and retrieval is happening via Java only.
Below is my requirement,
I need to have a data saved in the Elasticsearch is should encrypted format. When some one directly curl the elastic they should see only the encrypted value not the actual value. In this case i need to do the searches(exact, Prefix, term, wild card and fuzzy) with scoring as well.
The same i need to if for the non text field like date, integer, Boolean etc as well. This case i need to support the range query option as well
Also i need to make the search to work as well.
Please suggest the approaches to achieve the above criteria.
I assume you're using a self-managed Elasticsearch instance? You'll need to encrypt the data at OS level as it's not something Elasticsearch supports out of the box.
This article is a bit dated but it does recommend a few tools and considerations for applying encryption at REST.
Can you tell me a little about where this requirement comes from? e.g. is there a corporate policy at play here, if so can you quote what it actually says?
The requirement as you have described it:
is pretty unusual.
@carly.richmond covered the "data at rest" aspect, but as written your requirement is different.
I don't think you can do what you have in mind. If you need to search for data, the data must be readable by the Elasticsearch process so it's technically available in the memory and any user which could search for the data will be able to fetch back the data.
You can have fields which are only visible by admins, with field security, but it's not what you asked for I think.
is indeed making it harder to retrieve the value of name_search field in each indexed doc, even if I had the "disk" on which this data is stored. As effectively only the analysed tokens, and which docs contain which tokens, are "known" from the data on the disk.
And if that disk is encrypted, I'd have to overcome that too.
But "harder" might not be enough, and I'd certainly not call it "secure" or "encrypted". Because access to the disk gives access to the Lucene data structures, which contain the tokens, and lucene tools could (theoretically) be used to rebuild the original data, at least to a close approximation. Note that I've never tried doing so, so I dont know how hard it would be.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.