sam-an-cloudera commented on a change in pull request #1221:
URL: https://github.com/apache/hive/pull/1221#discussion_r457736948
##########
File path:
ql/src/java/org/apache/hadoop/hive/ql/security/authorization/plugin/metastore/HiveMetaStoreAuthorizer.java
##########
@@ -312,5 +578,13 @@ private String getCurrentUser() {
private String getCurrentUser(HiveMetaStoreAuthorizableEvent
authorizableEvent) {
return authorizableEvent.getAuthzContext().getUGI().getShortUserName();
}
+
+ private UserGroupInformation getUGI() {
+ try {
+ return UserGroupInformation.getCurrentUser();
+ } catch (IOException excp) {
Review comment:
Good catch. I didn't know we were just copy and pasting. Other codes
using getCurrentUser were either crashing or rethrow, so I've changed it to
throw, and more importantly, return false to the skipAuthorization call.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]