You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@linkis.apache.org by GitBox <gi...@apache.org> on 2022/02/16 07:41:21 UTC

[GitHub] [incubator-linkis] Andywli commented on issue #1491: [Bug]

Andywli commented on issue #1491:
URL: https://github.com/apache/incubator-linkis/issues/1491#issuecomment-1041200822


   在linkis中获取Hadoop的FileSystem都是通过HDFSUtils类进行实现的,所以我们将kerberos放在该类,用户可以看下该类的逻辑,现在支持的登录模式如下:
   
   ```
   if(KERBEROS_ENABLE.getValue) {
         val path = new File(
         TAB_FILE.getValue , userName + ".keytab").getPath
         val user = getKerberosUser(userName)
         UserGroupInformation.setConfiguration(getConfiguration(userName))
         UserGroupInformation.loginUserFromKeytabAndReturnUGI(user, path)
       } else {
         UserGroupInformation.createRemoteUser(userName)
       }
   ```
   
   用户只要在配置文linkis.properties配置以下参数即可:
   
   ```
   wds.linkis.keytab.enable=true
   wds.linkis.keytab.file=/appcom/keytab/ #keytab放置目录,该目录存储的是多个用户的username.keytab的文件
   wds.linkis.keytab.host.enabled=false #是否带上principle客户端认证
   wds.linkis.keytab.host=127.0.0.1 #principle认证需要带上的客户端IP
   ```
   
   用户如果需要执行任务,还需在linux服务器上面建立相应用户名的用户,如果是标准版本该用户需要能执行Spark和hive任务,并需要在本地工作空间和HDFS目录/tmp/linkis建立对应的用户名目录。
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@linkis.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@linkis.apache.org
For additional commands, e-mail: commits-help@linkis.apache.org