• Glossary
  • Support
  • Downloads
  • DataStax Home
Get Live Help
Expand All
Collapse All

DataStax Enterprise 6.8 Security Guide

    • About DSE Advanced Security
    • Security FAQs
    • Security checklists
    • Securing the environment
      • Securing ports
      • Securing the TMP directory
    • Authentication and authorization
      • Configuring authentication and authorization
        • About DSE Unified Authentication
          • Steps for new deployment
          • Steps for production environments
        • Configuring security keyspaces
        • Setting up Kerberos
          • Kerberos guidelines
          • Enabling JCE Unlimited
            • Removing AES-256
          • Preparing DSE nodes for Kerberos
            • DNS and NTP
            • krb5.conf
            • Principal
            • Keytab
        • Enabling authentication and authorization
          • Defining a Kerberos scheme
          • Defining an LDAP scheme
        • Configuring JMX authentication
        • Configuring cache settings
        • Securing schema information
      • Managing database access
        • About RBAC
        • Setting up logins and users
          • Adding a superuser login
          • Adding database users
          • LDAP users and groups
            • LDAP logins
            • LDAP groups
          • Kerberos principal logins
          • Setting up roles for applications
          • Binding a role to an authentication scheme
        • Assigning permissions
          • Database object permissions
            • Data resources
            • Functions and aggregate resources
            • Search indexes
            • Roles
            • Proxy login and execute
            • Authentication schemes
            • DSE Utilities (MBeans)
            • Analytic applications
            • Remote procedure calls
          • Separation of duties
          • Keyspaces and tables
          • Row Level Access Control (RLAC)
          • Search index permissions
          • DataStax Graph keyspace
          • Spark application permissions
          • DataStax Studio permissions
          • Remote procedure calls
          • DSE client-tool spark
          • JMX MBean permissions
          • Deny (denylist) db object permission
          • Restricting access to data
      • Providing credentials from DSE tools
        • About clients
        • Internal and LDAP authentication
          • Command line
          • File
          • Environment variables
          • Using CQLSH
        • Kerberos
          • JAAS configuration file location
          • Keytab
          • Ticket Cache
          • Spark jobs
          • SSTableLoader
          • Graph and gremlin-console
          • dsetool
          • CQLSH
        • Nodetool
        • JConsole
    • Auditing database activity
      • Enabling database auditing
      • Capturing DSE Search HTTP requests
      • Log formats
      • View events from DSE audit table
    • Transparent data encryption
      • About Transparent Data Encryption
      • Configuring local encryption
        • Setting up local encryption keys
        • Encrypting configuration file properties
        • Encrypting system resources
        • Encrypting tables
        • Rekeying existing data
        • Using tools with TDE-encrypted SSTables
        • Troubleshooting encryption key errors
      • Configuring KMIP encryption
      • Encrypting Search indexes
        • Encrypting new Search indexes
        • Encrypting existing Search indexes
        • Tuning encrypted Search indexes
      • Migrating encrypted tables from earlier versions
      • Bulk loading data between TDE-enabled clusters
    • Configuring SSL
      • Steps for configuring SSL
      • Creating SSL certificates, keystores, and truststores
        • Remote keystore provider
        • Local keystore files
      • Securing node-to-node connections
      • Securing client-to-node connections
        • Configuring JMX on the server side
        • nodetool, nodesync, dsetool, and Advanced Replication
        • JConsole (JMX)
        • SSTableloader
        • Connecting to SSL-enabled nodes using cqlsh
      • Enabling SSL encryption for DSEFS
      • Reference: SSL instruction variables
    • Securing Spark connections
  • DataStax Enterprise 6.8 Security Guide
  • Configuring SSL
  • Creating SSL certificates, keystores, and truststores
  • Remote keystore provider

Using a remote keystore provider

DataStax Enterprise (DSE) database uses the Java Cryptography API (JCA) to implement SSL providers. The JCA is a pluggable architecture that abstracts the actual cryptography implementation from the algorithm requested. To support swapping out different implementations, DSE database uses Cipher.getInstance("AES").

Introduction

