Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Encrypting the database at rest without paying?

Right now the only way to encrypt a Cassandra database at rest seems to be with their enterprise edition which costs thousands of dollars: How to use Cassandra with TDE (Transparent Data Encryption)

Another solution is to encrypt every value before it enters the database, but then the key will be stored somewhere on every server in plaintext and would be easy to find.

I understand they offer "free" use for certain companies, but this is not an option and I am not authorized to pay $2000/server. How do traditional companies encrypt their distributed databases?

Thanks for the advice

like image 928
Code Wiget Avatar asked Mar 08 '23 17:03

Code Wiget


2 Answers

I took the approach of encrypting the data disk on AWS. I added a new volume to the instance and checked the option to encrypt the volume. Then I edited cassandra.yaml to point to the encrypted volume.

like image 88
LHWizard Avatar answered Apr 26 '23 14:04

LHWizard


We have done similar requirement in one of our project. Basically, I made use of trigger feature in Cassandra with custom implementation to perform encryption. It seems to be working fine for us.

You can refer below docs on how to create trigger and sample implemention of ITrigger interface

https://docs.datastax.com/en/cql/3.3/cql/cql_reference/cqlCreateTrigger.html

https://github.com/apache/cassandra/blob/2e5847d29bbdd45fd4fc73f071779d91326ceeba/examples/triggers/src/org/apache/cassandra/triggers/AuditTrigger.java

like image 27
sayboras Avatar answered Apr 26 '23 14:04

sayboras