Support Questions

Find answers, ask questions, and share your expertise

Atlas-Ranger Tag based policy not working

avatar
Contributor

Hi, I am working with the ranger-atlas tag based policy, I think after I turned on the tag sync in Ranger, the tag in atlas is sync with ranger, coz I checked the ranger db and found the x_tag table has some records in it.

16396-ranger-db.png

But I think in ranger, the tags are syncd but resource lookup not working for tags, coz when I search for some tag in tag-based policy, the tags in atlas cannot be searched.

16397-tags.png

the above pic shows the tags in atlas, while the below pic shows the tag sync in ranger, I am trying to search for the tag HBase, and it's not working

16399-tag-sync-in-ranger.png

Furthermore, I added the tag based policy to hive, but the table under the HBase tag still cannot be accessed for the "admin" user

16400-ranger-tag-based-policy.png

16402-ranger-hive-policy.png

3 REPLIES 3

avatar
Expert Contributor

@Qinglin Xia

Checking you created the Tag Service in Ranger. You need to define the Tag Service to enable tags flowing from Atlas to Ranger. And always worth checking all the components are online - Ranger Tag-sync, Kafka, etc.

avatar
Contributor
@Graham Martin

Thanks for your reply, I thihk I haved already define the Tag Service and add it to the hive policy

16439-tag-service.png

16440-enable.png

16441-hive-policy.png

In the tag service I give user "admin" the permission to select all the tables/columns under the tag "Hive", and in Hive Policy I disable the user "admin" 's permission to select of all tables, so if the tag service works, "admin" should have the permission to visit all tables under the tag "Hive", but currently it is not working.

Am I missing something here?

avatar

@Qinglin Xia

As @Graham Martin pointed out, please check if you have defined tag service for the Hive/Hbase. Unless tag service is defined, tagsync will not work.

Please follow below tutorial, which has detailed steps on the same.

https://hortonworks.com/tutorial/tag-based-policies-with-apache-ranger-and-apache-atlas/