<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>question Re: Integrate kerberos with kafka in hbase coprocessor in Archives of Support Questions (Read Only)</title>
    <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Integrate-kerberos-with-kafka-in-hbase-coprocessor/m-p/60187#M67913</link>
    <description>Thanks, It help me to solve my problem!</description>
    <pubDate>Wed, 20 Sep 2017 19:41:08 GMT</pubDate>
    <dc:creator>Flore</dc:creator>
    <dc:date>2017-09-20T19:41:08Z</dc:date>
    <item>
      <title>Integrate kerberos with kafka in hbase coprocessor</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Integrate-kerberos-with-kafka-in-hbase-coprocessor/m-p/59847#M67911</link>
      <description>&lt;P&gt;hi:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I want to integrate&amp;nbsp;kerberos with kafka in hbase coprocessor and I could not autenticate inside the application. I am getting this error:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;Caused by: java.lang.IllegalArgumentException: You must pass java.security.auth.login.config in secure mode.&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;at org.apache.kafka.common.security.kerberos.Login.login(Login.java:289)&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;at org.apache.kafka.common.security.kerberos.Login.&amp;lt;init&amp;gt;(Login.java:104)&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;at org.apache.kafka.common.security.kerberos.LoginManager.&amp;lt;init&amp;gt;(LoginManager.java:44)&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;at org.apache.kafka.common.security.kerberos.LoginManager.acquireLoginManager(LoginManager.java:85)&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;at org.apache.kafka.common.network.SaslChannelBuilder.configure(SaslChannelBuilder.java:55)&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;... 14 more&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;This is part of my coprocessor postput code:&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;SparkConf conf = new SparkConf().setAppName("Coprocessor").setMaster("local[1]");&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;JavaSparkContext sc = new JavaSparkContext(conf);&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;sc.getConf().set("spark.yarn.principal","user@EXAMPLE.COM");&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;sc.getConf().set("spark.yarn.keytab", "/home/user/user.keytab");&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;sc.getConf().set("spark.yarn.credentials.file", "credential_file");&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;Properties props = new Properties();&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;props.put("bootstrap.servers", "server.com:9092");&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;props.put("client.id", "client-id-coprocessor");&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;props.put("key.serializer", StringSerializer.class.getName());&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;props.put("value.serializer", StringSerializer.class.getName());&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;props.put("security.protocol","SASL_PLAINTEXT");&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;props.put("sasl.kerberos.service.name", "kafka");&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;KafkaProducer&amp;lt;String, String&amp;gt; producer = new KafkaProducer&amp;lt;String, String&amp;gt;(props);&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;ProducerRecord&amp;lt;String, String&amp;gt; message = new ProducerRecord&amp;lt;String, String&amp;gt;(KAFKA_TOPIC,"key", "this is a simple message");&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;producer.send(message);&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;producer.close();&lt;/EM&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 16 Sep 2022 12:14:02 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Integrate-kerberos-with-kafka-in-hbase-coprocessor/m-p/59847#M67911</guid>
      <dc:creator>Florentin</dc:creator>
      <dc:date>2022-09-16T12:14:02Z</dc:date>
    </item>
    <item>
      <title>Re: Integrate kerberos with kafka in hbase coprocessor</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Integrate-kerberos-with-kafka-in-hbase-coprocessor/m-p/60004#M67912</link>
      <description>&lt;P&gt;Regarding how to make Spark work with Kerberos enabled Kafka, please refer to Cloudera engineering blog:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://blog.cloudera.com/blog/2017/05/reading-data-securely-from-apache-kafka-to-apache-spark/" target="_blank"&gt;https://blog.cloudera.com/blog/2017/05/reading-data-securely-from-apache-kafka-to-apache-spark/&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;There are explainations on p&lt;SPAN&gt;rerequisites&lt;/SPAN&gt;, solution and sample code.&lt;/P&gt;</description>
      <pubDate>Sun, 17 Sep 2017 05:43:24 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Integrate-kerberos-with-kafka-in-hbase-coprocessor/m-p/60004#M67912</guid>
      <dc:creator>Yuexin Zhang</dc:creator>
      <dc:date>2017-09-17T05:43:24Z</dc:date>
    </item>
    <item>
      <title>Re: Integrate kerberos with kafka in hbase coprocessor</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Integrate-kerberos-with-kafka-in-hbase-coprocessor/m-p/60187#M67913</link>
      <description>Thanks, It help me to solve my problem!</description>
      <pubDate>Wed, 20 Sep 2017 19:41:08 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Integrate-kerberos-with-kafka-in-hbase-coprocessor/m-p/60187#M67913</guid>
      <dc:creator>Flore</dc:creator>
      <dc:date>2017-09-20T19:41:08Z</dc:date>
    </item>
    <item>
      <title>Re: Integrate kerberos with kafka in hbase coprocessor</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Integrate-kerberos-with-kafka-in-hbase-coprocessor/m-p/61422#M67914</link>
      <description>&lt;P&gt;Hi Flore,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;We are blocked due to Co-Processor issue in Kerberos environment. It would be great if you can explain bit detail about the steps you have done for running co-processor in Kerberos Environment.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Below are the few points.&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;a) Which Keytab you have used, whether CM generated keytab or user keytab generated by you?&lt;/LI&gt;&lt;LI&gt;b) Path of your jaas.conf and keytab for Kafka?&lt;/LI&gt;&lt;LI&gt;c) How Kafka Kerberos configuration parameters set?&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am able to execute my coprocessor code in Non Kerberos cluster but in getting error&amp;nbsp; "org.apache.kafka.common.KafkaException: Jaas configuration not found" while running the code inside the co-processor in Kerberos environment.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Sumanta&lt;/P&gt;</description>
      <pubDate>Wed, 01 Nov 2017 07:07:46 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Integrate-kerberos-with-kafka-in-hbase-coprocessor/m-p/61422#M67914</guid>
      <dc:creator>Suku123</dc:creator>
      <dc:date>2017-11-01T07:07:46Z</dc:date>
    </item>
    <item>
      <title>Re: Integrate kerberos with kafka in hbase coprocessor</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Integrate-kerberos-with-kafka-in-hbase-coprocessor/m-p/63852#M67915</link>
      <description>&lt;P&gt;We got the working pointing to the HBase keytab, ensuring that the jaas.conf exists on each master/region server.&lt;/P&gt;&lt;P&gt;&amp;nbsp; And my coprocessor produces messages to a secure Kafka topic.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Of course you need to have the master/region server pointing to the jaas.conf file...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;ie. Master and region Java configuration...&lt;/P&gt;&lt;P&gt;-D&lt;SPAN&gt;java.security.auth.login.config&lt;/SPAN&gt;=/etc/hbase/jaas.conf&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 19 Jan 2018 23:37:25 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Integrate-kerberos-with-kafka-in-hbase-coprocessor/m-p/63852#M67915</guid>
      <dc:creator>Rjkoop</dc:creator>
      <dc:date>2018-01-19T23:37:25Z</dc:date>
    </item>
    <item>
      <title>Re: Integrate kerberos with kafka in hbase coprocessor</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Integrate-kerberos-with-kafka-in-hbase-coprocessor/m-p/63966#M67916</link>
      <description>Hi Suku:&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;I response some of your questions:&lt;BR /&gt;&lt;BR /&gt;a) Which Keytab you have used, whether CM generated keytab or user keytab&lt;BR /&gt;generated by you?&lt;BR /&gt;&lt;BR /&gt;I used kafka.keytab&lt;BR /&gt;&lt;BR /&gt;b) Path of your jaas.conf and keytab for Kafka?&lt;BR /&gt;&lt;BR /&gt;Path of kafka.keytab in /etc/security/keytabs/&lt;BR /&gt;&lt;BR /&gt;c) How Kafka Kerberos configuration parameters set?&lt;BR /&gt;&lt;BR /&gt;The following is the configuration of Kafka parameters and the the form to&lt;BR /&gt;use the jaas parameter.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Properties props = new Properties();&lt;BR /&gt;props.put("bootstrap.servers", "xxxx:9092,xxx:9092");&lt;BR /&gt;props.put("client.id", "client-id-coprocessor ");&lt;BR /&gt;props.put("key.serializer", StringSerializer.class.getName());&lt;BR /&gt;props.put("value.serializer", StringSerializer.class.getName());&lt;BR /&gt;props.put("security.protocol", "SASL_PLAINTEXT");&lt;BR /&gt;props.put("sasl.kerberos.service.name", "kafka");&lt;BR /&gt;props.put("sasl.jaas.config",&lt;BR /&gt;"com.sun.security.auth.module.Krb5LoginModule required \n" +&lt;BR /&gt;"useKeyTab=true \n" +&lt;BR /&gt;"storeKey=true \n" +&lt;BR /&gt;"keyTab=\"/etc/security/keytabs/kafka.keytab\" \n" +&lt;BR /&gt;"principal=\"kafka/nodo@REALM\";");&lt;BR /&gt;KafkaProducer producer = new KafkaProducerString&amp;gt;(props);&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Remember sometimes you will need reboot your hbase service for deploy your&lt;BR /&gt;coprocessor.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;I hope I will help you.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Florentino&lt;BR /&gt;</description>
      <pubDate>Wed, 24 Jan 2018 15:57:32 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Integrate-kerberos-with-kafka-in-hbase-coprocessor/m-p/63966#M67916</guid>
      <dc:creator>Florentin</dc:creator>
      <dc:date>2018-01-24T15:57:32Z</dc:date>
    </item>
  </channel>
</rss>

