-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/74393/#review225398
-----------------------------------------------------------


Ship it!




Ship It!

- Mehul Parikh


On April 14, 2023, 5:35 a.m., Kishor Gollapalliwar wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/74393/
> -----------------------------------------------------------
> 
> (Updated April 14, 2023, 5:35 a.m.)
> 
> 
> Review request for ranger, Dineshkumar Yadav, Abhay Kulkarni, Madhan 
> Neethiraj, Mehul Parikh, Nikhil P, Ramesh Mani, and Velmurugan Periasamy.
> 
> 
> Bugs: RANGER-4182
>     https://issues.apache.org/jira/browse/RANGER-4182
> 
> 
> Repository: ranger
> 
> 
> Description
> -------
> 
> Currently while service creation when we create additional default policies 
> via curl we do not have option to support isRecursive. This is mostly due to 
> https://github.com/apache/ranger/blob/2d9af00153e8326c7b5eb80e7c86e1e8988dfbdc/agents-common/src/main/java/org/apache/ranger/plugin/service/RangerBaseService.java#L209,
>  where we are setting it explicitly false. We need a mechanism where in user 
> should be able to dynamically enable/ disable is-isRecursive option for a 
> resource using JSON provided. 
> 
>  
> 
> Sample curl command to create service & additional default policies
> 
> curl -u admin:<ADMIN_PASSWORD> -ivk -H "Accept:application/json" -H 
> "Content-Type:application/json" -X POST 
> 'http://localhost:6080/service/plugins/services' -d @hive_test.json 
> vim hive_test.json
> {"isEnabled":"true","type":"hive","configs":{"username":"hive","password":"hive","cluster.name":"My
>  Dummy 
> Cluster","jdbc.driverClassName":"org.apache.hive.jdbc.HiveDriver","jdbc.url":"none","enable.hive.metastore.lookup":"true","hive.site.file.path":"/etc/hive/conf/hive-site.xml","policy.download.auth.users":"hive,hdfs,impala","tag.download.auth.users":"hive,hdfs,impala","policy.grantrevoke.auth.users":"hive,impala","setup.additional.default.policies":"true","default-policy.1.name":"User
>  URL 
> Policy","default-policy.1.resource.url":"/test/kishor","default-policy.1.policyItem.1.users":"kishor","default-policy.1.policyItem.1.accessTypes":"read,write","default.policy.users":"impala,hive,hue,beacon,admin,dpprofiler"},"name":"hive_test","displayName":"Hive
>  service","description":"Hive repository/ service for Kishor"}
> 
> 
> Diffs
> -----
> 
>   
> agents-common/src/main/java/org/apache/ranger/plugin/service/RangerBaseService.java
>  d49e4dc20 
> 
> 
> Diff: https://reviews.apache.org/r/74393/diff/3/
> 
> 
> Testing
> -------
> 
> 1. mvn clean compile package install
> 2. checked existing service creation for any regression
> 3. verified service creation with new flag (resource.is-recursive=false)
> 4. verified service creation with new flag (resource.is-recursive=true)
> 5. verified service creation with new flag (No flag)
> 
> Sample new JSON
> {"isEnabled":"true","type":"hive","configs":{"username":"hive","password":"hive","cluster.name":"My
>  Dummy 
> Cluster","jdbc.driverClassName":"org.apache.hive.jdbc.HiveDriver","jdbc.url":"none","enable.hive.metastore.lookup":"true","hive.site.file.path":"/etc/hive/conf/hive-site.xml","policy.download.auth.users":"hive,hdfs,impala","tag.download.auth.users":"hive,hdfs,impala","policy.grantrevoke.auth.users":"hive,impala","setup.additional.default.policies":"true","default-policy.1.name":"User
>  URL 
> Policy","default-policy.1.resource.url":"/test/kishor","default-policy.1.resource.url.is-recursive":"true","default-policy.1.policyItem.1.users":"kishor","default-policy.1.policyItem.1.accessTypes":"read,write","default-policy.2.name":"User
>  DB 
> Policy","default-policy.2.resource.database":"kgdb","default-policy.2.resource.database.is-excludes":"true","default-policy.2.resource.table":"kgtbl","default-policy.2.resource.table.is-excludes":"true","default-policy.2.policyItem.1.users":"kishor","defa
 
ult-policy.2.policyItem.1.accessTypes":"read,write","default.policy.users":"impala,hive,hue,beacon,admin,dpprofiler,kishor"},"name":"hive_test","displayName":"Hive
 service","description":"Hive repository/ service for Kishor"}
> 
> 
> Thanks,
> 
> Kishor Gollapalliwar
> 
>

Reply via email to