Преглед на файлове

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