Configure TLS on kafka

We can configure kafka which is deployed as part of the hybrid runtime setup to use TLS for all producers.

Steps:

  1. Create openssl-san.cnf file with the content below. This file configures the SAN for the certificates we will create in the next step.

[ req ]
distinguished_name = req_distinguished_name
req_extensions = v3_req
prompt = no

[ req_distinguished_name ]
CN = kafka-broker

[ v3_req ]
basicConstraints = CA:FALSE
keyUsage = digitalSignature, keyEncipherment
extendedKeyUsage = serverAuth
subjectAltName = @alt_names

[ alt_names ]
DNS.1 = akto-mini-runtime-mini-runtime.default.svc.cluster.local
  1. Create certificates stores and certificate authority. The script below will create ca-cert.pem, server.keystore.jks and server.truststore.jks.

  1. Crete secret in kubernetes cluster to store these certificates.

  1. Install the helm chart for hybrid-saas and add the following attribute at the end of the helm install command. This will configure kafka to use TLS on port 9093.

  1. Configure producers to use TLS.

    1. Traffic connectors which are generally deployed as daemonsets need to be configured to use TLS to send data to the kafka broker. Here is the updated configuration for the kubernetes connector. Here, we've mounted the ca-cert.pem file on the file system for the daemonset.

    1. Similar configuration can also be added to the eBPF traffic connector.

Note:

  1. You can disable hostname verification as well by adding INSECURE_SKIP_VERIFY environment variable in the traffic connector and setting its value as true.

  2. You might need to change the value of DNS.1 based on your deployment in step 4. In that case, recreate the certificates after deploying the helm chart and use them.

  3. To customize the helm chart you may take reference from helm-charts.

Get Support for your Akto setup

There are multiple ways to request support from Akto. We are 24X7 available on the following:

  1. In-app intercom support. Message us with your query on intercom in Akto dashboard and someone will reply.

  2. Join our discord channel for community support.

  3. Contact [email protected] for email support.

  4. Contact us here.

Last updated

Was this helpful?