Here are the steps required to enable Tagsync to map custom Atlas Entities to Ranger Entities (aka Service Resources).
* Provide an implementation of AtlasResourceMapper Java class. You may look up other implementation classes such as AtlasHdfsResourceMapper or AtlasHiveResourceMapper which map hfds and hive Atlas entities to Ranger Service Resources respectively. Specifically, you need to implement buildResource() member function where your component's RangerAtlasEntity object needs to be converted to generic RangerServiceResource object.
* Set up the following Tagsync configuration parameter in ranger-tagsync-site.xml file. If using Ambari, you may do this by going to 'Ranger->Configs->Advanced->Custom ranger-tagsync-site->Add Property'.
* Ensure that the implementation class is in the class-path of tagsync. One way to do this is to place the JAR containing the implementation class in /usr/hdp/current/ranger-tagsync/lib directory.
* Restart tagsync.
* Check /var/log/ranger/tagsync/tagsync.out and /var/log/ranger/tagsync/tagsync.log files to ensure that there are no errors in initializing AtlasTagSource.
Hope this helps.
From: Rajat Goel <[EMAIL PROTECTED]<mailto:[EMAIL PROTECTED]>>
Reply-To: "[EMAIL PROTECTED]<mailto:[EMAIL PROTECTED]>" <[EMAIL PROTECTED]<mailto:[EMAIL PROTECTED]>>
Date: Wednesday, May 23, 2018 at 7:02 AM
To: "[EMAIL PROTECTED]<mailto:[EMAIL PROTECTED]>" <[EMAIL PROTECTED]<mailto:[EMAIL PROTECTED]>>
Subject: Custom service integration and Tag based policies
I am new to Ranger. I am trying to integrate my custom web service with Ranger for authorisation and policy management. I have successfully tested Resource based policy management integration of my web service with Ranger. Now I want to integrate and enable Tag based policy. I have added my custom types and entities in Atlas. How can I provide tag based policy and authorisation?
While reading some documentation and code, I found that I will have to add implementation of 'AtlasResourceMapper.java' in Ranger Tag sync process on the lines of AtlasKafkaResourceMapper.java. Is my understanding correct? Can someone point me to any documentation on how to write a custom class which extends AtlasResourceMapper? Also, are there more steps/code that needs to be written or just the AtlasResourceMapper implementation will suffice?
Thanks & Regards,