Skip to content

Commit 741f233

Browse files
Sanket-Shelarmneethiraj
authored andcommitted
RANGER-4690: updated Hive plugin to fix incorrect policy version in access audits in case of deny due to masking/row-filter policies
Signed-off-by: Madhan Neethiraj <[email protected]>
1 parent 168613e commit 741f233

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

hive-agent/src/main/java/org/apache/ranger/authorization/hive/authorizer/RangerHiveAuthorizer.java

+2
Original file line numberDiff line numberDiff line change
@@ -1068,6 +1068,7 @@ public void checkPrivileges(HiveOperationType hiveOpType,
10681068

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

10831084
result.setIsAllowed(false);
10841085
result.setPolicyId(dataMaskResult.getPolicyId());
1086+
result.setPolicyVersion(dataMaskResult.getPolicyVersion());
10851087
result.setReason("User does not have access to unmasked column values");
10861088
}
10871089
}

0 commit comments

Comments
 (0)