Skip to content

Commit

Permalink
Formatting long username change.
Browse files Browse the repository at this point in the history
  • Loading branch information
nousot-cloud-guy committed Jun 27, 2023
1 parent 11b767b commit 2f27b04
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -277,9 +277,12 @@ final class KyuubiTHttpFrontendService(
override protected def getRealUserAndSessionUser(req: TOpenSessionReq): (String, String) = {
val longUsername = conf.get(AUTHENTICATION_LONG_USERNAME)
val realUser: String =
if (longUsername)
if (longUsername) {
Option(SessionManager.getUserName).getOrElse(req.getUsername)
else getShortName(Option(SessionManager.getUserName).getOrElse(req.getUsername))
}
else {
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)
Expand Down

0 comments on commit 2f27b04

Please sign in to comment.