I'm looking for suggestions on how best to implement this scenario.
1. User1 creates a table in their database. This should trigger the
automatic creation of a Ranger policy granting User1 full access to the table.
2. User1 transfers ownership of the table to User2. The Ranger policy is
updated to grant full access to User2 and remove access from User1.
3. User2 drops the table. The Ranger policy is deleted.
Are the REST APIs the only way to programmatically create, delete, and update
policies? We are using RangerBasePlugin.isAccessAllowed to test user access,
but I don't see any Java APIs for policy creation and maintenance.
Assuming the REST APIs are the only solution, it looks like the create policy
REST API returns the policy ID. Do I need to store this ID so that it can be
used to update and delete the policy later? In other words, is there any way to
update or delete a policy by passing in fields other than the ID (ie. policy
name, or table schema + table name + user)?