kyuubi/docs
Cheng Pan 3f993f405a
[KYUUBI #6003] Allow disabling user impersonation on launching engine
# 🔍 Description
## Issue References 🔗

HiveServer2 has a configuration `hive.server2.enable.doAs` to control the execution user between the session user and the server user, Kyuubi's CONNECTION and USER share levels always perform like doAs enabled do. In CDH 5/6, this is disabled by default, users who want to migrate from CDH to Kyuubi may encounter permission issues with the current implementation.

## Describe Your Solution 🔧

This pull request introduces a new configuration `kyuubi.engine.doAs.enabled` to allow enable/disable user impersonation on launching engine. For security purpose, it's not allowed to be overridden by session conf.

The change in this PR has certain limitations:

- only supports Spark engine
- only supports interactive mode, specifically, it does not take effect on Spark batch mode now.

## Types of changes 🔖

- [ ] Bugfix (non-breaking change which fixes an issue)
- [x] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to change)

## Test Plan 🧪

The first step is passing all existing UTs when `kyuubi.engine.doAs.enabled=true`.

Tested on internal Kerberized-environment, when `kyuubi.engine.share.level=CONNECTION` and `kyuubi.engine.doAs.enabled=false`, use user 'spark' to launch engine, and the engine submitted without `--proxy-user spark`, thus engine launched by server user `hive`, then run `select session_user(), current_user()` and returns

```
+-----------------+-----------------+
| session_user()  | current_user()  |
+-----------------+-----------------+
| spark           | hive            |
+-----------------+-----------------+
```

And I checked the `spark.app.name` and registered path on Zookeeper also expected.
```
+-----------------+--------------------------------------------------------------------------+
|       key       |                       value                                              |
+-----------------+--------------------------------------------------------------------------+
| spark.app.name  | kyuubi_USER_SPARK_SQL_spark_default_51a416e5-6023-4bac-a964-cd9605f17c61 |
+-----------------+--------------------------------------------------------------------------+
```

---

# Checklist 📝

- [x] This patch was not authored or co-authored using [Generative Tooling](https://www.apache.org/legal/generative-tooling.html)

**Be nice. Be informative.**

Closes #6003 from pan3793/doas.

Closes #6003

c4002fef5 [Cheng Pan] grammar
add20fd57 [Cheng Pan] nit
8711c2265 [Cheng Pan] address comment
033a32252 [Cheng Pan] 1.9.0
9273b9426 [Cheng Pan] fix
a1563e1ca [Cheng Pan] HadoopCredentialsManager
e982e2364 [Cheng Pan] Allow disable user impersonation on launching engine

Authored-by: Cheng Pan <chengpan@apache.org>
Signed-off-by: Cheng Pan <chengpan@apache.org>
2024-01-29 21:30:42 +08:00
..
_static/css Revert "[KYUUBI #5908] [DOCS] Remove workaround for malformed table" 2023-12-24 01:53:05 +08:00
appendix [KYUUBI #4655] [DOCS] Enrich docs for Kyuubi Hive JDBC driver 2023-04-03 18:51:27 +08:00
client [KYUUBI #6000] Modify the incorrect configuration file in the trino-cli documentation 2024-01-19 19:27:05 +08:00
community [KYUUBI #5273] Update release docs 2023-09-12 10:49:59 +08:00
configuration [KYUUBI #6003] Allow disabling user impersonation on launching engine 2024-01-29 21:30:42 +08:00
connector [KYUUBI #5819] [DOCS] Fix rst syntax of missing blank line after code-block 2023-12-05 21:56:24 +08:00
contributing [KYUUBI #4279] Use new Apache 'closer.lua' syntax for kyuubi-download to obtain engine 2024-01-24 12:46:53 +08:00
deployment [KYUUBI #6010] Improve Gluten usage documentation 2024-01-24 11:47:32 +08:00
extensions [KYUUBI #5951] [DOC] Improve doc for Session Conf Advisor 2024-01-09 09:49:03 +08:00
imgs [KYUUBI #5914] Update layer diagram on welcome page 2023-12-25 16:13:48 +08:00
monitor [KYUUBI #5365] Don't use Log4j2's extended throwable conversion pattern in default logging configurations 2023-10-11 21:41:22 +08:00
overview [KYUUBI #4624] [Docs] Fix table headers in kyuubi_vs_hive.md 2023-03-28 16:40:35 +08:00
quick_start [KYUUBI #5975] Bump trino-client 411 2024-01-15 22:25:41 +08:00
security [KYUUBI #5427] [AUTHZ] Shade spark authz plugin 2023-10-20 20:10:34 +08:00
tools [KYUUBI #5941] Drop Kubernetes Block Cleaner Tool from Kyuubi 2024-01-04 15:58:10 +08:00
conf.py Revert "[KYUUBI #5908] [DOCS] Remove workaround for malformed table" 2023-12-24 01:53:05 +08:00
index.rst [KYUUBI #5893] [DOC] Update logos in layer picture on welcome page 2023-12-22 10:47:00 +08:00
make.bat [KYUUBI #4235] [DOCS] Prefer https:// URLs in docs 2023-02-03 14:01:11 +08:00
Makefile [KYUUBI #874] [ASF] ASF Publish 2021-08-16 11:48:21 +08:00
requirements.txt [KYUUBI #5902] Bump doc build dependencies 2023-12-21 18:37:43 -08:00