Skip to main content
nsabharwal
Gold ⭐️
Feb 15, 2016 11:21 PM UTC

Apache Ranger and Kafka - No kerberos

  • Oct 5, 2026 9:25 AM UTC
  • 8 replies
  • 16261 views
  • Translate All

Use case: We want to control the kafka broker, producer and consumer policies using Ranger without having kerberos. "What is a recommended way to set-up policies when trying to control access to Kafka over a non-secure channel?"

Original doc

Demo

I have defined 3 policies as shown below:

Broker, Publisher and Consumer is controlled at IP level. With one click you can revoke the access from the consumer.

Demo commands

Happy Hadooping!!!

8 replies

nsabharwal
Gold ⭐️
Feb 16, 2016 2:23 AM UTC

@Benson Shih

Translate
rlebretonnic
Silver ⭐️⭐️
Jun 15, 2016 10:34 PM UTC

Hi Neeraj

I am trying to do exactly the same thing, ie using ranger with a non kerberized Kafka. Unfortunately I have following error :

[root@mykafka kafka]# tail -f kafka.out
[2016-06-15 15:45:34,002] WARN got exception trying to get groups for user ANONYMOUS: id: ANONYMOUS: no such user (org.apache.hadoop.security.ShellBasedUnixGroupsMapping)
[2016-06-15 15:45:34,002] WARN No groups available for user ANONYMOUS (org.apache.hadoop.security.UserGroupInformation)

The public group should be mapped to an ANONYMOUS user.

https://cwiki.apache.org/confluence/display/RANGER/Kafka+Plugin#KafkaPlugin-WhydowehavetospecifypublicusergrouponallpoliciesitemscreatedforauthorizingKafkaaccessovernon-securechannel?

Did you do something special to declare it manually within ranger ? Can you share the list of declared users within ranger ?

Thx in advance. Regards

Translate
rlebretonnic
Silver ⭐️⭐️
Jun 16, 2016 3:51 AM UTC

Hum... It seems that I have to use the new publisher and consumer API, and not the old one. Now it works but I still have warnings in kafka.out... With 6 lines of warning every second, I will quickly have a problem.

Translate
pd47
Gold ⭐️
Jul 19, 2016 1:54 AM UTC

Hi Neeraj,

I'm experiencing the same issue as "easyoups". Do you have work around?

Translate
marius_mueller
Silver ⭐️⭐️
Sep 8, 2016 6:14 PM UTC

Hi,

I had the same Exception.

I solved the problem by creating the User ANONYMOUS on the kafka broker nodes.

Translate
it_duanxiong
Gold ⭐️
Oct 8, 2016 3:00 PM UTC

Hi Neeraj,Can you tell me your ranger and kafka version ?Thank you

Translate
karan_alang1
Gold ⭐️
Nov 16, 2016 3:15 AM UTC

@Neeraj Sabharwal

- i'm having issues in getting this to work,

attaching the link with the problem summary.

https://community.hortonworks.com/questions/65928/setting-up-kafka-securty-using-apache-ranger.html#answer-66422

could you help resolve this issue ? Thnx.

Translate
amazon20062007
Gold ⭐️
Mar 31, 2017 1:28 PM UTC

Hi, does it mean that ranger kafka plugin can not define policy among users, and only among hosts?

Translate