Created 01-12-2018 01:18 PM
I want to get details of all users mapped to a particular policy or policies in the ranger , I ma checking mysql ranger database, but no significant details I found yet . can somebody please help me out ?
Created 01-12-2018 02:08 PM
@Anurag Mishra,
You can query the policy by ID and check the users associated with the policy
curl -ivk -H "X-Requested-By: ambari" -H "Accept: application/json" -u {ranger-username}:{ranger-password} http://{ranger-host}:{ranger-port}/service/plugins/policies/{policy-id}
replace the place holders in the above url
To get the users of the policy, iterate through the policyItems array and check for users in each object of the array.
Thanks,
Aditya