The JCA architecture Provider class allows multiple implementations to register using a different service provider interface (SPI). Java comes with multiple providers and supports installation of additional providers, such as PKCS12.

securityPKCS11

There are a few important points to consider regarding PKCS12 and PKCS11 support:

The location of the cassandra.yaml file depends on the type of installation: * Package installations: /etc/dse/cassandra/cassandra.yaml * Tarball installations: <installation_location>/resources/cassandra/conf/cassandra.yaml * For PKCS12, in cassandra.yaml, the relevant property is truststore_type. DSE uses it to determine the desired SPI. The valid values for truststore_type are JKS, JCEKS, or PKCS12. The default is JKS, and the recommended setting for file-based truststores is PKCS12. However, there is a caveat and a workaround:

+

Due to an OpenSSL issue, you cannot use a PKCS12 truststore that was generated via OpenSSL. For example, a truststore generated via the following command will not work with DSE:

openssl pkcs12 -export -nokeys -out truststore.pfx -in <intermediate.chain.pem>

However, truststores generated via Java’s keytool and then converted to PKCS12 work with DSE. Example:

keytool -importcert -alias <rootca> -file <rootca.pem> -keystore <truststore.jks>
keytool -importcert -alias <intermediate> -file <intermediate.pem> -keystore <truststore.jks>
keytool -importkeystore -srckeystore <truststore.jks> -destkeystore <truststore.pfx> -deststoretype pkcs12
  • For PKCS11, in cassandra.yaml, the relevant property is keystore_type. Valid types are JKS, JCEKS, PKCS11, PKCS12. The default is JKS, and the recommended setting for file-based keystores is PKCS12. If PKCS11 is desired, note the following:

    DataStax supports PKCS11 as a keystore_type on nodes with cassandra or advanced workloads. The advanced workload support was added for DSE 6.8.2 and later. If PKCS11 is needed, in server_encryption_options or client_encryption_options, specify the keystore_type as PKCS11 and the keystore as NONE.

    PKCS11 is not supported as a truststore_type.

  • For cassandra.yaml reference descriptions, see the https://docs.datastax.com/en/dse/6.8/dse-admin/datastax_enterprise/config/configCassandra_yaml.html#configCassandra_yamlserverSsltruststore_type[truststore_type] and https://docs.datastax.com/en/dse/6.8/dse-admin/datastax_enterprise/config/configCassandra_yaml.html#configCassandra_yamlserverSslStoreType[keystore_type] settings.

Differences between PKCS11 and PKCS12

PKCS11 and PKCS12 are part of the RSA Public Key Cryptography Standards for storing private key and certificate information. Review the important caveats listed earlier in this topic, if you have not already done so.

PKCS12 is typically used to store private key and certificate information on files. The default keystore type in Java is JKS, though you can specify PKCS12 with the -deststoretype option when creating a keystore with keytool. Be sure to read the notes above that contain information about an openssl bug, and the workaround via keytool for PKCS12 support.

PKCS11 provides an interface to connect with hardware keystore devices. This type of keystore can store private keys, secret keys, and certificates like PKCS12, but is designed for Hardware Storage Modules (HSM).

Installing additional providers

Install providers using the java.security configuration that comes with the JRE.

For more detailed instructions, see How to implement a Provider (Oracle).

Add the location to the java.security configuration file, which is located in $<JAVA_HOME>/lib/security/java.security. For an environment where PKCS11 is the keystore type and a Cassandra-only workload, use:

security.provider.10=sun.security.pkcs11.SunPKCS11 <path-to-pkcs11-provider-config-file>

Example:

security.provider.10=sun.security.pkcs11.SunPKCS11 /opt/bar/cfg/pkcs11.cfg

For details, see the Oracle JDK 8 PKCS#11 Reference Guide.

Creating SSL certificates, keystores, and truststores Local keystore files

General Inquiries: +1 (650) 389-6000 info@datastax.com

© DataStax | Privacy policy | Terms of use

DataStax, Titan, and TitanDB are registered trademarks of DataStax, Inc. and its subsidiaries in the United States and/or other countries.

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.

landing_page landingpage