Kafka auth failed while implementing GSSAPI auth in Nodejs app

77 Views Asked by At

I’m currently looking to connect my nodejs app (using kafkajs package) with a kerberised kafka cluster (GSSAPI enabled, openldap) but facing the SASL_AUTHENTICATION_FAILED error when trying to authenticate with a SPNEGO token.

Kafkajs library has no built in support for GSSAPI mechanism. I’m not sure if it’s the right approach but I have come as far as getting a ticket from the openldap server and creating a SPNEGO token (base64) from it but don’t know what approach to take further.

I think encoding is the issue here but I’m a newbie at it and seeking out guidance on how to approach this problem.

1

There are 1 best solutions below

0
Raed On

If using node-rdkafka is an option. It does support SASL as it wrapps librdkafka.

You can find the documentation on using SASL with librdkafka