sankarh commented on a change in pull request #558: HIVE-21325 : Hive external
table replication failed with Permission denied issue.
URL: https://github.com/apache/hive/pull/558#discussion_r262910075
##########
File path:
ql/src/java/org/apache/hadoop/hive/ql/security/authorization/StorageBasedAuthorizationProvider.java
##########
@@ -188,6 +191,17 @@ public void authorize(Table table, Privilege[]
readRequiredPriv, Privilege[] wri
checkDeletePermission(path, getConf(), authenticator.getUserName());
}
+ try {
+ String user = SecurityUtils.getUGI().getShortUserName();
+ if (MetaStoreServerUtils.checkUserHasHostProxyPrivileges(user, getConf(),
+ HiveMetaStore.HMSHandler.getIPAddress())) {
+ LOG.info("Path authentication is skipped for user {} with host proxy
privilege." + user);
+ }
+ } catch (Exception ex) {
+ // if can not decide on the proxy privilege status, then proceed with
authorization check.
+ LOG.error("Cannot obtain username to check for host proxy privilege",
ex);
Review comment:
This can be warning msg.
----------------------------------------------------------------
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]
With regards,
Apache Git Services