kafka-python icon indicating copy to clipboard operation
kafka-python copied to clipboard

Advice needed. How to connect to Kafka with Private Key Certificate

Open gn4711 opened this issue 2 years ago • 2 comments

Sry to ask this question. But im failing looking for example how to connect to Kafka when i have:

  • Key file (as PFX)
  • Password for Key File
  • a Username which must be used for use with the certificate

The key file contains a longer chain:

  • CA Root
  • Intermediate Service
  • Issuing Service
  • the key certificate

Any pointers / hints welcome. Thx in advance.

gn4711 avatar Jan 16 '24 12:01 gn4711

Sry to ask this question. But im failing looking for example how to connect to Kafka when i have:

  • Key file (as PFX)
  • Password for Key File
  • a Username which must be used for use with the certificate

The key file contains a longer chain:

  • CA Root
  • Intermediate Service
  • Issuing Service
  • the key certificate

Any pointers / hints welcome. Thx in advance.

Hello! I have the same situation now, tell me, did you figure it out?

HoneyBebra avatar Sep 11 '24 12:09 HoneyBebra

I was able to get it via keystore explorer. but sadly, i left the project and have no project documenation left. but when i remember right, i exported it using this tool, and created a root file and a "last" file in the chain. and i exported the key file. but important, dont use the origin "windows" format, only use files created by tool. in other words. import the pfx into the tool and take only the artefacts from the export to try it out.

gn4711 avatar Sep 12 '24 20:09 gn4711

kafka-python passes config directly to python's ssl module (load_cert_chain). If you need assistance, perhaps consult python ssl docs more generally.

dpkp avatar Mar 16 '25 16:03 dpkp