You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ranger.apache.org by Ramesh Mani <rm...@hortonworks.com> on 2019/11/27 17:53:42 UTC
Review Request 71839: RANGER-2656:RangerHiveAuthorizer
filterListCmdObjects
failed to filter database / tables when HMS calls the authorizer for
filtering
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/71839/
-----------------------------------------------------------
Review request for ranger, Don Bosco Durai, Gautam Borad, Abhay Kulkarni, Madhan Neethiraj, Mehul Parikh, Pradeep Agrawal, Selvamohan Neethiraj, Sailaja Polavarapu, and Velmurugan Periasamy.
Bugs: RANGER-2656
https://issues.apache.org/jira/browse/RANGER-2656
Repository: ranger
Description
-------
RANGER-2656:RangerHiveAuthorizer filterListCmdObjects failed to filter database / tables when HMS calls the authorizer for filtering
Diffs
-----
hive-agent/src/main/java/org/apache/ranger/authorization/hive/authorizer/RangerHiveAuthorizer.java b80f1bd
Diff: https://reviews.apache.org/r/71839/diff/1/
Testing
-------
Verified in Local VM.
1) Show database and Show table via spark shell to invoke HMS api works as expected.
Thanks,
Ramesh Mani
Re: Review Request 71839: RANGER-2656:RangerHiveAuthorizer
filterListCmdObjects failed to filter database / tables when HMS calls the
authorizer for filtering
Posted by Madhan Neethiraj <ma...@apache.org>.
> On Nov. 27, 2019, 11:34 p.m., Ramesh Mani wrote:
> > hive-agent/src/main/java/org/apache/ranger/authorization/hive/authorizer/RangerHiveAuthorizer.java
> > Lines 895 (patched)
> > <https://reviews.apache.org/r/71839/diff/1/?file=2179621#file2179621line895>
> >
> > Yes that is needed. Just having 'any' permission in the request for show tables / views resulting in evaluation of a DATABASE policy allowing this access.
> >
> > Expectation is that there should be a table level policy with "SELECT" permission giving access to those tables and views.
Requiring 'select' permission at the table level (i.e. all columns of the table) doesn't look right. Shouldn't the table be included in the following cases?
- user having 'select' permission to only some columns of the table i.e. not all columns
- user not having 'select' permission on the table, but other permissions like create/alter/drop
- Madhan
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/71839/#review218835
-----------------------------------------------------------
On Nov. 27, 2019, 5:53 p.m., Ramesh Mani wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/71839/
> -----------------------------------------------------------
>
> (Updated Nov. 27, 2019, 5:53 p.m.)
>
>
> Review request for ranger, Don Bosco Durai, Gautam Borad, Abhay Kulkarni, Madhan Neethiraj, Mehul Parikh, Pradeep Agrawal, Selvamohan Neethiraj, Sailaja Polavarapu, and Velmurugan Periasamy.
>
>
> Bugs: RANGER-2656
> https://issues.apache.org/jira/browse/RANGER-2656
>
>
> Repository: ranger
>
>
> Description
> -------
>
> RANGER-2656:RangerHiveAuthorizer filterListCmdObjects failed to filter database / tables when HMS calls the authorizer for filtering
>
>
> Diffs
> -----
>
> hive-agent/src/main/java/org/apache/ranger/authorization/hive/authorizer/RangerHiveAuthorizer.java b80f1bd
>
>
> Diff: https://reviews.apache.org/r/71839/diff/1/
>
>
> Testing
> -------
>
> Verified in Local VM.
> 1) Show database and Show table via spark shell to invoke HMS api works as expected.
>
>
> Thanks,
>
> Ramesh Mani
>
>
Re: Review Request 71839: RANGER-2656:RangerHiveAuthorizer
filterListCmdObjects failed to filter database / tables when HMS calls the
authorizer for filtering
Posted by Ramesh Mani <rm...@hortonworks.com>.
> On Nov. 27, 2019, 11:34 p.m., Ramesh Mani wrote:
> > hive-agent/src/main/java/org/apache/ranger/authorization/hive/authorizer/RangerHiveAuthorizer.java
> > Lines 895 (patched)
> > <https://reviews.apache.org/r/71839/diff/1/?file=2179621#file2179621line895>
> >
> > Yes that is needed. Just having 'any' permission in the request for show tables / views resulting in evaluation of a DATABASE policy allowing this access.
> >
> > Expectation is that there should be a table level policy with "SELECT" permission giving access to those tables and views.
>
> Madhan Neethiraj wrote:
> Requiring 'select' permission at the table level (i.e. all columns of the table) doesn't look right. Shouldn't the table be included in the following cases?
> - user having 'select' permission to only some columns of the table i.e. not all columns
> - user not having 'select' permission on the table, but other permissions like create/alter/drop
Madhan, I have put a new request fixing this issue also.
- Ramesh
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/71839/#review218835
-----------------------------------------------------------
On Dec. 4, 2019, 1:41 a.m., Ramesh Mani wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/71839/
> -----------------------------------------------------------
>
> (Updated Dec. 4, 2019, 1:41 a.m.)
>
>
> Review request for ranger, Don Bosco Durai, Gautam Borad, Abhay Kulkarni, Madhan Neethiraj, Mehul Parikh, Pradeep Agrawal, Selvamohan Neethiraj, Sailaja Polavarapu, and Velmurugan Periasamy.
>
>
> Bugs: RANGER-2656
> https://issues.apache.org/jira/browse/RANGER-2656
>
>
> Repository: ranger
>
>
> Description
> -------
>
> RANGER-2656:RangerHiveAuthorizer filterListCmdObjects failed to filter database / tables when HMS calls the authorizer for filtering
>
>
> Diffs
> -----
>
> agents-common/src/main/java/org/apache/ranger/plugin/policyevaluator/RangerDefaultPolicyEvaluator.java 8469605
> agents-common/src/test/resources/policyengine/test_policyengine_hive.json efc1dcc
> hive-agent/src/main/java/org/apache/ranger/authorization/hive/authorizer/RangerHiveAuditHandler.java 765da59
> hive-agent/src/main/java/org/apache/ranger/authorization/hive/authorizer/RangerHiveAuthorizer.java f10bde4
>
>
> Diff: https://reviews.apache.org/r/71839/diff/3/
>
>
> Testing
> -------
>
> Verified in Local VM.
> 1) Show database and Show table via spark shell to invoke HMS api works as expected.
>
>
> Thanks,
>
> Ramesh Mani
>
>
Re: Review Request 71839: RANGER-2656:RangerHiveAuthorizer
filterListCmdObjects failed to filter database / tables when HMS calls the
authorizer for filtering
Posted by Ramesh Mani <rm...@hortonworks.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/71839/#review218835
-----------------------------------------------------------
hive-agent/src/main/java/org/apache/ranger/authorization/hive/authorizer/RangerHiveAuthorizer.java
Lines 895 (patched)
<https://reviews.apache.org/r/71839/#comment306717>
Yes that is needed. Just having 'any' permission in the request for show tables / views resulting in evaluation of a DATABASE policy allowing this access.
Expectation is that there should be a table level policy with "SELECT" permission giving access to those tables and views.
- Ramesh Mani
On Nov. 27, 2019, 5:53 p.m., Ramesh Mani wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/71839/
> -----------------------------------------------------------
>
> (Updated Nov. 27, 2019, 5:53 p.m.)
>
>
> Review request for ranger, Don Bosco Durai, Gautam Borad, Abhay Kulkarni, Madhan Neethiraj, Mehul Parikh, Pradeep Agrawal, Selvamohan Neethiraj, Sailaja Polavarapu, and Velmurugan Periasamy.
>
>
> Bugs: RANGER-2656
> https://issues.apache.org/jira/browse/RANGER-2656
>
>
> Repository: ranger
>
>
> Description
> -------
>
> RANGER-2656:RangerHiveAuthorizer filterListCmdObjects failed to filter database / tables when HMS calls the authorizer for filtering
>
>
> Diffs
> -----
>
> hive-agent/src/main/java/org/apache/ranger/authorization/hive/authorizer/RangerHiveAuthorizer.java b80f1bd
>
>
> Diff: https://reviews.apache.org/r/71839/diff/1/
>
>
> Testing
> -------
>
> Verified in Local VM.
> 1) Show database and Show table via spark shell to invoke HMS api works as expected.
>
>
> Thanks,
>
> Ramesh Mani
>
>
Re: Review Request 71839: RANGER-2656:RangerHiveAuthorizer
filterListCmdObjects failed to filter database / tables when HMS calls the
authorizer for filtering
Posted by Ramesh Mani <rm...@hortonworks.com>.
> On Nov. 27, 2019, 7:20 p.m., Abhay Kulkarni wrote:
> > hive-agent/src/main/java/org/apache/ranger/authorization/hive/authorizer/RangerHiveAuthorizer.java
> > Line 1158 (original), 1161 (patched)
> > <https://reviews.apache.org/r/71839/diff/1/?file=2179621#file2179621line1161>
> >
> > When objectType is DATABASE, isn't objectName the same as dbName?
ObjectName is always the table name, without dbName there filter is not working as it null.
- Ramesh
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/71839/#review218828
-----------------------------------------------------------
On Nov. 27, 2019, 5:53 p.m., Ramesh Mani wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/71839/
> -----------------------------------------------------------
>
> (Updated Nov. 27, 2019, 5:53 p.m.)
>
>
> Review request for ranger, Don Bosco Durai, Gautam Borad, Abhay Kulkarni, Madhan Neethiraj, Mehul Parikh, Pradeep Agrawal, Selvamohan Neethiraj, Sailaja Polavarapu, and Velmurugan Periasamy.
>
>
> Bugs: RANGER-2656
> https://issues.apache.org/jira/browse/RANGER-2656
>
>
> Repository: ranger
>
>
> Description
> -------
>
> RANGER-2656:RangerHiveAuthorizer filterListCmdObjects failed to filter database / tables when HMS calls the authorizer for filtering
>
>
> Diffs
> -----
>
> hive-agent/src/main/java/org/apache/ranger/authorization/hive/authorizer/RangerHiveAuthorizer.java b80f1bd
>
>
> Diff: https://reviews.apache.org/r/71839/diff/1/
>
>
> Testing
> -------
>
> Verified in Local VM.
> 1) Show database and Show table via spark shell to invoke HMS api works as expected.
>
>
> Thanks,
>
> Ramesh Mani
>
>
Re: Review Request 71839: RANGER-2656:RangerHiveAuthorizer
filterListCmdObjects failed to filter database / tables when HMS calls the
authorizer for filtering
Posted by Abhay Kulkarni <ak...@hortonworks.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/71839/#review218828
-----------------------------------------------------------
hive-agent/src/main/java/org/apache/ranger/authorization/hive/authorizer/RangerHiveAuthorizer.java
Line 1158 (original), 1161 (patched)
<https://reviews.apache.org/r/71839/#comment306711>
When objectType is DATABASE, isn't objectName the same as dbName?
- Abhay Kulkarni
On Nov. 27, 2019, 5:53 p.m., Ramesh Mani wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/71839/
> -----------------------------------------------------------
>
> (Updated Nov. 27, 2019, 5:53 p.m.)
>
>
> Review request for ranger, Don Bosco Durai, Gautam Borad, Abhay Kulkarni, Madhan Neethiraj, Mehul Parikh, Pradeep Agrawal, Selvamohan Neethiraj, Sailaja Polavarapu, and Velmurugan Periasamy.
>
>
> Bugs: RANGER-2656
> https://issues.apache.org/jira/browse/RANGER-2656
>
>
> Repository: ranger
>
>
> Description
> -------
>
> RANGER-2656:RangerHiveAuthorizer filterListCmdObjects failed to filter database / tables when HMS calls the authorizer for filtering
>
>
> Diffs
> -----
>
> hive-agent/src/main/java/org/apache/ranger/authorization/hive/authorizer/RangerHiveAuthorizer.java b80f1bd
>
>
> Diff: https://reviews.apache.org/r/71839/diff/1/
>
>
> Testing
> -------
>
> Verified in Local VM.
> 1) Show database and Show table via spark shell to invoke HMS api works as expected.
>
>
> Thanks,
>
> Ramesh Mani
>
>
Re: Review Request 71839: RANGER-2656:RangerHiveAuthorizer
filterListCmdObjects failed to filter database / tables when HMS calls the
authorizer for filtering
Posted by Abhay Kulkarni <ak...@hortonworks.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/71839/#review218833
-----------------------------------------------------------
Ship it!
Ship It!
- Abhay Kulkarni
On Nov. 27, 2019, 5:53 p.m., Ramesh Mani wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/71839/
> -----------------------------------------------------------
>
> (Updated Nov. 27, 2019, 5:53 p.m.)
>
>
> Review request for ranger, Don Bosco Durai, Gautam Borad, Abhay Kulkarni, Madhan Neethiraj, Mehul Parikh, Pradeep Agrawal, Selvamohan Neethiraj, Sailaja Polavarapu, and Velmurugan Periasamy.
>
>
> Bugs: RANGER-2656
> https://issues.apache.org/jira/browse/RANGER-2656
>
>
> Repository: ranger
>
>
> Description
> -------
>
> RANGER-2656:RangerHiveAuthorizer filterListCmdObjects failed to filter database / tables when HMS calls the authorizer for filtering
>
>
> Diffs
> -----
>
> hive-agent/src/main/java/org/apache/ranger/authorization/hive/authorizer/RangerHiveAuthorizer.java b80f1bd
>
>
> Diff: https://reviews.apache.org/r/71839/diff/1/
>
>
> Testing
> -------
>
> Verified in Local VM.
> 1) Show database and Show table via spark shell to invoke HMS api works as expected.
>
>
> Thanks,
>
> Ramesh Mani
>
>
Re: Review Request 71839: RANGER-2656:RangerHiveAuthorizer
filterListCmdObjects failed to filter database / tables when HMS calls the
authorizer for filtering
Posted by Madhan Neethiraj <ma...@apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/71839/#review218905
-----------------------------------------------------------
Ship it!
Ship It!
- Madhan Neethiraj
On Dec. 4, 2019, 1:41 a.m., Ramesh Mani wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/71839/
> -----------------------------------------------------------
>
> (Updated Dec. 4, 2019, 1:41 a.m.)
>
>
> Review request for ranger, Don Bosco Durai, Gautam Borad, Abhay Kulkarni, Madhan Neethiraj, Mehul Parikh, Pradeep Agrawal, Selvamohan Neethiraj, Sailaja Polavarapu, and Velmurugan Periasamy.
>
>
> Bugs: RANGER-2656
> https://issues.apache.org/jira/browse/RANGER-2656
>
>
> Repository: ranger
>
>
> Description
> -------
>
> RANGER-2656:RangerHiveAuthorizer filterListCmdObjects failed to filter database / tables when HMS calls the authorizer for filtering
>
>
> Diffs
> -----
>
> agents-common/src/main/java/org/apache/ranger/plugin/policyevaluator/RangerDefaultPolicyEvaluator.java 8469605
> agents-common/src/test/resources/policyengine/test_policyengine_hive.json efc1dcc
> hive-agent/src/main/java/org/apache/ranger/authorization/hive/authorizer/RangerHiveAuditHandler.java 765da59
> hive-agent/src/main/java/org/apache/ranger/authorization/hive/authorizer/RangerHiveAuthorizer.java f10bde4
>
>
> Diff: https://reviews.apache.org/r/71839/diff/3/
>
>
> Testing
> -------
>
> Verified in Local VM.
> 1) Show database and Show table via spark shell to invoke HMS api works as expected.
>
>
> Thanks,
>
> Ramesh Mani
>
>
Re: Review Request 71839: RANGER-2656:RangerHiveAuthorizer
filterListCmdObjects failed to filter database / tables when HMS calls the
authorizer for filtering
Posted by Ramesh Mani <rm...@hortonworks.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/71839/
-----------------------------------------------------------
(Updated Dec. 4, 2019, 1:41 a.m.)
Review request for ranger, Don Bosco Durai, Gautam Borad, Abhay Kulkarni, Madhan Neethiraj, Mehul Parikh, Pradeep Agrawal, Selvamohan Neethiraj, Sailaja Polavarapu, and Velmurugan Periasamy.
Changes
-------
Fixed review comments
Bugs: RANGER-2656
https://issues.apache.org/jira/browse/RANGER-2656
Repository: ranger
Description
-------
RANGER-2656:RangerHiveAuthorizer filterListCmdObjects failed to filter database / tables when HMS calls the authorizer for filtering
Diffs (updated)
-----
agents-common/src/main/java/org/apache/ranger/plugin/policyevaluator/RangerDefaultPolicyEvaluator.java 8469605
agents-common/src/test/resources/policyengine/test_policyengine_hive.json efc1dcc
hive-agent/src/main/java/org/apache/ranger/authorization/hive/authorizer/RangerHiveAuditHandler.java 765da59
hive-agent/src/main/java/org/apache/ranger/authorization/hive/authorizer/RangerHiveAuthorizer.java f10bde4
Diff: https://reviews.apache.org/r/71839/diff/3/
Changes: https://reviews.apache.org/r/71839/diff/2-3/
Testing
-------
Verified in Local VM.
1) Show database and Show table via spark shell to invoke HMS api works as expected.
Thanks,
Ramesh Mani
Re: Review Request 71839: RANGER-2656:RangerHiveAuthorizer
filterListCmdObjects failed to filter database / tables when HMS calls the
authorizer for filtering
Posted by Ramesh Mani <rm...@hortonworks.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/71839/
-----------------------------------------------------------
(Updated Nov. 29, 2019, 7:12 a.m.)
Review request for ranger, Don Bosco Durai, Gautam Borad, Abhay Kulkarni, Madhan Neethiraj, Mehul Parikh, Pradeep Agrawal, Selvamohan Neethiraj, Sailaja Polavarapu, and Velmurugan Periasamy.
Changes
-------
Fixed review comments.
Bugs: RANGER-2656
https://issues.apache.org/jira/browse/RANGER-2656
Repository: ranger
Description
-------
RANGER-2656:RangerHiveAuthorizer filterListCmdObjects failed to filter database / tables when HMS calls the authorizer for filtering
Diffs (updated)
-----
agents-common/src/main/java/org/apache/ranger/plugin/policyevaluator/RangerDefaultPolicyEvaluator.java 8469605
hive-agent/src/main/java/org/apache/ranger/authorization/hive/authorizer/RangerHiveAuthorizer.java f10bde4
Diff: https://reviews.apache.org/r/71839/diff/2/
Changes: https://reviews.apache.org/r/71839/diff/1-2/
Testing
-------
Verified in Local VM.
1) Show database and Show table via spark shell to invoke HMS api works as expected.
Thanks,
Ramesh Mani
Re: Review Request 71839: RANGER-2656:RangerHiveAuthorizer
filterListCmdObjects failed to filter database / tables when HMS calls the
authorizer for filtering
Posted by Madhan Neethiraj <ma...@apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/71839/#review218834
-----------------------------------------------------------
hive-agent/src/main/java/org/apache/ranger/authorization/hive/authorizer/RangerHiveAuthorizer.java
Lines 895 (patched)
<https://reviews.apache.org/r/71839/#comment306716>
Does this mean select privilege is necessary for a table/view to be included in the list returned from 'show tables'/'show views' commands?
- Madhan Neethiraj
On Nov. 27, 2019, 5:53 p.m., Ramesh Mani wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/71839/
> -----------------------------------------------------------
>
> (Updated Nov. 27, 2019, 5:53 p.m.)
>
>
> Review request for ranger, Don Bosco Durai, Gautam Borad, Abhay Kulkarni, Madhan Neethiraj, Mehul Parikh, Pradeep Agrawal, Selvamohan Neethiraj, Sailaja Polavarapu, and Velmurugan Periasamy.
>
>
> Bugs: RANGER-2656
> https://issues.apache.org/jira/browse/RANGER-2656
>
>
> Repository: ranger
>
>
> Description
> -------
>
> RANGER-2656:RangerHiveAuthorizer filterListCmdObjects failed to filter database / tables when HMS calls the authorizer for filtering
>
>
> Diffs
> -----
>
> hive-agent/src/main/java/org/apache/ranger/authorization/hive/authorizer/RangerHiveAuthorizer.java b80f1bd
>
>
> Diff: https://reviews.apache.org/r/71839/diff/1/
>
>
> Testing
> -------
>
> Verified in Local VM.
> 1) Show database and Show table via spark shell to invoke HMS api works as expected.
>
>
> Thanks,
>
> Ramesh Mani
>
>