Skip to content

Commit 5e947b9

Browse files
committed
[KYUUBI #7265] Recommend to configure kyuubi.session.local.dir.allow.list for multi-tenant clusters.
1 parent fba1f94 commit 5e947b9

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-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: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,10 @@ 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) && conf.get(KyuubiConf.SESSION_LOCAL_DIR_ALLOW_LIST).isEmpty) {
48+
warn(s"User impersonation is enabled, but ${KyuubiConf.SESSION_LOCAL_DIR_ALLOW_LIST} is unset. " +
49+
s"We strongly recommend to configure the allowed local dir list to exclude any credential including keytab.")
50+
}
4751
UserGroupInformation.loginUserFromKeytab(principal.get, keytab.get)
4852
val krb5Conf = Option(System.getProperty("java.security.krb5.conf"))
4953
.orElse(Option(System.getenv("KRB5_CONFIG")))

0 commit comments

Comments
 (0)