Ver Fonte

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 há 13 anos atrás
pai
commit
2f7feb9
1 ficheiros alterados com 4 adições e 0 exclusões
  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