-
Notifications
You must be signed in to change notification settings - Fork 1.4k
ssl: Support using client-side SSL certificates, closes #253 and #447 #474
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
Conversation
…pkp#447 Kafka 0.9.0+ supports using SSL encrypted connections authenticated with client certificates. This adds support for these. After this when using SSL/TLS for Kafka broker connections, TLSv1.0+ is used for authentication, protocols earlier than that are deprecated from the get go as insecure. If keyfile/certificate are left empty, the client can still use SSL/TLS for the transport, but in that case the server must be configured to accept unauthenticated users.
|
I'm going to hold off on this for now -- would prefer to include along with a larger 0.9 support release |
|
Well the previous user code would still work with 0.8 as well without any client changes since the commit is backwards compatible and SSL needs to be turned on explicitly for anything to change. But if you do want a larger 0.9 supporting release what features would you actually like to see in it? |
|
Yes, I agree that this could be merged w/o breaking 0.8 support. But I think kafka-python needs a quick maintenance release now, and then plan to follow on with a version bump and add 0.9 feature support. I think it will be easier for everyone if we keep maintenance / bug fixes separate from the new features. 0.9 client release should include: SSL (this PR), Consumer Group APIs (in progress), Metrics (another open PR, needs a little work). Consumer Group work also includes a fairly substantial refactor of the protocol layer. Hope to get this pushed out in the next week or two. |
|
Ok, sounds fine, thanks for the info. |
|
Hi @dpkp, Now that version 1.0 has been released, is it possible to push the 0.9 features ( and especially this one ) forward? We would be happy to assist if needed. |
|
Yes! Thanks for the ping. I have a local branch that ports your code to the
|
|
I read through your branch and it looks ok from my POV. Any chances of getting it merged? |
|
I haven't done a lot of testing on that branch, but I am happy to merge if it seems sane. |
|
I finally tried this (and the the rest of the recent client changes) out but unfortunately couldn't make it work. One thing I did notice while trying to get the new client to work was that missing from these changes are at least config keywords from KafkaConsumer and KafkaProducer since it'll raise an error if any of the new ssl_* config keywords are defined. The point where it fails for me is in the SSL handshake: (added a log.exception there) Traceback (most recent call last): After this I tried seeing if it'd work with the latest git master but the patch no longer applies cleanly. Anyway, the ssl_* config keywords should be added to the KafkaConsumer and KafkaProducer and the commit should be rebased on top of master. I'm not quite sure what's going wrong with the handshake since the certs/keys/ca's are identical to what I've been using with my original version of the SSL patch. |
|
Thanks -- I will update and push a new PR so testing can be more explicit. |
|
Moved to #621 |
Kafka 0.9.0+ supports using SSL encrypted connections authenticated
with client certificates. This adds support for these. After this
when using SSL/TLS for Kafka broker connections,
TLSv1.0+ is used for authentication, protocols earlier than that are
deprecated from the get go as insecure.
If keyfile/certificate are left empty, the client can still use
SSL/TLS for the transport, but in that case the server must be
configured to accept unauthenticated users.