pan3793 commented on code in PR #6003:
URL: https://github.com/apache/kyuubi/pull/6003#discussion_r1461336685
##########
kyuubi-server/src/main/scala/org/apache/kyuubi/engine/spark/SparkProcessBuilder.scala:
##########
@@ -175,11 +177,15 @@ class SparkProcessBuilder(
try {
val ugi = UserGroupInformation
.loginUserFromKeytabAndReturnUGI(principal.get, keytab.get)
- if (ugi.getShortUserName != proxyUser) {
+ if (doAsEnabled && ugi.getShortUserName != proxyUser) {
warn(s"The session proxy user: $proxyUser is not same with " +
s"spark principal: ${ugi.getShortUserName}, so we can't support
use keytab. " +
s"Fallback to use proxy user.")
None
+ } else if (!doAsEnabled && ugi.getShortUserName != Utils.currentUser) {
+ warn(s"The server's user: ${Utils.currentUser} is not same with " +
Review Comment:
the checking rule is same: the login user must be the same as the launch
engine user. that said, when doAs is disabled, only the server's principal and
keytab is allowed.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]