-
Notifications
You must be signed in to change notification settings - Fork 102
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
base: master
Are you sure you want to change the base?
Conversation
fb32280
to
7e96547
Compare
There was a problem hiding this 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") |
There was a problem hiding this comment.
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; |
There was a problem hiding this comment.
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.
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.