ranger
ranger copied to clipboard
RANGER-5225: Override policy should take precedence over normal deny policy
What changes were proposed in this pull request?
Steps to reproduce: Tag an hdfs path /override-path in atlas as PII Deny PII policy for user userx Allow override policy for user userx hdfs dfs -ls /override-path User gets access denied. Expected behavior is access allowed
Behavior also reproducible by additional unit tests in policy engine
The PR fixes the bug wherein allow result overrides the previous deny result if priority of allow policy is greater than the priority of the deny policy
How was this patch tested?
Added new unit tests which failed without the proposed changes. The new unit tests pass after the bug fix.