Hi , Were you able to resolve this problem ?
On Fri, Jan 20, 2017 at 6:06 AM, amir masood khezrain < [email protected]> wrote: > Hi > I am planning to setup a Kerberos/SASL enabled kafka cluster with three > brokers. Since “zookeeper.set.acl=true” is set, when running the first > broker, it creates the znodes required. It also sets the ACL of nodes which > locks down the nodes to the first broker. Here is the output of the ACL on > node “/brokers” after running the first broker. > > 'world,'anyone: r'sasl,'mykafka/[email protected]: cdrwa > Then, when the other two brokers start, they fail since the node “brokers” > is locked and they do only have read access to it. This is the case for all > nodes created by the first broker. How can I give access to the other two > brokers. I don’t think manually setting ACL for nodes make sense since some > nodes like partitions are created dynamically. Is there a way to resolve it > while “zookeeper.set.acl=true” is kept? Note that the hostname is in 4 > segments. > > The solutions that I have tried but did not work: > 1- As you have noticed, I tried to give super access to all three brokers > by setting “super.users”. However, it trick did not work!2- Also, I tried > to use “sasl.kerberos.principal.to.local.rules”, as you can find in the > configuration, which did not help as well.3- In addition, I tried to set > “Dzookeeper.sasl.client =mykafka” which was causing the broker throws the > below exception: > ERROR JAAS configuration is present, but system property > zookeeper.sasl.client is set to false, which disables SASL in the ZooKeeper > client (org.apache.kafka.common.security.JaasUtils) > > I would appreciate if you could help me with this issue. > > Below are my configurations: > ============jaas file > KafkaServer { com.sun.security.auth.module.Krb5LoginModule required > useKeyTab=true storeKey=true useTicketCache=true > ticketCache="/var/security/tickets/mykafka" keyTab="/var/ > security/keytabs/mykafka" serviceName="mykafka" principal="mykafka/ > [email protected]" debug=true;}; Client { > com.sun.security.auth.module.Krb5LoginModule required useKeyTab=true > storeKey=true useTicketCache=true ticketCache="/var/security/tickets/mykafka > " keyTab="/var/ security/keytabs/mykafka " serviceName=" mykafka " > principal="mykafka/[email protected] " debug=true;};: > > ============each broker’s configuration: > > listeners=SASL_PLAINTEXT://:44310advertised.listeners=SASL_PLAINTEXT://: > 44310zookeeper.set.acl=trueallow.everyone.if.no.acl.found= > trueauthorizer.class.name=kafka.security.auth.SimpleAclAuthorizersasl. > kerberos.principal.to.local.rules=RULE:[2:$1](.*)s/@.*//, > DEFAULT num.partitions=120security.inter.broker.protocol=SASL_ > PLAINTEXTsecurity.protocol=SASL_PLAINTEXTsasl.kerberos.service.name > =mykafkainter.broker.protocol.version=0.10.0.0 zookeeper.connection. > timeout.ms=60000auto.create.topics.enable=falsedelete. > topic.enable=truedefault.replication.factor=3 > super.users=User:mykafka;User:mykafka/[email protected];User: > mykafka/[email protected];User:mykafka/myhos > [email protected] > > ============ > And finally: export KAFKA_OPTS="\ > -Djava.security.auth.login.config=/path/to/the/jaas/file > \ -Djavax.security.auth.useSubjectCredsOnly=false \ > -Dzookeeper.sasl.client.username=mykafka"
