Configuring SSL for Client-to-Node Connections
Client-to-node encryption protects in-flight data from client machines to a database cluster using SSL (Secure Sockets Layer) and establishes a secure channel between the client and the coordinator node.
Complete the following procedure on every node in the cluster to configure SSL for client-to-node connections.
|
On a DSE Search node, enabling SSL for the database automatically enables SSL in the DSE Search If the The default location of the Tomcat
|
|
If you are not using the JCE Unlimited Strength Jurisdiction Policy, then make sure that your ticket granting principal does not use |
WARN [StreamConnectionEstablisher:18] 2015-06-22 14:12:18,589 SSLFactory.java (line 162) Filtering out TLS_DHE_RSA_WITH_AES_256_CBC_SHA,TLS_RSA_WITH_AES_256_CBC_SHA,TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA as it isnt supported by the socket
Prerequisites
Create SSL certificates, keystores, and truststores. You can either create local keystore files or use a remote keystore provider.
Procedure
-
Locate the
cassandra.yamlconfiguration file. The location of this file depends on the type of installation:-
Package installations:
/etc/dse/cassandra/cassandra.yaml -
Tarball installations:
<installation_location>/resources/cassandra/conf/cassandra.yaml
-
-
Edit
cassandra.yamland make the following changes in the client_encryption_options to enable SSL:-
Set enabled to
trueto enable SSL. -
Set optional to
false(default) to only allow SSL connections. -
Set require_client_auth to
trueto require two-way host certificate validation.
-
-
Configure the keystore and truststore, depending on whether you are using local keystore files or a remote keystore provider. All settings are configured in the
client_encryption_optionssection of cassandra.yaml:-
Local files: use the following settings.
The
store_typeoption is deprecated. Instead, usekeystore_typeandtruststore_type.client_encryption_options: enabled: true optional: false keystore_type: JKS keystore: <path_to_keystore> keystore_password: <keystore_password> require_client_auth: true truststore_type: JKS truststore: <path_to_truststore> truststore_password: <truststore_password> protocol: ssl algorithm: SunX509 cipher_suites: [TLS_RSA_WITH_AES_128_CBC_SHA] -
Remote keystore provider: use the following settings.
The
store_typeoption is deprecated. Instead, usekeystore_typeandtruststore_type.Unused options can be blank or commented out.
Requires installation of a provider.
client_encryption_options: enabled: true optional: false keystore_type: PKCS12 require_client_auth: true truststore_type: PKCS12 protocol: ssl algorithm: SunX509 cipher_suites: [TLS_RSA_WITH_AES_128_CBC_SHA]- enabled
-
Enables client-to-node encryption.
Default: false
- optional
-
When
optionalis selected, both encrypted and unencrypted connections over native transport are allowed. That is a necessary transition state to facilitate enabling client to node encryption on live clusters without inducing an outage for existing unencrypted clients. Typically, once existing clients are migrated to encrypted connections,optionalis unselected in order to enforce native transport encryption.Default:
false - keystore_type
-
Valid types are
JKS,JCEKS,PKCS11, orPKCS12. For file-based keystores, usePKCS12.DataStax supports
PKCS11as akeystore_typeon nodes withcassandraoradvancedworkloads. Theadvancedworkload support was added for DSE 6.8.2 and later. IfPKCS11is needed, inserver_encryption_optionsorclient_encryption_options, specify thekeystore_typeasPKCS11and thekeystoreasNONE.PKCS11is not supported as atruststore_type.Default:
JKS - keystore
-
Relative path from DSE installation directory or absolute path to the Java keystore (JKS) suitable for use with Java Secure Socket Extension (JSSE), which is the Java version of the Secure Sockets Layer (SSL), and Transport Layer Security (TLS) protocols. The keystore contains the private key used to encrypt outgoing messages.
Default:
resources/dse/conf/.keystore - keystore_password
-
Password for the keystore.
Default:
cassandra - require_client_auth
-
Enables certificate authentication for client-to-node encryption.
-
true - Require certificate authentication for client-to-node encryption. Client certificates must be present on all nodes in the cluster.
-
false - Do not require certificate authentication for client-to-node encryption.
Default: false
-
- truststore_type
-
Valid types are
JKS(default),JCEKS, orPKCS12. For file-based truststores, usePKCS12.Due to an OpenSSL issue, PKCS12 truststores generated with OpenSSL can be incompatible with DSE.
For example, a truststore generated with the following command might not work with DSE:
openssl pkcs12 -export -nokeys -out truststore.pfx -in <intermediate.chain.pem>However, if you generate a truststore with Java’s
keytool, and then convert it to PKCS12, it will work with DSE. For example:-
Create the truststore with
keytool:keytool -importcert -alias <rootca> -file <rootca.pem> -keystore <truststore.jks> -
Import the intermediate certificate:
keytool -importcert -alias <intermediate> -file <intermediate.pem> -keystore <truststore.jks> -
Convert the JKS truststore to PKCS12:
keytool -importkeystore -srckeystore <truststore.jks> -destkeystore <truststore.pfx> -deststoretype pkcs12
-
- truststore
-
Relative path from DSE installation directory or absolute path to truststore containing the trusted certificate for authenticating remote servers.
Truststore password and path is only required when require_client_auth is set to
true.Default:
resources/dse/conf/.truststore - truststore_password
-
Password for the truststore. This must match the password used when generating the keystore and truststore.
Truststore password and path is only required when require_client_auth is set to
true.Default:
cassandra
-
-
Save and close the
cassandra.yamlfile. -
Complete a rolling DSE restart.
See also
- Configuring JMX on the server side
-
Configure JMX on the server side to enable SSL connections.
- Configuring SSL for nodetool, nodesync, dsetool, and Advanced Replication
-
Use
nodetool,nodesync,dsetool, and DSE Advanced Replication with SSL encryption. - Setting up SSL for JConsole (JMX)
-
Use J`Console` with SSL encryption.
- Connecting SSTableloader to a secured cluster
-
Steps (for a development environment) to configure the
sstableloader(bulk loader) with Kerberos or SSL. - Connecting to SSL-enabled nodes using cqlsh
-
Connect
cqlshto an SSL-enabled node by setting up SSL with environment variables orcqlshrcparameters.