DanielZhu58 commented on code in PR #6884:
URL: https://github.com/apache/hive/pull/6884#discussion_r4418688697
##########
standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/handler/BaseHandler.java:
##########
@@ -874,6 +874,28 @@ private void authorizeProxyPrivilege() throws TException {
}
}
+ /**
+ * Tells whether the caller may be treated as a trusted proxy/operator (e.g.
HiveServer2 or the compactor),
+ * using the same rules as {@link #authorizeProxyPrivilege()} but without
failing the call: the caller is
+ * trusted in embedded mode, when the proxy check is disabled, in test mode,
or when the user has host-proxy
+ * privileges.
+ */
+ protected boolean hasProxyPrivilege() throws TException {
+ if (!HiveMetaStore.isMetaStoreRemote() ||
+ !MetastoreConf.getBoolVar(conf,
MetastoreConf.ConfVars.EVENT_DB_NOTIFICATION_API_AUTH) ||
+ conf.getBoolean(HIVE_IN_TEST.getVarname(), false)) {
Review Comment:
Not changing. We can reuse authorizeProxyPrivilege, same as the other
maintenance APIs. The flag defaults to true, and turning it off is an operator
decision.
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]