Skip to content

Commit 44607b1

Browse files
committed
[KYUUBI #7265] Recommend to configure kyuubi.session.local.dir.allowlist for multi-tenant clusters
### Why are the changes needed? Add recommendation to protect credentials in Kyuubi server for multi-tenant use case. Fixes #7265 ### How was this patch tested? New test is not added because it's only documentation and logging change. ### Was this patch authored or co-authored using generative AI tooling? No Closes #7269 from aajisaka/multi-tenant-doc. Closes #7265 477ad75 [Akira Ajisaka] Fix scalastyle check 5e947b9 [Akira Ajisaka] [KYUUBI #7265] Recommend to configure kyuubi.session.local.dir.allow.list for multi-tenant clusters. Authored-by: Akira Ajisaka <[email protected]> Signed-off-by: Akira Ajisaka <[email protected]> (cherry picked from commit 4b180d4) Signed-off-by: Akira Ajisaka <[email protected]>
1 parent 18327e1 commit 44607b1

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

docs/security/kinit.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,9 @@ hadoop.proxyuser.<user name in principal>.groups *
101101
hadoop.proxyuser.<user name in principal>.hosts *
102102
```
103103
104+
Also, you must configure `kyuubi.session.local.dir.allow.list` to exclude your Kyuubi server's keytab and any other credential from the local directories.
105+
Otherwise, any user who can login to the Kyuubi server via Kyuubi frontend protocols is possible to obtain the keytab and to impersonate the users configured by Hadoop proxy user settings.
106+
104107
## Further Readings
105108
106109
- [Hadoop in Secure Mode](https://hadoop.apache.org/docs/current/hadoop-project-dist/hadoop-common/SecureMode.html)

kyuubi-server/src/main/scala/org/apache/kyuubi/server/KinitAuxiliaryService.scala

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,12 @@ class KinitAuxiliaryService() extends AbstractService("KinitAuxiliaryService") {
4444
kinitMaxAttempts = conf.get(KyuubiConf.KINIT_MAX_ATTEMPTS)
4545

4646
require(keytab.nonEmpty && principal.nonEmpty, "principal or keytab is missing")
47+
if (conf.get(KyuubiConf.ENGINE_DO_AS_ENABLED) &&
48+
conf.get(KyuubiConf.SESSION_LOCAL_DIR_ALLOW_LIST).isEmpty) {
49+
warn(s"User impersonation is enabled, but ${KyuubiConf.SESSION_LOCAL_DIR_ALLOW_LIST}" +
50+
" is unset. We strongly recommend to configure the allowed local dir list" +
51+
" to exclude any credential including keytab.")
52+
}
4753
UserGroupInformation.loginUserFromKeytab(principal.get, keytab.get)
4854
val krb5Conf = Option(System.getProperty("java.security.krb5.conf"))
4955
.orElse(Option(System.getenv("KRB5_CONFIG")))

0 commit comments

Comments
 (0)