Hiding Data in Cassandra
Sometimes you need to control access to the data in your databases in a very granular way – much more granular than most databases allow.
For instance, you might want some database users to be able to read only the last few digits of some credit card number, or you may need certain columns of certain rows to be readable by certain users only. Or maybe you need to hide some rows from some users under specific circumstances.
The data still needs to be stored in the database, we just need to restrict who can see certain parts of that data.
This is called data masking, and I’ve already talked about the two main approaches: static vs. dynamic data masking in a previous article.
In this article, I’ll show you how to roll your own dynamic data masking solution for Cassandra and Cassandra-compatible databases such as AWS Keyspaces, Azure Cosmos DB, and DataStax DSE, using a couple of off-the-shelf tools.