Search before asking
Problem Description
Linkis keytab (Kerberos) authentication assembles the principal with a static host from wds.linkis.keytab.host (default 127.0.0.1). In multi-machine deployments each machine has a different hostname, so this static global value must be configured per machine and cannot adapt to dynamic hostnames. That prevents linking up with the cluster unified auth kinit -kt hadoop.keytab hadoop/${hostname}.
Description
Add a switch wds.linkis.keytab.host.auto (default false). When enabled, the principal host is automatically resolved from the local short hostname via InetAddress.getLocalHost.getHostName, equivalent to the shell hostname. It stays fully backward compatible with the existing static host config and the AES keytab switch.
Use case
After enabling host.auto, ECM and other per-machine services automatically use the local hostname to assemble the principal, so multi-machine deployments need no per-machine host config and adapt to hostname changes automatically.
Solutions
Add KEYTAB_HOST_AUTO switch in HadoopConf; add resolveKeytabHost in HDFSUtils to resolve the local short hostname, wrapped in Utils.tryCatch with fallback to the static host so the auth main path is never broken.
Are you willing to submit a PR?
Search before asking
Problem Description
Linkis keytab (Kerberos) authentication assembles the principal with a static host from
wds.linkis.keytab.host(default127.0.0.1). In multi-machine deployments each machine has a different hostname, so this static global value must be configured per machine and cannot adapt to dynamic hostnames. That prevents linking up with the cluster unified authkinit -kt hadoop.keytab hadoop/${hostname}.Description
Add a switch
wds.linkis.keytab.host.auto(defaultfalse). When enabled, the principal host is automatically resolved from the local short hostname viaInetAddress.getLocalHost.getHostName, equivalent to the shellhostname. It stays fully backward compatible with the existing static host config and the AES keytab switch.Use case
After enabling
host.auto, ECM and other per-machine services automatically use the local hostname to assemble the principal, so multi-machine deployments need no per-machine host config and adapt to hostname changes automatically.Solutions
Add
KEYTAB_HOST_AUTOswitch inHadoopConf; addresolveKeytabHostinHDFSUtilsto resolve the local short hostname, wrapped inUtils.tryCatchwith fallback to the static host so the auth main path is never broken.Are you willing to submit a PR?