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

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