Connecting to Azure Cosmos Db Cassandra



I'm having problem connecting to Azure Cosmos db cassandra

Has anyone succeeded in connecting to this database?

Java is not my strongest language but by comparing the code in the datagrip jdbc cassandra driver and the azure example




The thing that differs is the sslOptions in the azure example is not available for datagrip.

final SSLContext sc = SSLContext.getInstance("TLSv1.2");
sc.init(kmf.getKeyManagers(), tmf.getTrustManagers(), new;

JdkSSLOptions sslOptions = RemoteEndpointAwareJdkSSLOptions.builder()
cluster = Cluster.builder()
.withCredentials(cassandraUsername, cassandraPassword)

 But in the datagrip connector we only have:

if (sslEnabled) {

Does anyone know how to solve this issue?

Thank in advance

// Niklas

1 comment
Comment actions Permalink

Hi Niklas,

`if (sslEnabled) builder.withSSL()` was recently added to Cassandra. New driver version is not yet available in DataGrip.

You may try the following:

1. Download new Cassandra driver

2. Add it as custom driver

3. Create data source using your custom driver

4. Add `sslenabled` option to url on Data Sources and Drivers panel, e.g.: `jdbc:cassandra://localhost:9042/?sslenabled=true`

5. Specify truststore and optional keystore using vm options (see docs here You can specify vm options in `VM options` field on `Advanced` tab.

I hope it will help!


Note that `SSH/SSL` tab is not working for Cassandra. We are now fixing it.



Please sign in to leave a comment.