瀏覽代碼

[jwt] Fix thrift_util to use the right user (#2549)

Ying Chen 4 年之前
父節點
當前提交
9f33cad173
共有 1 個文件被更改,包括 2 次插入2 次删除
  1. 2 2
      apps/beeswax/src/beeswax/server/hive_server2_lib.py

+ 2 - 2
apps/beeswax/src/beeswax/server/hive_server2_lib.py

@@ -30,7 +30,7 @@ from TCLIService.ttypes import TOpenSessionReq, TGetTablesReq, TFetchResultsReq,
   TGetCrossReferenceReq, TGetPrimaryKeysReq
 
 from desktop.lib import python_util, thrift_util
-from desktop.conf import DEFAULT_USER
+from desktop.conf import DEFAULT_USER, USE_THRIFT_HTTP_JWT
 
 from beeswax import conf as beeswax_conf, hive_site
 from beeswax.hive_site import hiveserver2_use_ssl
@@ -592,7 +592,7 @@ class HiveServerClient(object):
       validate = beeswax_conf.SSL.VALIDATE.get()
       timeout = beeswax_conf.SERVER_CONN_TIMEOUT.get()
 
-    if auth_username:
+    if auth_username and not USE_THRIFT_HTTP_JWT.get():
       username = auth_username
       password = auth_password
     else: