hive-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Peng Cheng (JIRA)" <>
Subject [jira] [Created] (HIVE-18024) Driver.compile() should fallback to SessionState.getUserName() when userName=null
Date Thu, 09 Nov 2017 01:26:01 GMT
Peng Cheng created HIVE-18024:

             Summary: Driver.compile() should fallback to SessionState.getUserName() when
                 Key: HIVE-18024
             Project: Hive
          Issue Type: Bug
          Components: Hive, Query Planning
    Affects Versions: 2.3.0, 1.2.2
            Reporter: Peng Cheng
            Priority: Minor

When Driver.compile() is invoked for the execution of a hive command. A HiveSemanticAnalyzerHookContext
will be initialized and later used by a HiveSemanticAnalyzerHook for various purposes (e.g.
when integrated with Apache Sentry, its HiveSemanticAnalyzerHook can authorize this command)

In current versions, the data in this HiveSemanticAnalyzerHookContext will come from different
and inconsistent resources. e.g. ipAddress will be copied from SessionState.getUserIPAddress,
but userName will be copied from Driver.userName.

This has effectively caused HiveSemanticAnalyzerHook to be useless for several authentication/authorization
patterns. E.g. When is set to SessionStateUserAuthenticator,
the userName carried by such SessionState will be invisible to the Hook, which may cause it
to yield incorrect result(s).

proposed fix: when Driver.userName=null, the userName of HiveSemanticAnalyzerHookContext should
be set to SessionState.get().getUserName() as a fallback measure.

This message was sent by Atlassian JIRA

View raw message