Support Questions

Find answers, ask questions, and share your expertise

Kafka Ranger authentication with username/password

New Contributor

We would like to be able to authenticate users to our kafka cluster with simple username/password.

We installed HDF- Kafka, kerberized the cluster, installed ranger + kafka-plugin and added a user 'test'.
We set

sasl.enabled.mechanisms=GSSAPI, PLAIN

in kafka to allow the cluster to use kerberos and clients to use PLAIN authentication.

But this does not work.

The console-producer logs

INFO Successfully logged in. ( 

and after a while:

ERROR Error when sending message to topic testtopic2 with key: null, value: 28 bytes with error: (org.apache.kafka.clients.producer.internals.ErrorLoggingCallback)
org.apache.kafka.common.errors.TimeoutException: Failed to update metadata after 60000 ms.
INFO Closing the Kafka producer with timeoutMillis = 9223372036854775807 ms. (org.apache.kafka.clients.producer.KafkaProducer)

In the meantime it continuously tries to connect to the kafka hosts.

The producer properties are:


and our kafka_client_jaas.conf look like this:

KafkaClient { required

What is going wrong here or is it simply not possible to use username/password authentication with the kafka ranger plugin?

Kind Regards



New Contributor

Hi. We're struggling with the same usecase. Did you manage to find a solution?