We have a few Kafka topics to consume in Pega; however, each topic has access to a different keytab file. Essentially, the keytab is not the same for all topics.
For example, kafka_topic1 has access to kafka_keytab1, and kafka_topic2 has access to kafka_keytab2. We need to consume these two topics in the same Pega application, and the keytab files are located in the same server location.
I have attempted to set up two JAAS configurations in the JVM settings as follows, but Pega does not recognize the second JAAS configuration for the second topic.
The configuration for the first client is -djava.security.auth.login.config=xxx/jaas1.conf, and for the second client, it’s -djava.security.auth.login.config=xxx/jaas2.conf.
Java security properties file will allow multiple configurations
2. In the Java security properties file.
An alternate approach to specifying the location of the login configuration file is to indicate its URL as the value of a login.config.url.n property in the security properties file.
Basically, you can create two Kafka rules for this, such as kafka_abc and kafka_xyz. Thereafter, create two Kafka client properties files as below. All JAAS file configurations can be included in sasl.jaas.config. However, make sure to follow the format below.