spark-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Himangshu Borah (JIRA)" <>
Subject [jira] [Commented] (SPARK-5159) Thrift server does not respect hive.server2.enable.doAs=true
Date Sat, 28 Jan 2017 13:54:25 GMT


Himangshu Borah commented on SPARK-5159:

This issue is not resolved. Found the same in spark 1.6.2. In a kerberos environment, where
the spark-thrift and hiveServer2 processes are running through a user (User "hive" in my case),
any command executed through the thrift is getting executed by that user("hive" in my case).
But we are trying to impersonate the request as another user "Buser" as the table used in
the query has access to "Buser" only.

How I am using -
beeline> !connect jdbc:hive2://<IP>:<port_for_thrift>/default;principal=hive/;hive.server2.proxy.user=Buser;

And executing a select command on an existing table. The location for table have permission
like -
Buser:hdfs:drwx------     (700 permission for the owner only)

Getting response -
Error: org.apache.hadoop.hive.ql.metadata.HiveException: Unable to fetch table example_table. Permission denied: user=hive, access=EXECUTE,
        at org.apache.hadoop.hdfs.server.namenode.FSPermissionChecker.check(
        at org.apache.hadoop.hdfs.server.namenode.FSPermissionChecker.checkTraverse(
        at org.apache.hadoop.hdfs.server.namenode.FSPermissionChecker.checkPermission(

But same query is executing fine if we use the hive-thrift.
The spark thrift is not respecting the property property hive.server2.proxy.user=Buser; and
trying to execute the query with the user owning the spark-thrift process.

> Thrift server does not respect hive.server2.enable.doAs=true
> ------------------------------------------------------------
>                 Key: SPARK-5159
>                 URL:
>             Project: Spark
>          Issue Type: Bug
>          Components: SQL
>    Affects Versions: 1.2.0
>            Reporter: Andrew Ray
>         Attachments: spark_thrift_server_log.txt
> I'm currently testing the spark sql thrift server on a kerberos secured cluster in YARN
mode. Currently any user can access any table regardless of HDFS permissions as all data is
read as the hive user. In HiveServer2 the property hive.server2.enable.doAs=true causes all
access to be done as the submitting user. We should do the same.

This message was sent by Atlassian JIRA

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message