Siddharth Chaurasia
Siddharth Chaurasia

Reputation: 313

Pass Jaas Config to Nifi Consume Kafka at runtime

Can we pass java.security.auth.login.config containing path of JaaS config to consumeKafka processor using a dynamic property without setting it in bootstrap.conf?

Is it possible?

Upvotes: 1

Views: 926

Answers (2)

Vijay Kumar
Vijay Kumar

Reputation: 2717

I was able to pass the "sasl.jaas.config" property value as a dynamic property by clicking on the (plus) + sign and adding this as key and whatever value you want to pass. It worked.

passing jaas config

Upvotes: 0

Bryan Bende
Bryan Bende

Reputation: 18660

That is not possible.

The property "java.security.auth.login.config" is a JVM system property so you can only set that in bootstrap.conf and there can be only one value set for the whole JVM.

The Kafka client accepts a property "sasl.jaas.config" so you should be able to specify a dynamic property in the processor and put that as the name and the JAAS entry as the value (not the path to the jaas file, the actual content of the KafkaClient entry).

However, you shouldn't need to do this. For Kafka processors starting with 0.10 and later there a properties directly in the processor for principal and keytab, or there is a property for a keytab credential service. By specifying the principal and keytab through one of these approaches, it will create the appropriate JAAS entry behind the scenes for you.

Upvotes: 5

Related Questions