apache/kyuubi

[TASK][EASY] Support setting the username to launch Kyuubi engines in USER & CONNECTION share level

Open

#5,369 创建于 2023年10月8日

在 GitHub 查看
 (8 评论) (0 反应) (1 负责人)Scala (996 fork)batch import
hacktoberfest

仓库指标

Star
 (2,332 star)
PR 合并指标
 (30 天内没有已合并 PR)

描述

Code of Conduct

Search before creating

  • I have searched in the task list and found no similar tasks.

Mentor

  • I have sufficient knowledge and experience of this task, and I volunteer to be the mentor of this task to guide contributors to complete the task.

Skill requirements

  • Basic knowledge on Scala Programing Language

Background and Goals

Hive supports SQL operation authorization against the session user, and then runs SQL as Hive Server user.

Currently, Kyuubi supports this feature at the SERVER share level.

We want to also support this feature in other share levels, which provide fine isolation.

Implementation steps

Currently, EngineRef#appUser serves two purposes:

  • The username used to run the SparkSQLEngine
  • Part of the key used to look up the SparkSQLEngine to connect to.

To implement this feature, we need to replace EngineRef#appUser with two new fields, EngineRef#appUser and EngineRef#engineSpaceUser.

  • The new EngineRef#appUser is the username used to run the SparkSQLEngine.
  • The EngineRef#engineSpaceUser is used to look up the SparkSQLEngine.

EngineRef#engineSpaceUser is set in the same way as the old EngineRef#appUser.

The new EngineRef#appUser is set according to a new config, kyuubi.engine.user:

  • When kyuubi.engine.user is not set, set EngineRef#appUser to EngineRef#engineSpaceUser
  • When kyuubi.engine.user is set, set EngineRef#appUser to that value.

Additional context

No response

贡献者指南