Encrypt existing search indexes

Encrypting DSE Search indexes turns on encryption only for new files. Additional steps are required to encrypt existing data. When you encrypt existing DSE Search indexes, a node restart is required.

There are several ways to encrypt existing DSE Search indexes. Choose the method that is appropriate for your environment.

Encryption is enabled per core.

If the solr index is configured to be encrypted, the same key is used for the index and the database.

When using a TDE-secured local file system, encryption keys are stored remotely with KMIP encryption or locally with on-server encryption.

  1. To enable encryption for an existing core, change the search index config in solrconfig.xml:

    <directoryFactory name="DirectoryFactory" class="solr.EncryptedFSDirectoryFactory"/>
  2. Upload the changed solrconfig.xml file.

    For example, you can use dsetool to upload the changed resource file:

    dsetool reload_core keyspace_name.table_name
  3. Restart the DSE node.

    Enabling encryption does not require a node restart. However, the directoryFactory changes require a node restart.

    Encryption is enabled only for new files. Complete the remaining steps to encrypt existing data.

  4. Encrypt existing files using one of the following methods.

    • While the node is running (long running)

    • While the local node is offline (fastest)

    • Eventual encryption (simplest)

    This option immediately encrypts existing data, but it is a long running process.

    Use dsetool to reload the core and reindex while the node is running:

    dsetool reload_core keyspace_name.table_name deleteAll=true reindex=true

    This option is the fastest, but the local node must be offline.

    Requirements:

    • The remote node that contains the encryption configuration must be running.

    • The local node is offline.

    • The user that runs this command must have read and write permissions to the directory that contains the index files.

    When your DSE cluster has a second remote node that is running, use dsetool to encrypt index files on the local offline node. The encryption configuration is read from the remote node.

    1. Enable encryption for all nodes that have a search index.

    2. Run the dsetool command:

      dsetool upgrade_index_files <keyspace_name>.<table_name> -h <IP_address> [<options>]

      You can specify the following options for offline index encryption:

      keyspace_name.table_name

      Required. The keyspace and table names of the search index. Keyspace and table names are case-sensitive. Enclose names that contain uppercase in double quotation marks.

      -h IP_address

      Required. Node hostname or IP address of the remote node that contains the encryption configuration that is used for index encryption. The remote node must be running.

      -c port

      The DSE port on the remote node that contains the encryption configuration.

      --backup

      Preserves the index files from the current index as a backup after successful upgrade. The preserved index file backup is moved to the --workspace directory. When not specified, index files from the current index are deleted.

      --workspace directory

      The workspace directory for the upgrade process. The upgraded index is created in this directory. When not specified, the default directory is the same directory that contains the search index files.

      --index directory

      The data directory that contains the search index files. When not specified, the default directory is inferred from the search index name.

    This option doesn’t require you to run any additional commands, but it relies on eventual encryption. This means it’s uncertain how long it will take before all existing data is encrypted.

    Instead of running dsetool commands, you can wait and allow encryption to happen naturally. As new data is added to your index, encryption occurs when indexes are compacted or merged. Because new files are encrypted, your files are eventually encrypted.

  5. To verify which files are encrypted, use the following command to list all DSE Search index files for the specified search core on the local node:

    dsetool list_index_files KEYSPACE_NAME.TABLE_NAME [--index DIRECTORY]

    Replace KEYSPACE_NAME.TABLE_NAME with the name of the search core to verify, and replace DIRECTORY with the data directory that contains the search index files. When not specified, the default directory is inferred from the search core name.

  6. After you verify which files are encrypted, you can encrypt existing files using a different option.

To disable encryption, disable encryption for the backing CQL table. No node restart is required.

Was this helpful?

Give Feedback

How can we improve the documentation?

© Copyright IBM Corporation 2025 | Privacy policy | Terms of use Manage Privacy Choices

Apache, Apache Cassandra, Cassandra, Apache Tomcat, Tomcat, Apache Lucene, Apache Solr, Apache Hadoop, Hadoop, Apache Pulsar, Pulsar, Apache Spark, Spark, Apache TinkerPop, TinkerPop, Apache Kafka and Kafka are either registered trademarks or trademarks of the Apache Software Foundation or its subsidiaries in Canada, the United States and/or other countries. Kubernetes is the registered trademark of the Linux Foundation.

General Inquiries: Contact IBM