ソースを参照

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 年 前
コミット
2f7feb9d2c
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