You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ranger.apache.org by Madhan Neethiraj <ma...@apache.org> on 2023/04/06 19:34:23 UTC
Review Request 74383: RANGER-4175: REST API to find security-zone for a given resource
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/74383/
-----------------------------------------------------------
Review request for ranger, Abhishek Kumar, Anand Nadar, Ankita Sinha, Kishor Gollapalliwar, Abhay Kulkarni, Mehul Parikh, Monika Kachhadiya, Pradeep Agrawal, Ramesh Mani, Sailaja Polavarapu, Subhrat Chaudhary, Tejas Rane, and Velmurugan Periasamy.
Bugs: RANGER-4175
https://issues.apache.org/jira/browse/RANGER-4175
Repository: ranger
Description
-------
- added following REST API:
-- service/public/v2/api/zone-names/dev_hive/resource?resource:database=db&resource:table=tbl1
Diffs
-----
agents-common/src/main/java/org/apache/ranger/plugin/policyengine/PolicyEngine.java 3864f30d2
intg/src/main/python/apache_ranger/client/ranger_client.py 4680e2d8e
intg/src/main/python/apache_ranger/utils.py 28e0e4b60
security-admin/src/main/java/org/apache/ranger/biz/RangerPolicyAdmin.java f975287f9
security-admin/src/main/java/org/apache/ranger/biz/RangerPolicyAdminImpl.java 97a384f30
security-admin/src/main/java/org/apache/ranger/rest/PublicAPIsv2.java 85cd7dd67
security-admin/src/main/java/org/apache/ranger/rest/SecurityZoneREST.java 75874a55e
security-admin/src/main/java/org/apache/ranger/rest/ServiceREST.java 5542250aa
Diff: https://reviews.apache.org/r/74383/diff/1/
Testing
-------
- setup following 3 security zones:
-- zone1: dev_hive { database: db, table: tbl1 }
-- zone2: dev_hive { database: db, table: tbl2, column: col1 }
-- zone3: dev_hive { database: db, table: tbl2, column: col2 }
- verified that the new API returns correct security zones for resources
-- curl -u username:password "http://rangerhost:port/service/public/v2/api/zone-names/dev_hive/resource?resource:database=db"
["zone3","zone2","zone1"]
-- curl -u username:password "http://rangerhost:port/service/public/v2/api/zone-names/dev_hive/resource?resource:database=db&resource:table=tbl1"
["zone1"]
-- curl -u username:password "http://rangerhost:port/service/public/v2/api/zone-names/dev_hive/resource?resource:database=db&resource:table=tbl2"
["zone3","zone2"]
-- curl -u username:password "http://rangerhost:port/service/public/v2/api/zone-names/dev_hive/resource?resource:database=db&resource:table=tbl2&resource:column=col1"
["zone2"]
-- curl -u username:password "http://rangerhost:port/service/public/v2/api/zone-names/dev_hive/resource?resource:database=db&resource:table=tbl2&resource:column=col2"
["zone3"]
Thanks,
Madhan Neethiraj
Re: Review Request 74383: RANGER-4175: REST API to find security-zone for a given resource
Posted by Abhishek Kumar <ab...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/74383/#review225428
-----------------------------------------------------------
Ship it!
Ship It!
- Abhishek Kumar
On April 26, 2023, 4:42 a.m., Madhan Neethiraj wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/74383/
> -----------------------------------------------------------
>
> (Updated April 26, 2023, 4:42 a.m.)
>
>
> Review request for ranger, Abhishek Kumar, Anand Nadar, Ankita Sinha, Kishor Gollapalliwar, Abhay Kulkarni, Mehul Parikh, Monika Kachhadiya, Pradeep Agrawal, Ramesh Mani, Sailaja Polavarapu, Subhrat Chaudhary, Tejas Rane, and Velmurugan Periasamy.
>
>
> Bugs: RANGER-4175
> https://issues.apache.org/jira/browse/RANGER-4175
>
>
> Repository: ranger
>
>
> Description
> -------
>
> - added following REST API:
> -- service/public/v2/api/zone-names/dev_hive/resource?resource:database=db&resource:table=tbl1
>
>
> Diffs
> -----
>
> agents-common/src/main/java/org/apache/ranger/plugin/policyengine/PolicyEngine.java 86b6cd376
> intg/src/main/java/org/apache/ranger/RangerClient.java 92149c9e0
> intg/src/main/python/apache_ranger/client/ranger_client.py 4680e2d8e
> intg/src/main/python/apache_ranger/utils.py 28e0e4b60
> intg/src/test/java/org/apache/ranger/TestRangerClient.java 054881f4b
> security-admin/src/main/java/org/apache/ranger/biz/RangerPolicyAdmin.java f975287f9
> security-admin/src/main/java/org/apache/ranger/biz/RangerPolicyAdminImpl.java 97a384f30
> security-admin/src/main/java/org/apache/ranger/rest/PublicAPIsv2.java 85cd7dd67
> security-admin/src/main/java/org/apache/ranger/rest/SecurityZoneREST.java 75874a55e
> security-admin/src/main/java/org/apache/ranger/rest/ServiceREST.java 5542250aa
>
>
> Diff: https://reviews.apache.org/r/74383/diff/3/
>
>
> Testing
> -------
>
> - setup following 3 security zones:
> -- zone1: dev_hive { database: db, table: tbl1 }
> -- zone2: dev_hive { database: db, table: tbl2, column: col1 }
> -- zone3: dev_hive { database: db, table: tbl2, column: col2 }
> - verified that the new API returns correct security zones for resources
> -- curl -u username:password "http://rangerhost:port/service/public/v2/api/zone-names/dev_hive/resource?resource:database=db"
> ["zone3","zone2","zone1"]
> -- curl -u username:password "http://rangerhost:port/service/public/v2/api/zone-names/dev_hive/resource?resource:database=db&resource:table=tbl1"
> ["zone1"]
> -- curl -u username:password "http://rangerhost:port/service/public/v2/api/zone-names/dev_hive/resource?resource:database=db&resource:table=tbl2"
> ["zone3","zone2"]
> -- curl -u username:password "http://rangerhost:port/service/public/v2/api/zone-names/dev_hive/resource?resource:database=db&resource:table=tbl2&resource:column=col1"
> ["zone2"]
> -- curl -u username:password "http://rangerhost:port/service/public/v2/api/zone-names/dev_hive/resource?resource:database=db&resource:table=tbl2&resource:column=col2"
> ["zone3"]
>
>
> Thanks,
>
> Madhan Neethiraj
>
>
Re: Review Request 74383: RANGER-4175: REST API to find security-zone for a given resource
Posted by Madhan Neethiraj <ma...@apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/74383/
-----------------------------------------------------------
(Updated April 26, 2023, 4:42 a.m.)
Review request for ranger, Abhishek Kumar, Anand Nadar, Ankita Sinha, Kishor Gollapalliwar, Abhay Kulkarni, Mehul Parikh, Monika Kachhadiya, Pradeep Agrawal, Ramesh Mani, Sailaja Polavarapu, Subhrat Chaudhary, Tejas Rane, and Velmurugan Periasamy.
Changes
-------
addressed review comment
Bugs: RANGER-4175
https://issues.apache.org/jira/browse/RANGER-4175
Repository: ranger
Description
-------
- added following REST API:
-- service/public/v2/api/zone-names/dev_hive/resource?resource:database=db&resource:table=tbl1
Diffs (updated)
-----
agents-common/src/main/java/org/apache/ranger/plugin/policyengine/PolicyEngine.java 86b6cd376
intg/src/main/java/org/apache/ranger/RangerClient.java 92149c9e0
intg/src/main/python/apache_ranger/client/ranger_client.py 4680e2d8e
intg/src/main/python/apache_ranger/utils.py 28e0e4b60
intg/src/test/java/org/apache/ranger/TestRangerClient.java 054881f4b
security-admin/src/main/java/org/apache/ranger/biz/RangerPolicyAdmin.java f975287f9
security-admin/src/main/java/org/apache/ranger/biz/RangerPolicyAdminImpl.java 97a384f30
security-admin/src/main/java/org/apache/ranger/rest/PublicAPIsv2.java 85cd7dd67
security-admin/src/main/java/org/apache/ranger/rest/SecurityZoneREST.java 75874a55e
security-admin/src/main/java/org/apache/ranger/rest/ServiceREST.java 5542250aa
Diff: https://reviews.apache.org/r/74383/diff/3/
Changes: https://reviews.apache.org/r/74383/diff/2-3/
Testing
-------
- setup following 3 security zones:
-- zone1: dev_hive { database: db, table: tbl1 }
-- zone2: dev_hive { database: db, table: tbl2, column: col1 }
-- zone3: dev_hive { database: db, table: tbl2, column: col2 }
- verified that the new API returns correct security zones for resources
-- curl -u username:password "http://rangerhost:port/service/public/v2/api/zone-names/dev_hive/resource?resource:database=db"
["zone3","zone2","zone1"]
-- curl -u username:password "http://rangerhost:port/service/public/v2/api/zone-names/dev_hive/resource?resource:database=db&resource:table=tbl1"
["zone1"]
-- curl -u username:password "http://rangerhost:port/service/public/v2/api/zone-names/dev_hive/resource?resource:database=db&resource:table=tbl2"
["zone3","zone2"]
-- curl -u username:password "http://rangerhost:port/service/public/v2/api/zone-names/dev_hive/resource?resource:database=db&resource:table=tbl2&resource:column=col1"
["zone2"]
-- curl -u username:password "http://rangerhost:port/service/public/v2/api/zone-names/dev_hive/resource?resource:database=db&resource:table=tbl2&resource:column=col2"
["zone3"]
Thanks,
Madhan Neethiraj
Re: Review Request 74383: RANGER-4175: REST API to find security-zone for a given resource
Posted by Madhan Neethiraj <ma...@apache.org>.
> On April 17, 2023, 7:45 a.m., Abhishek Kumar wrote:
> > Are Java client changes for the new REST API part of another review ?
updated the Java client with addition of the new method.
- Madhan
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/74383/#review225387
-----------------------------------------------------------
On April 26, 2023, 4:42 a.m., Madhan Neethiraj wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/74383/
> -----------------------------------------------------------
>
> (Updated April 26, 2023, 4:42 a.m.)
>
>
> Review request for ranger, Abhishek Kumar, Anand Nadar, Ankita Sinha, Kishor Gollapalliwar, Abhay Kulkarni, Mehul Parikh, Monika Kachhadiya, Pradeep Agrawal, Ramesh Mani, Sailaja Polavarapu, Subhrat Chaudhary, Tejas Rane, and Velmurugan Periasamy.
>
>
> Bugs: RANGER-4175
> https://issues.apache.org/jira/browse/RANGER-4175
>
>
> Repository: ranger
>
>
> Description
> -------
>
> - added following REST API:
> -- service/public/v2/api/zone-names/dev_hive/resource?resource:database=db&resource:table=tbl1
>
>
> Diffs
> -----
>
> agents-common/src/main/java/org/apache/ranger/plugin/policyengine/PolicyEngine.java 86b6cd376
> intg/src/main/java/org/apache/ranger/RangerClient.java 92149c9e0
> intg/src/main/python/apache_ranger/client/ranger_client.py 4680e2d8e
> intg/src/main/python/apache_ranger/utils.py 28e0e4b60
> intg/src/test/java/org/apache/ranger/TestRangerClient.java 054881f4b
> security-admin/src/main/java/org/apache/ranger/biz/RangerPolicyAdmin.java f975287f9
> security-admin/src/main/java/org/apache/ranger/biz/RangerPolicyAdminImpl.java 97a384f30
> security-admin/src/main/java/org/apache/ranger/rest/PublicAPIsv2.java 85cd7dd67
> security-admin/src/main/java/org/apache/ranger/rest/SecurityZoneREST.java 75874a55e
> security-admin/src/main/java/org/apache/ranger/rest/ServiceREST.java 5542250aa
>
>
> Diff: https://reviews.apache.org/r/74383/diff/3/
>
>
> Testing
> -------
>
> - setup following 3 security zones:
> -- zone1: dev_hive { database: db, table: tbl1 }
> -- zone2: dev_hive { database: db, table: tbl2, column: col1 }
> -- zone3: dev_hive { database: db, table: tbl2, column: col2 }
> - verified that the new API returns correct security zones for resources
> -- curl -u username:password "http://rangerhost:port/service/public/v2/api/zone-names/dev_hive/resource?resource:database=db"
> ["zone3","zone2","zone1"]
> -- curl -u username:password "http://rangerhost:port/service/public/v2/api/zone-names/dev_hive/resource?resource:database=db&resource:table=tbl1"
> ["zone1"]
> -- curl -u username:password "http://rangerhost:port/service/public/v2/api/zone-names/dev_hive/resource?resource:database=db&resource:table=tbl2"
> ["zone3","zone2"]
> -- curl -u username:password "http://rangerhost:port/service/public/v2/api/zone-names/dev_hive/resource?resource:database=db&resource:table=tbl2&resource:column=col1"
> ["zone2"]
> -- curl -u username:password "http://rangerhost:port/service/public/v2/api/zone-names/dev_hive/resource?resource:database=db&resource:table=tbl2&resource:column=col2"
> ["zone3"]
>
>
> Thanks,
>
> Madhan Neethiraj
>
>
Re: Review Request 74383: RANGER-4175: REST API to find security-zone for a given resource
Posted by Madhan Neethiraj <ma...@apache.org>.
- Madhan
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/74383/#review225387
-----------------------------------------------------------
On April 26, 2023, 4:42 a.m., Madhan Neethiraj wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/74383/
> -----------------------------------------------------------
>
> (Updated April 26, 2023, 4:42 a.m.)
>
>
> Review request for ranger, Abhishek Kumar, Anand Nadar, Ankita Sinha, Kishor Gollapalliwar, Abhay Kulkarni, Mehul Parikh, Monika Kachhadiya, Pradeep Agrawal, Ramesh Mani, Sailaja Polavarapu, Subhrat Chaudhary, Tejas Rane, and Velmurugan Periasamy.
>
>
> Bugs: RANGER-4175
> https://issues.apache.org/jira/browse/RANGER-4175
>
>
> Repository: ranger
>
>
> Description
> -------
>
> - added following REST API:
> -- service/public/v2/api/zone-names/dev_hive/resource?resource:database=db&resource:table=tbl1
>
>
> Diffs
> -----
>
> agents-common/src/main/java/org/apache/ranger/plugin/policyengine/PolicyEngine.java 86b6cd376
> intg/src/main/java/org/apache/ranger/RangerClient.java 92149c9e0
> intg/src/main/python/apache_ranger/client/ranger_client.py 4680e2d8e
> intg/src/main/python/apache_ranger/utils.py 28e0e4b60
> intg/src/test/java/org/apache/ranger/TestRangerClient.java 054881f4b
> security-admin/src/main/java/org/apache/ranger/biz/RangerPolicyAdmin.java f975287f9
> security-admin/src/main/java/org/apache/ranger/biz/RangerPolicyAdminImpl.java 97a384f30
> security-admin/src/main/java/org/apache/ranger/rest/PublicAPIsv2.java 85cd7dd67
> security-admin/src/main/java/org/apache/ranger/rest/SecurityZoneREST.java 75874a55e
> security-admin/src/main/java/org/apache/ranger/rest/ServiceREST.java 5542250aa
>
>
> Diff: https://reviews.apache.org/r/74383/diff/3/
>
>
> Testing
> -------
>
> - setup following 3 security zones:
> -- zone1: dev_hive { database: db, table: tbl1 }
> -- zone2: dev_hive { database: db, table: tbl2, column: col1 }
> -- zone3: dev_hive { database: db, table: tbl2, column: col2 }
> - verified that the new API returns correct security zones for resources
> -- curl -u username:password "http://rangerhost:port/service/public/v2/api/zone-names/dev_hive/resource?resource:database=db"
> ["zone3","zone2","zone1"]
> -- curl -u username:password "http://rangerhost:port/service/public/v2/api/zone-names/dev_hive/resource?resource:database=db&resource:table=tbl1"
> ["zone1"]
> -- curl -u username:password "http://rangerhost:port/service/public/v2/api/zone-names/dev_hive/resource?resource:database=db&resource:table=tbl2"
> ["zone3","zone2"]
> -- curl -u username:password "http://rangerhost:port/service/public/v2/api/zone-names/dev_hive/resource?resource:database=db&resource:table=tbl2&resource:column=col1"
> ["zone2"]
> -- curl -u username:password "http://rangerhost:port/service/public/v2/api/zone-names/dev_hive/resource?resource:database=db&resource:table=tbl2&resource:column=col2"
> ["zone3"]
>
>
> Thanks,
>
> Madhan Neethiraj
>
>
Re: Review Request 74383: RANGER-4175: REST API to find security-zone for a given resource
Posted by Abhishek Kumar <ab...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/74383/#review225387
-----------------------------------------------------------
Are Java client changes for the new REST API part of another review ?
- Abhishek Kumar
On April 6, 2023, 7:34 p.m., Madhan Neethiraj wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/74383/
> -----------------------------------------------------------
>
> (Updated April 6, 2023, 7:34 p.m.)
>
>
> Review request for ranger, Abhishek Kumar, Anand Nadar, Ankita Sinha, Kishor Gollapalliwar, Abhay Kulkarni, Mehul Parikh, Monika Kachhadiya, Pradeep Agrawal, Ramesh Mani, Sailaja Polavarapu, Subhrat Chaudhary, Tejas Rane, and Velmurugan Periasamy.
>
>
> Bugs: RANGER-4175
> https://issues.apache.org/jira/browse/RANGER-4175
>
>
> Repository: ranger
>
>
> Description
> -------
>
> - added following REST API:
> -- service/public/v2/api/zone-names/dev_hive/resource?resource:database=db&resource:table=tbl1
>
>
> Diffs
> -----
>
> agents-common/src/main/java/org/apache/ranger/plugin/policyengine/PolicyEngine.java 3864f30d2
> intg/src/main/python/apache_ranger/client/ranger_client.py 4680e2d8e
> intg/src/main/python/apache_ranger/utils.py 28e0e4b60
> security-admin/src/main/java/org/apache/ranger/biz/RangerPolicyAdmin.java f975287f9
> security-admin/src/main/java/org/apache/ranger/biz/RangerPolicyAdminImpl.java 97a384f30
> security-admin/src/main/java/org/apache/ranger/rest/PublicAPIsv2.java 85cd7dd67
> security-admin/src/main/java/org/apache/ranger/rest/SecurityZoneREST.java 75874a55e
> security-admin/src/main/java/org/apache/ranger/rest/ServiceREST.java 5542250aa
>
>
> Diff: https://reviews.apache.org/r/74383/diff/2/
>
>
> Testing
> -------
>
> - setup following 3 security zones:
> -- zone1: dev_hive { database: db, table: tbl1 }
> -- zone2: dev_hive { database: db, table: tbl2, column: col1 }
> -- zone3: dev_hive { database: db, table: tbl2, column: col2 }
> - verified that the new API returns correct security zones for resources
> -- curl -u username:password "http://rangerhost:port/service/public/v2/api/zone-names/dev_hive/resource?resource:database=db"
> ["zone3","zone2","zone1"]
> -- curl -u username:password "http://rangerhost:port/service/public/v2/api/zone-names/dev_hive/resource?resource:database=db&resource:table=tbl1"
> ["zone1"]
> -- curl -u username:password "http://rangerhost:port/service/public/v2/api/zone-names/dev_hive/resource?resource:database=db&resource:table=tbl2"
> ["zone3","zone2"]
> -- curl -u username:password "http://rangerhost:port/service/public/v2/api/zone-names/dev_hive/resource?resource:database=db&resource:table=tbl2&resource:column=col1"
> ["zone2"]
> -- curl -u username:password "http://rangerhost:port/service/public/v2/api/zone-names/dev_hive/resource?resource:database=db&resource:table=tbl2&resource:column=col2"
> ["zone3"]
>
>
> Thanks,
>
> Madhan Neethiraj
>
>