瀏覽代碼

HUE-963 [core] Hue in a Kerberos enabled environment cannot use HttpFS

If HUE is not authenticated with HTTPFS at the time of making the GETDELEGATIONTOKEN
request then it is HDFS-3988. The workaround for HUE here is to make a prior request,
ie GETHOMEDIRECTORY, to trigger authentication, then do the GETDELEGATIONTOKEN.

This happened in particular with the Shell app.
FileBrowser, Beeswax were fine in the testing without the patch.

Tested in a Kerberized cluster with and without the patch.
Romain Rigaux 13 年之前
父節點
當前提交
2f7feb9
共有 1 個文件被更改,包括 4 次插入0 次删除
  1. 4 0
      desktop/libs/hadoop/src/hadoop/fs/webhdfs.py

+ 4 - 0
desktop/libs/hadoop/src/hadoop/fs/webhdfs.py

@@ -512,6 +512,10 @@ class WebHdfs(Hdfs):
 
   def get_delegation_token(self, renewer):
     """get_delegation_token(user) -> Delegation token"""
+    # Workaround for HDFS-3988
+    if self._security_enabled:
+      self.get_home_dir()
+
     params = self._getparams()
     params['op'] = 'GETDELEGATIONTOKEN'
     params['renewer'] = renewer