create_ssl_context

kafkit.ssl.create_ssl_context(*, cluster_ca_path: pathlib.Path, client_cert_path: pathlib.Path, client_key_path: pathlib.Path) → ssl.SSLContext

Create an SSL context for a client connecting to secured Kafka brokers.

Parameters:
  • cluster_ca_path (pathlib.Path) – Path to the cluster CA certificate.
  • client_cert_path (pathlib.Path) – Path to the client certificate.
  • client_key_path (pathlib.Path) – Path to the client key.
Returns:

An SSL context for a Kafka client.

Return type:

ssl.SSLContext