Our Community is getting an upgrade! To get everything ready for the relaunch, we’ll be placing the site in read-only mode starting September 21st.
We really appreciate your understanding while we get things set up behind the scenes. Catch up on all the exciting details about the move here.
Need help or have questions? Drop us a line at [email protected]
Created 01-14-2016 07:22 AM
In kafka, I tried to execute consume/publish command with disabled all policies of Ranger, it did not deny both consume/publish behavior. Did I miss any configuration setting of kafka or misunderstanding something else?
Created 02-15-2016 03:54 AM
Here are some steps of enable ranger for kafka and works fine with HDP2.3.4 and Ranger 0.5.0:
1.) Enable kerberos server for cluster.
2.) In Ambari server, go to Kafka`s Configs > Advanced ranger-kafka-plugin-properties , click "Enable Ranger for Kafka".
3.) Go to Configs > Custom kafka-broker , change value of "authorizer.class.name" to "org.apache.ranger.authorization.kafka.authorizer.RangerKafkaAuthorizer".
4.) Save changes and restart kafka component.
5.) Go to Ranger admin UI, then disable all policies of kafka.
6.) It should be deny Publish/Consume actions now.
Created 02-01-2016 11:21 AM
@Benson Shih I really appreciate you sharing the details.
In the Ranger policy, Did you set the IP?
Yes. you can control access by ip-address.
Created 02-01-2016 11:29 AM
@Benson Shih See this
This Kafka feature is available in HDP releases 2.3.4 (Dal-M20) or later.
Created 02-01-2016 04:30 PM
very thanks for @Neeraj Sabharwal `s response in advance,
1. I have a little confused about how to setting the ip address ranger, am I suppose to specify namenode host ip?
2. What about earlier version of HDP like 2.3.0?
Created 02-01-2016 04:31 PM
@Benson Shih You would allow the traffic from those IP.
HDP 2.3.4 ...No HDP2.3.0 or HDP 2.3.2
Created on 02-02-2016 03:52 AM - edited 08-19-2019 05:13 AM
I used HDP2.3.4 with ip address ranger:
after set up the policy,then I went to 140.92.27.89 command line to change user to kafka, executing Publish and Consume actions,but it still did not deny..,
Created 02-02-2016 04:42 AM
@Benson Shih, what does the Audit say? It should have the policyId which gave permission.
Created on 02-02-2016 06:11 AM - edited 08-19-2019 05:13 AM
Hi @bdurai,
I did not observe any information about kafka in Audit(Access); However, after I add a property "authorizer.class.name=org.apache.ranger.authorization.kafka.authorizer.RangerKafkaAuthorizer" in Custom kafka-broker and executed Publish action,Audit Access could appeared information as below(why it did not show "publish" Access Type):
In addition, it get some error when I executed Publish action:
Created 02-02-2016 12:11 PM
@Benson Shih It's failing on authorization.
Created 02-03-2016 05:06 AM
Hi @Neeraj Sabharwal, it`s right that failing on authorization, but it is suppose to be authorized by Ranger right? it`s so weird that Ranger cannot control the Publish or Consume actions.
Created 02-03-2016 05:08 AM
@Benson Shih Yes..it suppose to be ..Could you do me a favor ? Please disable the kafka policy and try to see if you can run the job.