فهرست منبع

[beeswax] Stop logging the beeswax thrift session id

It may be possible to use this id to hijack a thrift
session, so it'd be best to not log the session id. Instead
it just logs who opened the connection.
Erick Tryzelaar 11 سال پیش
والد
کامیت
7fc1bb4ed0
1فایلهای تغییر یافته به همراه2 افزوده شده و 1 حذف شده
  1. 2 1
      apps/beeswax/src/beeswax/server/hive_server2_lib.py

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

@@ -544,6 +544,8 @@ class HiveServerClient:
     if self.query_server['server_name'] == 'sparksql': # All the time
     if self.query_server['server_name'] == 'sparksql': # All the time
       kwargs['configuration'].update({'hive.server2.proxy.user': user.username})
       kwargs['configuration'].update({'hive.server2.proxy.user': user.username})
 
 
+    LOG.info('Opening %s thrift session for user %s' % (self.query_server['server_name'], user.username))
+
     req = TOpenSessionReq(**kwargs)
     req = TOpenSessionReq(**kwargs)
     res = self._client.OpenSession(req)
     res = self._client.OpenSession(req)
 
 
@@ -555,7 +557,6 @@ class HiveServerClient:
       raise QueryServerException(Exception('Bad status for request %s:\n%s' % (req, res)), message=message)
       raise QueryServerException(Exception('Bad status for request %s:\n%s' % (req, res)), message=message)
 
 
     sessionId = res.sessionHandle.sessionId
     sessionId = res.sessionHandle.sessionId
-    LOG.info('Opening session %s' % sessionId)
 
 
     encoded_status, encoded_guid = HiveServerQueryHandle(secret=sessionId.secret, guid=sessionId.guid).get()
     encoded_status, encoded_guid = HiveServerQueryHandle(secret=sessionId.secret, guid=sessionId.guid).get()
     properties = json.dumps(res.configuration)
     properties = json.dumps(res.configuration)