title: Log4j appender authentication
body: <p>I understand that I can send log messages from applications which use log4j to Apache Kafka by using the log4j kafka appender. For example,</p>
  
  <pre><code>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
  </code></pre>
  
  <p>This is described here: <a href="https://stackoverflow.com/questions/22034895/how-to-use-kafka-0-8-log4j-appender">how to use Kafka 0.8 Log4j appender</a></p>
  
  <p>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?</p>
  
  <p>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?</p>
  
  <p>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)?</p>