Stratio / spark-rabbitmq

RabbitMQ Spark Streaming receiver
Apache License 2.0
208 stars 84 forks source link

Add possibility to specify SSL protocol #109

Open jniebuhr opened 7 years ago

jniebuhr commented 7 years ago

Fixes #107

nelsou commented 7 years ago

if (useSslConnection(params)) { factory.useSslProtocol(getSslProtocol(params)) }

shouldn't it be in the addConnection instead of the getChannel ?

jniebuhr commented 7 years ago

It seems to be a global setting which is not used on the connection but on the factory. So I assumed this was the right spot.

compae commented 7 years ago

Could you add some tests?? I think that you need to initialize the keyManager and the trustManager...

jniebuhr commented 7 years ago

Yes, I'll do that

jniebuhr commented 7 years ago

If the test should be some kind of integration test, you'll need to change the jenkins setup to include some RabbitMQ with SSL

jniebuhr commented 7 years ago

I've added the tests now. The image I used was https://github.com/roboconf/rabbitmq-with-ssl-in-docker I had to change fail_if_no_peer_cert to false though, which makes sense.

jniebuhr commented 7 years ago

A TrustManager instance is added automatically by the driver. I didn't find anything about a KeyManager in the docs, but I assume you'll need that one for client cert auth.