Skip to content

Commit

Permalink
RANGER-4690: updated Hive plugin to fix incorrect policy version in a…
Browse files Browse the repository at this point in the history
…ccess audits in case of deny due to masking/row-filter policies

Signed-off-by: Madhan Neethiraj <madhan@apache.org>
  • Loading branch information
Sanket-Shelar authored and mneethiraj committed Feb 8, 2024
1 parent 168613e commit 741f233
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1068,6 +1068,7 @@ public void checkPrivileges(HiveOperationType hiveOpType,

result.setIsAllowed(false);
result.setPolicyId(rowFilterResult.getPolicyId());
result.setPolicyVersion(rowFilterResult.getPolicyVersion());
result.setReason("User does not have access to all rows of the table");
} else {
// check if masking is enabled for any column in the table/view
Expand All @@ -1082,6 +1083,7 @@ public void checkPrivileges(HiveOperationType hiveOpType,

result.setIsAllowed(false);
result.setPolicyId(dataMaskResult.getPolicyId());
result.setPolicyVersion(dataMaskResult.getPolicyVersion());
result.setReason("User does not have access to unmasked column values");
}
}
Expand Down

0 comments on commit 741f233

Please sign in to comment.