Additional settings file in Kafka message client
What is the format of the additinal settings file which needs to be used when security protocol is SASL_PLAINTEXT and SASL_SSL. I tried creating a file with extension as .config with following values in the file ,
KafkaClient {
org.apache.kafka.common.security.plain.PlainLoginModule required
username="admin"
password="admin-secret";
};
But i keep getting the error "Could not find a Kafka client entry in the JAAS configuration". Please let me know how the additional settings file needs to be setup and what is the extension of the file to be used to over come this error.
Answers
-
Are you referring to "Additional Settings File Path"?
The docs say "Specify a properties file containing additional settings that may be required to connect to your application."You can find some detail about the properties file format here: https://en.wikipedia.org/wiki/.properties
High level, a properties file contains name-value pairs. Each pair is on its own line. Each name and value are typically separated by the equals sign but colon is also sometimes used. The backslash character is used as an escape character.
All the properties recognized by Kafka are described in the Kafka documentation:
https://kafka.apache.org/documentation/#configurationYou may notice their docs say "Kafka uses key-value pairs in the property file format for configuration."
0 -
Concerning JAAS configuration, the config file for that is plugins/com.parasoft.ptest.libs.web_{ver}/root/kerberos.config
Detail about the file format can also be found here:
https://docs.oracle.com/en/java/javase/11/security/appendix-b-jaas-login-configuration-file.htmlHowever, for Kafka clients, it looks like you can configure a "sasl.jaas.config" property instead:
https://kafka.apache.org/documentation/#security_sasl_plain_clientconfigNotice how their example uses backslash to provide a multi-line value for the "sasl.jaas.config" property.
0