wForget commented on code in PR #6383: URL: https://github.com/apache/kyuubi/pull/6383#discussion_r1635860136
########## kyuubi-server/src/main/scala/org/apache/kyuubi/engine/flink/FlinkProcessBuilder.scala: ########## @@ -58,14 +61,30 @@ class FlinkProcessBuilder( // flink.execution.target are required in Kyuubi conf currently val executionTarget: Option[String] = conf.getOption("flink.execution.target") + private lazy val proxyUserEnable: Boolean = { + doAsEnabled && conf.get(ENGINE_FLINK_DOAS_ENABLED) && + conf.getOption(s"$FLINK_CONF_PREFIX.$FLINK_SECURITY_KEYTAB_KEY").isEmpty && + conf.getOption(s"$FLINK_CONF_PREFIX.$FLINK_SECURITY_PRINCIPAL_KEY").isEmpty + } + override protected def module: String = "kyuubi-flink-sql-engine" override protected def mainClass: String = "org.apache.kyuubi.engine.flink.FlinkSQLEngine" - override def env: Map[String, String] = conf.getEnvs + - ("FLINK_CONF_DIR" -> conf.getEnvs.getOrElse( - "FLINK_CONF_DIR", - s"$flinkHome${File.separator}conf")) + override def env: Map[String, String] = { + val flinkExtraEnvs = if (proxyUserEnable) { + Map( + "FLINK_CONF_DIR" -> conf.getEnvs.getOrElse( + "FLINK_CONF_DIR", + s"$flinkHome${File.separator}conf"), Review Comment: thanks, changed -- 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-unsubscr...@kyuubi.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: notifications-unsubscr...@kyuubi.apache.org For additional commands, e-mail: notifications-h...@kyuubi.apache.org