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


Fix it, then Ship it!





agents-common/src/main/java/org/apache/ranger/plugin/resourcematcher/RangerDefaultResourceMatcher.java
Lines 90 (patched)
<https://reviews.apache.org/r/74522/#comment314116>

    Consider changing this to 
    
    if (ret == ResourceElementMatchType.SELF) {
    
    for better readability, here and at line 107.



agents-common/src/main/java/org/apache/ranger/plugin/resourcematcher/RangerPathResourceMatcher.java
Lines 314 (patched)
<https://reviews.apache.org/r/74522/#comment314117>

    I cannot see why removing BiFunction from PathResourceMatcher (with 
consequent changes to the isMatch() and isChildMatch() methods) was necessary 
for introducing PathStartsWithResourceMatcher and PathEndsWithResourceMatcher 
classes. If it is not necessary, then some of the changes in this patch may not 
be required.


- Abhay Kulkarni


On July 25, 2023, 8:34 p.m., Madhan Neethiraj wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/74522/
> -----------------------------------------------------------
> 
> (Updated July 25, 2023, 8:34 p.m.)
> 
> 
> Review request for ranger, Hayat Behlim, Abhay Kulkarni, Mehul Parikh, Monika 
> Kachhadiya, Ramesh Mani, Subhrat Chaudhary, and Velmurugan Periasamy.
> 
> 
> Bugs: RANGER-4328
>     https://issues.apache.org/jira/browse/RANGER-4328
> 
> 
> Repository: ranger
> 
> 
> Description
> -------
> 
> updated ResourceMatcher.isPrefixMatch() implementations to handle wildcards 
> correctly
> 
> 
> Diffs
> -----
> 
>   
> agents-common/src/main/java/org/apache/ranger/plugin/resourcematcher/RangerAbstractResourceMatcher.java
>  cb8d46adf 
>   
> agents-common/src/main/java/org/apache/ranger/plugin/resourcematcher/RangerDefaultResourceMatcher.java
>  702cb272f 
>   
> agents-common/src/main/java/org/apache/ranger/plugin/resourcematcher/RangerPathResourceMatcher.java
>  3c1523c25 
>   
> agents-common/src/main/java/org/apache/ranger/plugin/resourcematcher/RangerResourceMatcher.java
>  c4ce30d36 
>   
> agents-common/src/main/java/org/apache/ranger/plugin/resourcematcher/RangerURLResourceMatcher.java
>  ce73b3006 
>   
> agents-common/src/main/java/org/apache/ranger/plugin/resourcematcher/ResourceMatcher.java
>  ad0942fbe 
>   
> agents-common/src/test/java/org/apache/ranger/plugin/resourcematcher/RangerAbstractResourceMatcherTest.java
>  767795e81 
>   
> agents-common/src/test/java/org/apache/ranger/plugin/resourcematcher/RangerDefaultResourceMatcherTest.java
>  e00bc834d 
>   
> agents-common/src/test/java/org/apache/ranger/plugin/resourcematcher/RangerPathResourceMatcherTest.java
>  ed02be674 
>   
> agents-common/src/test/java/org/apache/ranger/plugin/resourcematcher/RangerURLResourceMatcherTest.java
>  904cb61b2 
> 
> 
> Diff: https://reviews.apache.org/r/74522/diff/4/
> 
> 
> Testing
> -------
> 
> - updated unittests to include wildcards at the beginning and in the middle 
> of policy values
> - verified that all unit tests pass successfully
> 
> 
> Thanks,
> 
> Madhan Neethiraj
> 
>

Reply via email to