title: Login module control flag is not available in the JAAS config - Scala Kafka
body: <p>Running into issues when trying to use kerberos auth with connecting to Kafka. Using scala and my <code>jaas.config</code> looks something like this. </p>
  
  <pre><code> KafkaClient { &lt;br /&gt;
          com.sun.security.auth.module.Krb5LoginModule required &lt;br /&gt;
          useKeyTab=true&lt;br /&gt;
          keyTab="/etc/security/keytabs/storm.service.keytab"&lt;br /&gt;
          storeKey=true&lt;br /&gt;
          useTicketCache=false&lt;br /&gt;
          serviceName="kafka"&lt;br /&gt;
          principal="storm@EXAMPLE.COM";&lt;br /&gt;
          debug=true&lt;br /&gt;
          client=true; };&lt;br /&gt;
  
  Exception in thread "main" org.apache.kafka.common.KafkaException: Failed to construct kafka consumer  
      at org.apache.kafka.clients.consumer.KafkaConsumer.&lt;init&gt;(KafkaConsumer.java:799)  
      at org.apache.kafka.clients.consumer.KafkaConsumer.&lt;init&gt;(KafkaConsumer.java:615)  
      at org.apache.kafka.clients.consumer.KafkaConsumer.&lt;init&gt;(KafkaConsumer.java:596)  
      at org.apache.spark.sql.kafka010.SubscribeStrategy.createConsumer(ConsumerStrategy.scala:62)  
      at org.apache.spark.sql.kafka010.KafkaOffsetReader.createConsumer(KafkaOffsetReader.scala:314)  
      at org.apache.spark.sql.kafka010.KafkaOffsetReader.&lt;init&gt;(KafkaOffsetReader.scala:78)  
      at
   org.apache.spark.sql.kafka010.KafkaSourceProvider.createContinuousReader(KafkaSourceProvider.scala:130)
  at org.apache.spark.sql.kafka010.KafkaSourceProvider.createContinuousReader(KafkaSourceProvider.scala:43)  
      at org.apache.spark.sql.streaming.DataStreamReader.load(DataStreamReader.scala:185)
      at com.gm.SparkDataIngest.Main$.main(Main.scala:119)
      at com.gm.SparkDataIngest.Main.main(Main.scala)  
  
  Caused by: java.lang.IllegalArgumentException: Login module control flag is not available in the JAAS config  
      at org.apache.kafka.common.security.JaasConfig.loginModuleControlFlag(JaasConfig.java:85)
      at org.apache.kafka.common.security.JaasConfig.parseAppConfigurationEntry(JaasConfig.java:111)
      at org.apache.kafka.common.security.JaasConfig.&lt;init&gt;(JaasConfig.java:63)
      at org.apache.kafka.common.security.JaasContext.load(JaasContext.java:148)
      at org.apache.kafka.common.security.JaasContext.loadClientContext(JaasContext.java:142)
      at org.apache.kafka.common.network.ChannelBuilders.create(ChannelBuilders.java:119)
      at org.apache.kafka.common.network.ChannelBuilders.clientChannelBuilder(ChannelBuilders.java:65)
      at org.apache.kafka.clients.ClientUtils.createChannelBuilder(ClientUtils.java:88)
      at org.apache.kafka.clients.consumer.KafkaConsumer.&lt;init&gt;(KafkaConsumer.java:713)
  </code></pre>