Wechar created HIVE-27461:
-----------------------------
Summary: HiveMetaStoreAuthorizer lost the root cause of
checkPrivileges
Key: HIVE-27461
URL: https://issues.apache.org/jira/browse/HIVE-27461
Project: Hive
Issue Type: Improvement
Components: Hive
Reporter: Wechar
Assignee: Wechar
We discovered that the {{HiveMetaStoreAuthorizer}} fails to retain the
underlying cause of {{checkPrivileges}}, making it difficult for us to
troubleshoot authorization failures effectively.
{code:bash}
2023-06-21T18:45:03,695 ERROR [pool-10-thread-1]:
metastore.HiveMetaStoreAuthorizer (HiveMetaStoreAuthorizer.java:onEvent(111)) -
HiveMeta
StoreAuthorizer.onEvent(): failed
org.apache.hadoop.hive.metastore.api.MetaException: Permission denied:
Principal [name=weiqiang.yu, type=USER] does not have following pri
vileges for operation QUERY [[SELECT] on Object [type=DATABASE, name=default]]
at
org.apache.hadoop.hive.ql.security.authorization.plugin.metastore.HiveMetaStoreAuthorizer.checkPrivileges(HiveMetaStoreAuthoriz
er.java:232) ~[hive-exec-3.1.2-sdi-022.jar:3.1.2-sdi-022]
at
org.apache.hadoop.hive.ql.security.authorization.plugin.metastore.HiveMetaStoreAuthorizer.onEvent(HiveMetaStoreAuthorizer.java:
108) [hive-exec-3.1.2-sdi-022.jar:3.1.2-sdi-022]
at
org.apache.hadoop.hive.metastore.HiveMetaStore$HMSHandler.firePreEvent(HiveMetaStore.java:3469)
[hive-exec-3.1.2-sdi-022.jar:3.
1.2-sdi-022]
at
org.apache.hadoop.hive.metastore.HiveMetaStore$HMSHandler.get_database(HiveMetaStore.java:1463)
[hive-exec-3.1.2-sdi-022.jar:3.
1.2-sdi-022]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
~[?:1.8.0_252]
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
~[?:1.8.0_252]
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
~[?:1.8.0_252]
at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_252]
at
org.apache.hadoop.hive.metastore.RetryingHMSHandler.invokeInternal(RetryingHMSHandler.java:158)
[hive-exec-3.1.2-sdi-022.jar:3.
1.2-sdi-022]
at
org.apache.hadoop.hive.metastore.RetryingHMSHandler.invoke(RetryingHMSHandler.java:119)
[hive-exec-3.1.2-sdi-022.jar:3.1.2-sdi-
022]
at com.sun.proxy.$Proxy29.get_database(Unknown Source) [?:?]
at
org.apache.hadoop.hive.metastore.api.ThriftHiveMetastore$Processor$get_d
{code}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)