[
https://issues.apache.org/jira/browse/HIVE-29778?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18113121#comment-18113121
]
Zhihua Deng commented on HIVE-29778:
------------------------------------
PR has been merged. Thanks for the PR, [~owenpark]!
> HiveServer2 logs the raw request username instead of the effective user when
> creating a session handle
> ------------------------------------------------------------------------------------------------------
>
> Key: HIVE-29778
> URL: https://issues.apache.org/jira/browse/HIVE-29778
> Project: Hive
> Issue Type: Bug
> Components: HiveServer2
> Affects Versions: 4.2.0
> Reporter: owenmonn
> Assignee: owenmonn
> Priority: Major
> Labels: pull-request-available
> Fix For: 4.3.0
>
>
> ThriftCLIService#getSessionHandle logs req.getUsername() instead of the
> resolved userName parameter that is actually passed to CLIService#openSession
> / #openSessionWithImpersonation:
> {code:java}
> LOG.info("Creating Hive session handle for user [{}] from IP {}",
> req.getUsername(), ipAddress);{code}
> The Hive JDBC driver only populates TOpenSessionReq.username when
> auth=noSasl. Under Kerberos, LDAP/SASL PLAIN and HTTP transport the identity
> arrives via the SASL authorization ID or a thread-local, so the line reads
> "Creating Hive session handle for user [null] from IP <ip>".
>
> Fix: use the userName parameter, which is already in scope.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)