Connecting to a Secure Kafka

Connecting to a secure Kafka cluster may be difficult, but hopefully, this page will help you. Conduktor inherits the permissions of the user that connects to Kafka.

YouTube video walkthrough

General Idea

Conduktor leverages the default Apache Kafka Java Clients, and therefore we use the same configuration properties. If you are trying to connect to a secure Kafka cluster using Conduktor, please first try to use the CLI. If you don't know how, please contact your administrator.


kafka-console-consumer \
--topic my-topic \
--bootstrap-server SASL_SSL://kafka-url:9093 \

Your file may contain something like this:


What Conduktor needs to connect to a secure Kafka cluster is all the values from your file.

In case you don't know what should be the values in the file, please contact your Kafka administrator.

Note: these are the same properties you would use in your Kafka Java clients or applications.

SSL Configuration

If client authentication is not required by the broker, the following is a minimal configuration example:


If client authentication is required, then a keystore must be created for each client, and the brokers’ truststores must trust the certificate in the client’s keystore. Please ask your Kafka administrator for help on generating client keys. Here is a configuration example:


Other configuration settings that may also be needed depending on our requirements and the broker configuration:

  1. ssl.provider (Optional). The name of the security provider used for SSL connections. Default value is the default security provider of the JVM.

  2. ssl.cipher.suites (Optional). A cipher suite is a named combination of authentication, encryption, MAC and key exchange algorithm used to negotiate the security settings for a network connection using TLS or SSL network protocol.

  3. ssl.enabled.protocols=TLSv1.2,TLSv1.1,TLSv1. It should list at least one of the protocols configured on the broker side

  4. ssl.truststore.type=JKS

  5. ssl.keystore.type=JKS

Please make sure to put the full paths to your SSL certificates in your properties file Relative paths may not work for Conduktor.

SASL Configuration

Multiple SASL configurations can be done for Apache Kafka and Conduktor supports them all. In this documentation we will just cover Kerberos, but you should get a general sense of how things work.

Here's a minimal configuration for SASL_PLAINTEXT:

sasl.mechanism=GSSAPI required username="my-user" password="secret";

SCRAM configuration

Use this configuration in Conduktor:

sasl.mechanism=SCRAM-SHA-512 required username="yyy" password="xxx";

🚨 About JAAS files

If you see a JAAS file being passed as a Java option to your Kafka clients using

then you must you the sasl.jaas.config property as outlined above in Conduktor.

Example: the following JAAS file:

KafkaClient { required

Would be converted to the following sasl.jaas.config property: required username="alice" password="alice-secret";

Please make sure to put the full paths to your SASL key files in your properties file Relative paths may not work for Conduktor.

Example using Kerberos

Another example using Kerberos and a keytab:

  • a JAAS file (would need

KafkaClient { required
principal="[email protected]";
  • The same, but using sasl.jaas.config:
required useKeyTab=true
principal="[email protected]";

Windows and paths

If you're using Windows, you may have to use slash '/' instead of backslash '\' to make the connection work. Here is an example when configuring a kerberos connection:

security.protocol=SASL_SSL required
useKeyTab=true keyTab='c:/myfolder/keytab.ktf'
principal=’[email protected]';

ERR: Illegal char <:>

If you stumbled upon this error, it means you used the "\" character in the paths (the error shows "/" but it's wrong) :

Illegal char <:> at index 2: ‪C:/myfolder/key.root.jks

ERR: No Such File

If you see this error, and you are sure the path is right, try to remove the whole line and retype it yourself. You may have inserted invisible characters during copy/paste like from a Unix system (\r).

Failed to load SSL keystore keystore.jks‪ of type JKS
Caused by: java.nio.file.NoSuchFileException: c:/myfolder/keystore.jks‪

Can you help us with security troubleshooting?

Unfortunately, we cannot provide support to help you connect to your secure cluster besides what's included in the documentation. Your Kafka administrator will have the answer to your problem, please send them the link to this documentation page. Thank you!