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 2022/07/02 06:58:12 UTC
Review Request 74045: RANGER-3816: getResourceACLs() updated to handle macros in resource values
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/74045/
-----------------------------------------------------------
Review request for ranger, Abhishek Kumar, Ankita Sinha, Kishor Gollapalliwar, Abhay Kulkarni, Mehul Parikh, Ramesh Mani, Sailaja Polavarapu, Subhrat Chaudhary, and Velmurugan Periasamy.
Bugs: RANGER-3816
https://issues.apache.org/jira/browse/RANGER-3816
Repository: ranger
Description
-------
- updated RangerPolicyEngine.getResourceACLs() to handle policies with macros in resource values
Diffs
-----
agents-common/src/main/java/org/apache/ranger/plugin/policyengine/RangerPolicyEngineImpl.java 3ae0add51
agents-common/src/main/java/org/apache/ranger/plugin/policyevaluator/RangerAbstractPolicyEvaluator.java c16d2acb0
agents-common/src/main/java/org/apache/ranger/plugin/policyevaluator/RangerPolicyEvaluator.java d1c2f7cde
agents-common/src/main/java/org/apache/ranger/plugin/policyresourcematcher/RangerDefaultPolicyResourceMatcher.java 15f2522db
agents-common/src/main/java/org/apache/ranger/plugin/util/RangerRequestExprResolver.java 4e5d949de
agents-common/src/test/java/org/apache/ranger/plugin/policyengine/TestPolicyACLs.java b6135b096
agents-common/src/test/resources/policyengine/test_aclprovider_default.json 37f4f3c2d
Diff: https://reviews.apache.org/r/74045/diff/1/
Testing
-------
- updated unit test with tests cases for policies with resources like "test_[USER]" and "/home/${{USER.dept}}"
- verified that all existing unit test pass successfully
Thanks,
Madhan Neethiraj
Re: Review Request 74045: RANGER-3816: getResourceACLs() updated to handle macros in resource values
Posted by Abhay Kulkarni <ak...@hortonworks.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/74045/#review224608
-----------------------------------------------------------
agents-common/src/main/java/org/apache/ranger/plugin/util/RangerRequestExprResolver.java
Lines 58 (patched)
<https://reviews.apache.org/r/74045/#comment313390>
An explanatory comment for this function will be useful to understand this function, and in what context it is called.
- Abhay Kulkarni
On July 10, 2022, 7:26 p.m., Madhan Neethiraj wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/74045/
> -----------------------------------------------------------
>
> (Updated July 10, 2022, 7:26 p.m.)
>
>
> Review request for ranger, Abhishek Kumar, Ankita Sinha, Kishor Gollapalliwar, Abhay Kulkarni, Mehul Parikh, Ramesh Mani, Sailaja Polavarapu, Subhrat Chaudhary, and Velmurugan Periasamy.
>
>
> Bugs: RANGER-3816
> https://issues.apache.org/jira/browse/RANGER-3816
>
>
> Repository: ranger
>
>
> Description
> -------
>
> - updated RangerPolicyEngine.getResourceACLs() to handle policies with macros in resource values
>
>
> Diffs
> -----
>
> agents-common/src/main/java/org/apache/ranger/plugin/policyengine/RangerPolicyEngineImpl.java 3ae0add51
> agents-common/src/main/java/org/apache/ranger/plugin/policyengine/RangerResourceACLs.java aa49507b8
> agents-common/src/main/java/org/apache/ranger/plugin/policyevaluator/RangerAbstractPolicyEvaluator.java c16d2acb0
> agents-common/src/main/java/org/apache/ranger/plugin/policyevaluator/RangerPolicyEvaluator.java d1c2f7cde
> agents-common/src/main/java/org/apache/ranger/plugin/policyresourcematcher/RangerDefaultPolicyResourceMatcher.java 15f2522db
> agents-common/src/main/java/org/apache/ranger/plugin/util/RangerRequestExprResolver.java 4e5d949de
> agents-common/src/test/java/org/apache/ranger/plugin/policyengine/TestPolicyACLs.java b6135b096
> agents-common/src/test/resources/policyengine/test_aclprovider_default.json 37f4f3c2d
>
>
> Diff: https://reviews.apache.org/r/74045/diff/2/
>
>
> Testing
> -------
>
> - updated unit test with tests cases for policies with resources like "test_[USER]" and "/home/${{USER.dept}}"
> - verified that all existing unit test pass successfully
>
>
> Thanks,
>
> Madhan Neethiraj
>
>
Re: Review Request 74045: RANGER-3816: getResourceACLs() updated to handle macros in resource values
Posted by Ankita Sinha <an...@freestoneinfotech.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/74045/#review224592
-----------------------------------------------------------
Ship it!
Ship It!
- Ankita Sinha
On July 10, 2022, 7:26 p.m., Madhan Neethiraj wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/74045/
> -----------------------------------------------------------
>
> (Updated July 10, 2022, 7:26 p.m.)
>
>
> Review request for ranger, Abhishek Kumar, Ankita Sinha, Kishor Gollapalliwar, Abhay Kulkarni, Mehul Parikh, Ramesh Mani, Sailaja Polavarapu, Subhrat Chaudhary, and Velmurugan Periasamy.
>
>
> Bugs: RANGER-3816
> https://issues.apache.org/jira/browse/RANGER-3816
>
>
> Repository: ranger
>
>
> Description
> -------
>
> - updated RangerPolicyEngine.getResourceACLs() to handle policies with macros in resource values
>
>
> Diffs
> -----
>
> agents-common/src/main/java/org/apache/ranger/plugin/policyengine/RangerPolicyEngineImpl.java 3ae0add51
> agents-common/src/main/java/org/apache/ranger/plugin/policyengine/RangerResourceACLs.java aa49507b8
> agents-common/src/main/java/org/apache/ranger/plugin/policyevaluator/RangerAbstractPolicyEvaluator.java c16d2acb0
> agents-common/src/main/java/org/apache/ranger/plugin/policyevaluator/RangerPolicyEvaluator.java d1c2f7cde
> agents-common/src/main/java/org/apache/ranger/plugin/policyresourcematcher/RangerDefaultPolicyResourceMatcher.java 15f2522db
> agents-common/src/main/java/org/apache/ranger/plugin/util/RangerRequestExprResolver.java 4e5d949de
> agents-common/src/test/java/org/apache/ranger/plugin/policyengine/TestPolicyACLs.java b6135b096
> agents-common/src/test/resources/policyengine/test_aclprovider_default.json 37f4f3c2d
>
>
> Diff: https://reviews.apache.org/r/74045/diff/2/
>
>
> Testing
> -------
>
> - updated unit test with tests cases for policies with resources like "test_[USER]" and "/home/${{USER.dept}}"
> - verified that all existing unit test pass successfully
>
>
> Thanks,
>
> Madhan Neethiraj
>
>
Re: Review Request 74045: RANGER-3816: getResourceACLs() updated to handle macros in resource values
Posted by Abhay Kulkarni <ak...@hortonworks.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/74045/#review224617
-----------------------------------------------------------
Ship it!
Ship It!
- Abhay Kulkarni
On Aug. 11, 2022, 7:43 p.m., Madhan Neethiraj wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/74045/
> -----------------------------------------------------------
>
> (Updated Aug. 11, 2022, 7:43 p.m.)
>
>
> Review request for ranger, Abhishek Kumar, Ankita Sinha, Kishor Gollapalliwar, Abhay Kulkarni, Mehul Parikh, Ramesh Mani, Sailaja Polavarapu, Subhrat Chaudhary, and Velmurugan Periasamy.
>
>
> Bugs: RANGER-3816
> https://issues.apache.org/jira/browse/RANGER-3816
>
>
> Repository: ranger
>
>
> Description
> -------
>
> - updated RangerPolicyEngine.getResourceACLs() to handle policies with macros in resource values
>
>
> Diffs
> -----
>
> agents-common/src/main/java/org/apache/ranger/plugin/policyengine/RangerPolicyEngineImpl.java 3ae0add51
> agents-common/src/main/java/org/apache/ranger/plugin/policyengine/RangerResourceACLs.java aa49507b8
> agents-common/src/main/java/org/apache/ranger/plugin/policyevaluator/RangerAbstractPolicyEvaluator.java c16d2acb0
> agents-common/src/main/java/org/apache/ranger/plugin/policyevaluator/RangerPolicyEvaluator.java d1c2f7cde
> agents-common/src/main/java/org/apache/ranger/plugin/policyresourcematcher/RangerDefaultPolicyResourceMatcher.java 15f2522db
> agents-common/src/main/java/org/apache/ranger/plugin/util/RangerRequestExprResolver.java 4e5d949de
> agents-common/src/test/java/org/apache/ranger/plugin/policyengine/TestPolicyACLs.java b6135b096
> agents-common/src/test/resources/policyengine/test_aclprovider_default.json 37f4f3c2d
>
>
> Diff: https://reviews.apache.org/r/74045/diff/4/
>
>
> Testing
> -------
>
> - updated unit test with tests cases for policies with resources like "test_[USER]" and "/home/${{USER.dept}}"
> - verified that all existing unit test pass successfully
>
>
> Thanks,
>
> Madhan Neethiraj
>
>
Re: Review Request 74045: RANGER-3816: getResourceACLs() updated to handle macros in resource values
Posted by Madhan Neethiraj <ma...@apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/74045/
-----------------------------------------------------------
(Updated Aug. 11, 2022, 7:43 p.m.)
Review request for ranger, Abhishek Kumar, Ankita Sinha, Kishor Gollapalliwar, Abhay Kulkarni, Mehul Parikh, Ramesh Mani, Sailaja Polavarapu, Subhrat Chaudhary, and Velmurugan Periasamy.
Changes
-------
updates to address the review comment.
Bugs: RANGER-3816
https://issues.apache.org/jira/browse/RANGER-3816
Repository: ranger
Description
-------
- updated RangerPolicyEngine.getResourceACLs() to handle policies with macros in resource values
Diffs (updated)
-----
agents-common/src/main/java/org/apache/ranger/plugin/policyengine/RangerPolicyEngineImpl.java 3ae0add51
agents-common/src/main/java/org/apache/ranger/plugin/policyengine/RangerResourceACLs.java aa49507b8
agents-common/src/main/java/org/apache/ranger/plugin/policyevaluator/RangerAbstractPolicyEvaluator.java c16d2acb0
agents-common/src/main/java/org/apache/ranger/plugin/policyevaluator/RangerPolicyEvaluator.java d1c2f7cde
agents-common/src/main/java/org/apache/ranger/plugin/policyresourcematcher/RangerDefaultPolicyResourceMatcher.java 15f2522db
agents-common/src/main/java/org/apache/ranger/plugin/util/RangerRequestExprResolver.java 4e5d949de
agents-common/src/test/java/org/apache/ranger/plugin/policyengine/TestPolicyACLs.java b6135b096
agents-common/src/test/resources/policyengine/test_aclprovider_default.json 37f4f3c2d
Diff: https://reviews.apache.org/r/74045/diff/4/
Changes: https://reviews.apache.org/r/74045/diff/3-4/
Testing
-------
- updated unit test with tests cases for policies with resources like "test_[USER]" and "/home/${{USER.dept}}"
- verified that all existing unit test pass successfully
Thanks,
Madhan Neethiraj
Re: Review Request 74045: RANGER-3816: getResourceACLs() updated to handle macros in resource values
Posted by Abhay Kulkarni <ak...@hortonworks.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/74045/#review224616
-----------------------------------------------------------
agents-common/src/main/java/org/apache/ranger/plugin/policyevaluator/RangerAbstractPolicyEvaluator.java
Lines 309 (patched)
<https://reviews.apache.org/r/74045/#comment313401>
Please review to see if this variable needs to be marked as volatile to have the synchronization code in getMacrosReplacedWithWildcardMatcher() function work correctly.
- Abhay Kulkarni
On Aug. 9, 2022, 10:56 p.m., Madhan Neethiraj wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/74045/
> -----------------------------------------------------------
>
> (Updated Aug. 9, 2022, 10:56 p.m.)
>
>
> Review request for ranger, Abhishek Kumar, Ankita Sinha, Kishor Gollapalliwar, Abhay Kulkarni, Mehul Parikh, Ramesh Mani, Sailaja Polavarapu, Subhrat Chaudhary, and Velmurugan Periasamy.
>
>
> Bugs: RANGER-3816
> https://issues.apache.org/jira/browse/RANGER-3816
>
>
> Repository: ranger
>
>
> Description
> -------
>
> - updated RangerPolicyEngine.getResourceACLs() to handle policies with macros in resource values
>
>
> Diffs
> -----
>
> agents-common/src/main/java/org/apache/ranger/plugin/policyengine/RangerPolicyEngineImpl.java 3ae0add51
> agents-common/src/main/java/org/apache/ranger/plugin/policyengine/RangerResourceACLs.java aa49507b8
> agents-common/src/main/java/org/apache/ranger/plugin/policyevaluator/RangerAbstractPolicyEvaluator.java c16d2acb0
> agents-common/src/main/java/org/apache/ranger/plugin/policyevaluator/RangerPolicyEvaluator.java d1c2f7cde
> agents-common/src/main/java/org/apache/ranger/plugin/policyresourcematcher/RangerDefaultPolicyResourceMatcher.java 15f2522db
> agents-common/src/main/java/org/apache/ranger/plugin/util/RangerRequestExprResolver.java 4e5d949de
> agents-common/src/test/java/org/apache/ranger/plugin/policyengine/TestPolicyACLs.java b6135b096
> agents-common/src/test/resources/policyengine/test_aclprovider_default.json 37f4f3c2d
>
>
> Diff: https://reviews.apache.org/r/74045/diff/3/
>
>
> Testing
> -------
>
> - updated unit test with tests cases for policies with resources like "test_[USER]" and "/home/${{USER.dept}}"
> - verified that all existing unit test pass successfully
>
>
> Thanks,
>
> Madhan Neethiraj
>
>
Re: Review Request 74045: RANGER-3816: getResourceACLs() updated to handle macros in resource values
Posted by Madhan Neethiraj <ma...@apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/74045/
-----------------------------------------------------------
(Updated Aug. 9, 2022, 10:56 p.m.)
Review request for ranger, Abhishek Kumar, Ankita Sinha, Kishor Gollapalliwar, Abhay Kulkarni, Mehul Parikh, Ramesh Mani, Sailaja Polavarapu, Subhrat Chaudhary, and Velmurugan Periasamy.
Changes
-------
addressed the review comment
Bugs: RANGER-3816
https://issues.apache.org/jira/browse/RANGER-3816
Repository: ranger
Description
-------
- updated RangerPolicyEngine.getResourceACLs() to handle policies with macros in resource values
Diffs (updated)
-----
agents-common/src/main/java/org/apache/ranger/plugin/policyengine/RangerPolicyEngineImpl.java 3ae0add51
agents-common/src/main/java/org/apache/ranger/plugin/policyengine/RangerResourceACLs.java aa49507b8
agents-common/src/main/java/org/apache/ranger/plugin/policyevaluator/RangerAbstractPolicyEvaluator.java c16d2acb0
agents-common/src/main/java/org/apache/ranger/plugin/policyevaluator/RangerPolicyEvaluator.java d1c2f7cde
agents-common/src/main/java/org/apache/ranger/plugin/policyresourcematcher/RangerDefaultPolicyResourceMatcher.java 15f2522db
agents-common/src/main/java/org/apache/ranger/plugin/util/RangerRequestExprResolver.java 4e5d949de
agents-common/src/test/java/org/apache/ranger/plugin/policyengine/TestPolicyACLs.java b6135b096
agents-common/src/test/resources/policyengine/test_aclprovider_default.json 37f4f3c2d
Diff: https://reviews.apache.org/r/74045/diff/3/
Changes: https://reviews.apache.org/r/74045/diff/2-3/
Testing
-------
- updated unit test with tests cases for policies with resources like "test_[USER]" and "/home/${{USER.dept}}"
- verified that all existing unit test pass successfully
Thanks,
Madhan Neethiraj
Re: Review Request 74045: RANGER-3816: getResourceACLs() updated to handle macros in resource values
Posted by Madhan Neethiraj <ma...@apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/74045/
-----------------------------------------------------------
(Updated July 10, 2022, 7:26 p.m.)
Review request for ranger, Abhishek Kumar, Ankita Sinha, Kishor Gollapalliwar, Abhay Kulkarni, Mehul Parikh, Ramesh Mani, Sailaja Polavarapu, Subhrat Chaudhary, and Velmurugan Periasamy.
Changes
-------
added test cases to cover one policy allowing access conditionally and another allowing unconditionally
Bugs: RANGER-3816
https://issues.apache.org/jira/browse/RANGER-3816
Repository: ranger
Description
-------
- updated RangerPolicyEngine.getResourceACLs() to handle policies with macros in resource values
Diffs (updated)
-----
agents-common/src/main/java/org/apache/ranger/plugin/policyengine/RangerPolicyEngineImpl.java 3ae0add51
agents-common/src/main/java/org/apache/ranger/plugin/policyengine/RangerResourceACLs.java aa49507b8
agents-common/src/main/java/org/apache/ranger/plugin/policyevaluator/RangerAbstractPolicyEvaluator.java c16d2acb0
agents-common/src/main/java/org/apache/ranger/plugin/policyevaluator/RangerPolicyEvaluator.java d1c2f7cde
agents-common/src/main/java/org/apache/ranger/plugin/policyresourcematcher/RangerDefaultPolicyResourceMatcher.java 15f2522db
agents-common/src/main/java/org/apache/ranger/plugin/util/RangerRequestExprResolver.java 4e5d949de
agents-common/src/test/java/org/apache/ranger/plugin/policyengine/TestPolicyACLs.java b6135b096
agents-common/src/test/resources/policyengine/test_aclprovider_default.json 37f4f3c2d
Diff: https://reviews.apache.org/r/74045/diff/2/
Changes: https://reviews.apache.org/r/74045/diff/1-2/
Testing
-------
- updated unit test with tests cases for policies with resources like "test_[USER]" and "/home/${{USER.dept}}"
- verified that all existing unit test pass successfully
Thanks,
Madhan Neethiraj