Clients may configure JAAS using the client configuration property sasl.jaas.config or using the static JAAS config file similar to brokers.JAAS configuration using client configuration propertyhtml
Clients may specify JAAS configuration as a producer or consumer property without creating a physical configuration file. This mode also enables different producers and consumers within the same JVM to use different credentials by specifying different properties for each client. If both static JAAS configuration system property java.security.auth.login.config
and client property sasl.jaas.config
are specified, the client property will be used.java
See GSSAPI (Kerberos), PLAIN, SCRAM or OAUTHBEARER for example configurations.apache
1
2
3
4
5
6
7
|
KafkaClient {
com.sun.security.auth.module.Krb5LoginModule required
useKeyTab=true
storeKey=true
keyTab="/etc/security/keytabs/kafka_client.keytab"
principal="kafka-client-1@EXAMPLE.COM";
};
|
1
|
-Djava.security.auth.login.config=
/etc/kafka/kafka_client_jaas
.conf
|