You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@kyuubi.apache.org by "bowenliang123 (via GitHub)" <gi...@apache.org> on 2023/08/28 01:00:03 UTC

[GitHub] [kyuubi] bowenliang123 commented on a diff in pull request #5204: Thrift HTTP FE checks req conf nullable before evaluating proxy user

bowenliang123 commented on code in PR #5204:
URL: https://github.com/apache/kyuubi/pull/5204#discussion_r1306790168


##########
kyuubi-server/src/main/scala/org/apache/kyuubi/server/KyuubiTHttpFrontendService.scala:
##########
@@ -278,7 +278,11 @@ final class KyuubiTHttpFrontendService(
     val realUser = getShortName(Option(SessionManager.getUserName).getOrElse(req.getUsername))
     // using the remote ip address instead of that in proxy http header for authentication
     val ipAddress: String = SessionManager.getIpAddress
-    val sessionUser: String = getProxyUser(req.getConfiguration, ipAddress, realUser)
+    val sessionUser: String = if (req.getConfiguration == null) {

Review Comment:
   Maybe move this check into `getProxyUser` method ?
   `getProxyUser` checks the config value first and returns the `realUser` as default.  This config check could be added as a prior condition.



-- 
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: notifications-unsubscribe@kyuubi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@kyuubi.apache.org
For additional commands, e-mail: notifications-help@kyuubi.apache.org