----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/74522/#review225643 -----------------------------------------------------------
agents-common/src/test/java/org/apache/ranger/plugin/resourcematcher/RangerDefaultResourceMatcherTest.java Line 39 (original), 41 (patched) <https://reviews.apache.org/r/74522/#comment314112> > the scope is set to SELF matchType here is not an input to the matcher; it is the expected value from ResourceMatcher implementation. A policy having "*" will match every resource; the same policy with excludes=true will match no resource. Hence the expected matchType=NONE and result=false. agents-common/src/test/java/org/apache/ranger/plugin/resourcematcher/RangerDefaultResourceMatcherTest.java Line 42 (original), 44 (patched) <https://reviews.apache.org/r/74522/#comment314113> > Here, the matchType is NONE, and when compared with NONE Same as the response to the previous comment. matchType here is not an input to ResourceMatcher implementation. It is the expected output. - Madhan Neethiraj 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 > >
