Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds ssl capability for cassandra connectivity #247

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

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