Please refer 
https://community.hortonworks.com/articles/87985/how-to-manage-users-and-security-policies-via-rang.html
 


From: Eric Alton <sultanapea...@hotmail.com>
Sent: Wednesday, January 23, 2019 4:09 PM
To: user@ranger.apache.org
Subject: Is there a Ranger REST v2 API to create users?
 
We have a custom Ranger plugin that requires the Ranger admin user (ie 
amb_ranger_admin) exist when the plugin is enabled. If a built-in service 
plugin such as Hive is enabled prior to our custom plugin, this user will be 
created in Ranger automatically. If the user does not exist, we provide 
instructions on how to add this user to Ranger manually.

We would like to automate creation of this user. Is there a REST API we can use 
to check whether the Ranger admin user exists, and if not, create it? Searching 
online I find references to older APIs that no longer work.

curl -u admin:admin -v -i -s -X GET 
http://$RANGER_ADMIN_URL/service/xusers/secure/users/$USER

For v2 I only see documentation for servicedef, service, and policy level APIs.

Reply via email to