Quanlong Huang has posted comments on this change. ( 
http://gerrit.cloudera.org:8080/15854 )

Change subject: IMPALA-9597: Eliminate redundant Ranger audits for column 
masking
......................................................................


Patch Set 11: Code-Review+1

(1 comment)

http://gerrit.cloudera.org:8080/#/c/15854/11/fe/src/main/java/org/apache/impala/authorization/ranger/RangerAuthorizationContext.java
File 
fe/src/main/java/org/apache/impala/authorization/ranger/RangerAuthorizationContext.java:

http://gerrit.cloudera.org:8080/#/c/15854/11/fe/src/main/java/org/apache/impala/authorization/ranger/RangerAuthorizationContext.java@69
PS11, Line 69:           StringUtils.equalsIgnoreCase(event.getAccessType(), 
"MASK") ||
             :           StringUtils.equalsIgnoreCase(event.getAccessType(), 
"MASK_SHOW_LAST_4") ||
             :           StringUtils.equalsIgnoreCase(event.getAccessType(), 
"MASK_SHOW_FIRST_4") ||
             :           StringUtils.equalsIgnoreCase(event.getAccessType(), 
"MASK_HASH") ||
             :           StringUtils.equalsIgnoreCase(event.getAccessType(), 
"MASK_NULL") ||
             :           StringUtils.equalsIgnoreCase(event.getAccessType(), 
"SELECT") ||
             :           StringUtils.equalsIgnoreCase(event.getAccessType(), 
"MASK_DATE_SHOW_YEAR") ||
             :           StringUtils.equalsIgnoreCase(event.getAccessType(), 
"CUSTOM"));
Are these constant strings somewhere in Ranger's code base? It'd be more 
maintainable than hard coding them here if we can use a string set of Ranger 
for this. So when Ranger adds a new mask type in the future, we don't need to 
add a new check here.



--
To view, visit http://gerrit.cloudera.org:8080/15854
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I42d60130fba93d63fbc36949f2bf746b7ae2497d
Gerrit-Change-Number: 15854
Gerrit-PatchSet: 11
Gerrit-Owner: Fang-Yu Rao <[email protected]>
Gerrit-Reviewer: Csaba Ringhofer <[email protected]>
Gerrit-Reviewer: Fang-Yu Rao <[email protected]>
Gerrit-Reviewer: Impala Public Jenkins <[email protected]>
Gerrit-Reviewer: Quanlong Huang <[email protected]>
Gerrit-Comment-Date: Fri, 15 May 2020 14:33:23 +0000
Gerrit-HasComments: Yes

Reply via email to