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

Datastax Java Driver TLS Support #57

Closed
magnusart opened this issue May 31, 2015 · 14 comments
Closed

Datastax Java Driver TLS Support #57

magnusart opened this issue May 31, 2015 · 14 comments
Milestone

Comments

@magnusart
Copy link
Contributor

Hi

I poked around in the code and could not find any support for TLS (SSL). Is this planned or excluded on purpose? When running Cassandra in the Cloud it feels like a good idea to have traffic encrypted.

It looks as if the DataStax driver has support for this already so adding the configuration setting clusterBuilder.withSSL() in CassandraPluginConfig would work.

The enables the user to supply keystore+truststore with JSSE. Of course full configurability is even nicer.

How to set this up with the DataStax driver is described in a blogpost:
http://www.datastax.com/dev/blog/accessing-secure-dse-clusters-with-cql-native-protocol

I can give this a try and contribute on this if you wish to have some help.

@krasserm
Copy link
Owner

krasserm commented Jun 1, 2015

Hi Magnus,

thanks for offering help. @elmalto started working on it and created pull request #53. @elmalto are you still planning to continue with it?

@magnusart
Copy link
Contributor Author

Cool. I actually did a quick test last night by adding the withSSL() and adding the JSSE runtime JVM parameters to spray-revolver, but it didn't work out of the box with my setup.

I could continue on the work started by @elmato and test it if he is occupied.

@krasserm
Copy link
Owner

krasserm commented Jun 1, 2015

@magnusart sound good to me!

@elmato
Copy link

elmato commented Jun 2, 2015

@magnusart i think you are referring to @elmalto (Yes .. tricky nick names :) )

@malterb
Copy link

malterb commented Jun 2, 2015

Hey @magnusart, it would be amazing if you could continue it. I currently don't know when I would find time for it :)

@magnusart
Copy link
Contributor Author

@elmalto I gave it a go already yesterday. :)

I refactored the a bit, basically to close the input streams. But I could not get the SSL connection to happen.

In the Cassandra logs I get a message that claims the data sent was not a SSL-handshake and when I look at the data being sent it is "CQL3.0". Did you successfully test SSL-connection?

I can connect to my cluster using the DataStax DevCenter with the same truststore/keystore successfully. So I believe my setup is OK.

Will try to debug a bit tonight, did not have time yesterday. Hoping it is just something simple, like a config error.

@malterb
Copy link

malterb commented Jun 2, 2015

@magnusart it works, but on other projects I've had issues with getResource. I think it will silently fall back to not using your provided keystore if it doesn't find the file

@magnusart
Copy link
Contributor Author

@elmalto thanks, as I suspected I had some strange state where my project did not accept my locally published version (even when using -SNAPSHOT). I actually already fixed the JKS when file not found. I throw an error if the path is incorrect.

@kasserm I have created a new pull request

Pull request: #59

@krasserm krasserm modified the milestone: 0.3.9 Jun 10, 2015
@magnusart
Copy link
Contributor Author

Hi

Would you mind publishing a SNAPSHOT version with this included? I want to use this for dev and I'd rather like to track your repo than publish it by myself.

@krasserm
Copy link
Owner

Bintray doesn't allow publication of snapshot versions. I initially planned to do further work on this plugin before making the next release. But if you'd like I can cut a 0.3.9 release next week. Please let me know.

@magnusart
Copy link
Contributor Author

Hi, that would be great if it is not too much work.

By the way. After looking a bit more I have added an issue at cassandra-unit to see if I can get some answers around wether they support SSL: jsevellec/cassandra-unit#126

@krasserm
Copy link
Owner

@magnusart 0.3.9 containing your changes is released.

@magnusart
Copy link
Contributor Author

Many thanks!

@krasserm
Copy link
Owner

You're welcome. Thank you for your contribution!

rafalsiwiec pushed a commit to rafalsiwiec/akka-persistence-cassandra that referenced this issue Mar 23, 2016
…s-SamanSattari

[krasserm#46] make metric registry of cassandra available for each connection…
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

No branches or pull requests

4 participants