DataStax Enterprise 4.5

Transparent data encryption

Transparent data encryption (TDE) protects at rest data. At rest data is data that has been flushed from the memtable in system memory to the SSTables on disk.

As shown in the diagram, data stored in the commit log is not encrypted. If you need commit log encryption, store the commit log on an OS-level encrypted file system using Gazzang, for example. Data can be encrypted using different algorithms, or you can choose not to encrypt data at all. SSTable data files are immutable (they are not written to again after they have been flushed to disk). SSTables are encrypted only once when they are written to disk.

The Cassandra File System (CFS) is accessed as part of the Hadoop File System (HDFS) using the configured authentication. If you encrypt the CFS keyspace's sblocks and inode tables, all CFS data gets encrypted.

Limitations and recommendations

Data is not directly protected by TDE when you access the data using the following utilities.

Utility Reason Utility Is Not Encrypted
json2sstable Operates directly on the sstables.
nodetool Uses only JMX, so data is not accessed.
sstable2json Operates directly on the sstables.
sstablekeys Operates directly on the sstables.
sstableloader Operates directly on the sstables.
sstablescrub Operates directly on the sstables.

Compression and encryption introduce performance overhead.


TDE requires a secure local file system to be effective. The encryption certificates are stored locally; therefore, an invasion of the local file system invalidates encryption.


To get the full capabilities of TDE, download and install the Java Cryptography Extension (JCE), unzip the jar files and place them under $JAVA_HOME/jre/lib/security. JCE-based products are restricted for export to certain countries by the U.S. Export Administration Regulations.

Encrypting data

The high-level procedure for encrypting data is:


  1. Back up SSTables.
  2. Set permissions so that only the user/group running DataStax Enterprise can change the keytab file. If JNA is installed, JNA takes care of setting these permissions.
  3. Ensure that the user encrypting data has been granted ALTER permission on the table containing the data to be encrypted. You can use LIST PERMISSIONS to view the permissions granted to a user.
  4. Specify encryption options when you create a table or alter an existing table.
  5. Rewrite all SSTables using nodetool upgradesstables --include-all-sstables.