Skip to main content
mr_jahurley
Gold ⭐️
November 4, 2021
Solved

Trouble adding custom LoginModule to consumeKafkaRecord_2_6 Apache Nifi Flow

I am using the ConsumeKafkaRecord_2_6 processor to consume from kafka. I am trying to use a custom LoginModule. I have both a custom LoginModule and a custom CallbackHandler. I put my two classes in a jar then loaded the jar on the Nifi system. When the processor starts, I get this error: 
Caused by: javax.security.auth.login.LoginException: unable to find LoginModule class: com.eek.my.auth.krb.SauKrbLoginModuleWrapper. I am not sure how to add the jar so that the processor will find my classes. The dynamic property I am adding to reference the custom class is sasl.jaas.config. So the value of that looks like this: sasl.jaas.config=com.eek.my.auth.krb.SauKrbLoginModuleWrapper required krbProvider=com.sun.security.auth.module.Krb5LoginModule;

mr_jahurley
Gold ⭐️
November 5, 2021

After adding the jar to the consumeKafkaRecord NAR and bouncing the servers, I am no longer receiving the error. Now I am able to authenticate to Kafka using the GSSAPI SASL mechanism. 

2 replies

mr_jahurley
Gold ⭐️
November 4, 2021

I am requesting now the nar for the ConsumeKafkaRecord be updated to include my new jar. Not sure if that is the only way for the processor to pick it up. 

Translate
mr_jahurley
mr_jahurleyAuthorAnswer
Gold ⭐️
November 5, 2021

After adding the jar to the consumeKafkaRecord NAR and bouncing the servers, I am no longer receiving the error. Now I am able to authenticate to Kafka using the GSSAPI SASL mechanism. 

Translate