I understand that I can send log messages from applications which use log4j to Apache Kafka by using the log4j kafka appender. For example,
log4j.appender.KAFKA_HIVE_AUDIT=kafka.producer.KafkaLog4jAppender
log4j.appender.KAFKA_HIVE_AUDIT.BrokerList=sandbox.hortonworks.com:6667
log4j.appender.KAFKA_HIVE_AUDIT.Topic=hive_audit_log
log4j.appender.KAFKA_HIVE_AUDIT.layout=org.apache.log4j.PatternLayout
log4j.appender.KAFKA_HIVE_AUDIT.layout.ConversionPattern=%d{ISO8601} %-5p [%t]: %c{2} (%F:%M(%L)) - %m%n
This is described here: how to use Kafka 0.8 Log4j appender
I'm running Kafka 0.9 which has kerberos enabled. Is there a way to have the log4j appender perform authentication to Kafka? Some kind of service account?
Is there a way to for the machine which the java program is running on to authenticate to the Kafka cluster via kerberos before running the log4j appender?
If that doesn't work, is there a way to grant write privileges to unauthenticated producers on kerberized Kafka by machine? (And still require kerberos authentication for consumers)?