• 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
  • Securing Spark connections

Securing Spark Connections

Communication between Spark applications and transactional nodes, masters and workers, and intercommunication between Spark drivers and executors can be encrypted. Encryption must be configured individually on each node in the cluster.

Encryption between the Spark processes and DSE is configured by enabling client-to-node encryption in cassandra.yaml.

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

Encryption between Spark applications, including between the Spark master and worker nodes, is configured by enabling Spark security in dse.yaml.

Encryption between the Spark driver and executors in client applications is configured by enabling Spark security in the application configuration properties, or by default in spark-defaults.conf and spark-daemon-defaults.conf in the Spark configuration directory.

The default location of the Spark configuration files depends on the type of installation:

  • Package installations: /etc/dse/spark/

  • Tarball installations: <installation_location>/resources/spark/conf

Procedure

  1. Locate the dse.yaml configuration file. The location of this file depends on the type of installation:

    • Package installations: /etc/dse/dse.yaml

    • Tarball installations: <installation_location>/resources/dse/conf/dse.yaml

  2. Enable mutual authentication and encryption between Spark master and worker nodes in dse.yaml.

    When DSE authentication is enabled with authentication_options in dse.yaml, Spark security is enabled regardless of these settings.

    1. Enable mutual authentication by setting spark_security_enabled to true.

    2. Enable encryption by setting spark_security_encryption_enabled to true.

    spark_security_enabled: true
    spark_security_encryption_enabled: true

    To enable encryption, you must also enable mutual authentication.

  3. To encrypt communication between the Spark application and master, DSE inherits the client to cluster connection encryption options.

  4. The Spark web UI by default uses client-to-cluster encryption settings to enable SSL security in the web interface. To enable SSL security separately from DSE client-to-cluster encryption, change the settings in dse.yaml under spark_ui_options. Set encryption to custom, then set the keystore settings in encryption_options.

    The Spark web UI server automatically discards all cipher algorithms that end with a suffix SHA, SHA1 or MD5. If you manually specify cipher suites for encryption, make sure the specified cipher suites are not ignored by the server and are supported by the web browsers used to access the Spark web UI. For example, two 256 bit cipher suites that are supported by both the server and current web browsers are TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 and TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384.

  5. The AlwaysOn SQL server can optionally use SSL to encrypt client connections.

  6. Restart the node to recognize the changes.

  7. For each Spark application, set the following client encryption options to true in the spark-defaults.conf file to enable encryption between the Spark driver and executors.

    Option Description

    spark.authenticate

    Enables or disables mutual authentication using a secret key. The default is false.

    spark.authenticate.enableSaslEncryption

    Enables or disables SASL encryption between a Spark driver and its executors. The default is false.

    spark.io.encryption.enabled

    Enables or disables encryption for data stored by drivers directly on disk.

    To enable encryption by default for all Spark applications, modify the options in the spark-defaults.conf file in the Spark configuration directory. To encrypt data stored on the server by default, modify the options in the spark-daemon-defaults.conf file.

    Option Description

    spark.io.encryption.enabled

    Enables or disables encryption for data stored by executors and shuffle services directly on disk.

Reference: SSL instruction variables

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