Use SSL with DSBulk
How you use SSL encrypted connections with DSBulk depends on your database platform.
-
DSE
-
Astra DB
-
Pass
--driver.advanced.ssl-engine-factory.*options to the Java driver used by DSBulk.You can do this on the command line, but DataStax recommends using a configuration file.
For example, in your configuration file, you can enclose the Java driver configuration options in a
datastax-java-driverblock:datastax-java-driver { advanced { ssl-engine-factory { keystore-password = "cassandra" keystore-path = "/Users/myaccount/tmp/ssl/keystore.node0" class = DefaultSslEngineFactory truststore-password = "dse#r0cks!" truststore-path = "/Users/myaccount/tmp/ssl/truststore.node0" } } }Alternatively, you can create a separate configuration file, such as
driver.conf, that contains all thedatastax-java-driverproperties. Then, reference that file in your primary DSBulk configuration file using HOCON-formatted file inclusions, such asinclude classpath("driver.conf"). For more information, see Configuration file syntax. -
Recommended: Add connection options and authentication options to your DSBulk configuration files.
-
Store your configuration files in the
confdirectory of your DSBulk installation, or use the-foption to select the primary configuration file from another location.The following example selects a configuration file relative to the current working directory. If there are multiple DSBulk configuration files, the selected file must have
includestatements referencing the other files.dsbulk load -f "../my-application.conf" -url file1.csv -k ks1 -t table1
For Astra DB connections, the --driver.basic.cloud.secure-connect-bundle (-b) option enables SSL encryption automatically.
The driver extracts the required certificates and keys from the SCB, and it ignores all --driver.advanced.ssl-engine-factory.* options.
DataStax recommends that you store connection options and authentication options in a DSBulk configuration file.