소스 검색

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