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


Ship it!




Ship It!

- Madhan Neethiraj


On Aug. 1, 2018, 9:21 p.m., Abhay Kulkarni wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/68153/
> -----------------------------------------------------------
> 
> (Updated Aug. 1, 2018, 9:21 p.m.)
> 
> 
> Review request for ranger and Madhan Neethiraj.
> 
> 
> Bugs: RANGER-2180
>     https://issues.apache.org/jira/browse/RANGER-2180
> 
> 
> Repository: ranger
> 
> 
> Description
> -------
> 
> When a policy resource contains a token (such as {USER}), and request context 
> does not have an entry for the token (in this case, USER), then the 
> replacement fails and the expanded policy resource is set to null. A null 
> policy-resource will not match any policy, and may cause NPE.
> 
> In such case, the original policy resource string should be returned as the 
> expanded policy resource string.
> 
> 
> Diffs
> -----
> 
>   
> agents-common/src/main/java/org/apache/ranger/plugin/util/StringTokenReplacer.java
>  2ec809cee 
>   
> agents-common/src/test/resources/resourcematcher/test_resourcematcher_dynamic.json
>  5237d4773 
>   
> agents-common/src/test/resources/resourcematcher/test_resourcematcher_wildcards_as_delimiters.json
>  c907f414e 
> 
> 
> Diff: https://reviews.apache.org/r/68153/diff/1/
> 
> 
> Testing
> -------
> 
> Passes all unit tests
> 
> 
> Thanks,
> 
> Abhay Kulkarni
> 
>

Reply via email to