<?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: Enabling SASL/Plain on kerberos-enabled cluster (multiple SASL mechanisms in a broker (GSSAPI and PLAIN) in Support Questions</title>
    <link>https://community.cloudera.com/t5/Support-Questions/Enabling-SASL-Plain-on-kerberos-enabled-cluster-multiple/m-p/179992#M142238</link>
    <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/11088/mliem.html" nodeid="11088"&gt;@mliem&lt;/A&gt; this looks like authorization issue. we need to add ACLs for user alice&lt;/P&gt;</description>
    <pubDate>Wed, 13 Sep 2017 12:19:50 GMT</pubDate>
    <dc:creator>mkumar2</dc:creator>
    <dc:date>2017-09-13T12:19:50Z</dc:date>
    <item>
      <title>Enabling SASL/Plain on kerberos-enabled cluster (multiple SASL mechanisms in a broker (GSSAPI and PLAIN)</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Enabling-SASL-Plain-on-kerberos-enabled-cluster-multiple/m-p/179991#M142237</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I have a kerberos-enabled cluster and trying to enable SASL/PLAIN as well on the same broker.  SASL (GSSAPI) works fine. &lt;/P&gt;&lt;P&gt;These are the steps i took:&lt;/P&gt;&lt;P&gt;1) Added PlainLoginModule to kafka_jaas.conf (all other sections already there due to kerberos)&lt;/P&gt;&lt;PRE&gt;KafkaServer {
com.sun.security.auth.module.Krb5LoginModule required
useKeyTab=true
keyTab="{{kafka_keytab_path}}"
storeKey=true
useTicketCache=false
serviceName="{{kafka_bare_jaas_principal}}"
principal="{{kafka_jaas_principal}}";

org.apache.kafka.common.security.plain.PlainLoginModule required
username="admin"
password="admin-secret"
user_admin="admin-secret"
user_alice="alice-secret";
};
KafkaClient {
com.sun.security.auth.module.Krb5LoginModule required
useTicketCache=true
renewTicket=true
serviceName="{{kafka_bare_jaas_principal}}";
};
Client {
com.sun.security.auth.module.Krb5LoginModule required
useKeyTab=true
keyTab="{{kafka_keytab_path}}"
storeKey=true
useTicketCache=false
serviceName="zookeeper"
principal="{{kafka_jaas_principal}}";
};

&lt;/PRE&gt;&lt;P&gt;I've also validated, -Djava.security.auth.login.config=/usr/hdp/current/kafka-broker/config/kafka_jaas.conf is being loaded (ps -ef | grep kafka_jaas.conf)&lt;/P&gt;&lt;P&gt;2) Created a kafka_plain_jaas_client.conf&lt;/P&gt;&lt;PRE&gt;KafkaClient {
  org.apache.kafka.common.security.plain.PlainLoginModule required
  username="alice"
  password="alice-secret";
};
&lt;/PRE&gt;&lt;P&gt;3) Update to server.properties&lt;/P&gt;&lt;PRE&gt;sasl.enabled.mechanisms=GSSAPI,PLAIN
advertised.listeners=PLAINTEXTSASL://ip-123-0-0-12.ec2.internal:6667&lt;/PRE&gt;&lt;P&gt;4) Producer.proerties&lt;/P&gt;&lt;PRE&gt;security.protocol=SASL_PLAINTEXT
sasl.mechanism=PLAIN&lt;/PRE&gt;&lt;P&gt;5) Restarted Kafka&lt;/P&gt;&lt;P&gt;When I use the old kafka_client_jaas that references com.sun.security.auth.module.Krb5LoginModule, everything still works but using the new client_jaas with plainLoginModule I get:&lt;/P&gt;&lt;PRE&gt;kafka@ip-170-0-0-12:/usr/hdp/current/kafka-broker/bin$ /usr/hdp/current/kafka-broker/bin/kafka-console-producer.sh --broker-list ip-170-0-0-12.ec2.internal:6667 --topic ssl_plain_test -producer.config /usr/hdp/current/kafka-broker/conf/producer.properties --security-protocol PLAINTEXTSASL
d
[2017-09-06 18:13:56,982] WARN Error while fetching metadata with correlation id 0 : {ssl_plain_test=UNKNOWN_TOPIC_OR_PARTITION} (org.apache.kafka.clients.NetworkClient)
[2017-09-06 18:13:57,183] WARN Error while fetching metadata with correlation id 1 : {ssl_plain_test=UNKNOWN_TOPIC_OR_PARTITION} (org.apache.kafka.clients.NetworkClient)
[2017-09-06 18:13:57,284] WARN Error while fetching metadata with correlation id 2 : {ssl_plain_test=UNKNOWN_TOPIC_OR_PARTITION} (org.apache.kafka.clients.NetworkClient)
[2017-09-06 18:13:57,385] WARN Error while fetching metadata with correlation id 3 : {ssl_plain_test=UNKNOWN_TOPIC_OR_PARTITION} (org.apache.kafka.clients.NetworkClient)
[2017-09-06 18:13:57,485] WARN Error while fetching metadata with correlation id 4 : {ssl_plain_test=UNKNOWN_TOPIC_OR_PARTITION} (org.apache.kafka.clients.NetworkClient)

&lt;/PRE&gt;&lt;P&gt;I edited: /usr/hdp/current/kafka-broker/bin/kafka-console-producer.sh to point to my client_jaas:&lt;/P&gt;&lt;PRE&gt;export KAFKA_CLIENT_KERBEROS_PARAMS="-Djava.security.auth.login.config=$KAFKA_HOME/config/kafka_plain_jaas_client.conf"&lt;/PRE&gt;&lt;P&gt;Any ideas?&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Thu, 07 Sep 2017 01:23:50 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Enabling-SASL-Plain-on-kerberos-enabled-cluster-multiple/m-p/179991#M142237</guid>
      <dc:creator>mliem</dc:creator>
      <dc:date>2017-09-07T01:23:50Z</dc:date>
    </item>
    <item>
      <title>Re: Enabling SASL/Plain on kerberos-enabled cluster (multiple SASL mechanisms in a broker (GSSAPI and PLAIN)</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Enabling-SASL-Plain-on-kerberos-enabled-cluster-multiple/m-p/179992#M142238</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/11088/mliem.html" nodeid="11088"&gt;@mliem&lt;/A&gt; this looks like authorization issue. we need to add ACLs for user alice&lt;/P&gt;</description>
      <pubDate>Wed, 13 Sep 2017 12:19:50 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Enabling-SASL-Plain-on-kerberos-enabled-cluster-multiple/m-p/179992#M142238</guid>
      <dc:creator>mkumar2</dc:creator>
      <dc:date>2017-09-13T12:19:50Z</dc:date>
    </item>
  </channel>
</rss>

