Skip to content

Conversation

@vaibhavkhurana2018
Copy link

@vaibhavkhurana2018 vaibhavkhurana2018 commented Apr 27, 2020

This PR is for supporting client to node SSL connectivity from ndbench to cassandra. This accepts 2 variables, truststorePath and truststorePass.

  • Add variable config

  • Update registerCluster method to accept the new variables and do a cluster build with the SSL Options given.

  • Update all the callers for the function

  • Test connectivity with a cassandra cluster with SSL enabled.

Copy link
Contributor

@vinaykumarchella vinaykumarchella left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for submitting the patch, the first pass looks good, left a few comments.

@PropertyName(name = "truststorePath")
String getTruststorePath();

@PropertyName(name = "truststorePass")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@PropertyName annotations here are redundant since the overridden name is not different from the method name

PoolingOptions poolingOpts = new PoolingOptions()
.setConnectionsPerHost(HostDistance.LOCAL, connections, connections)
.setMaxRequestsPerConnection(HostDistance.LOCAL, 32768);
KeyStore ks = null;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You might want to do null check here for truststorePath and truststorePass before constructing sslContext to avoid exceptions during non SSL scenarios.

nit: Good to keep an abstract method for getSSLContext() in CassJavaDriverManagerImpl.java and implement in this since the internal implementation can provide their own way of getting SSLContext in their organizations.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants