craig-rueda commented on a change in pull request #7091: add kerberos for druid
URL:
https://github.com/apache/incubator-superset/pull/7091#discussion_r367611191
##########
File path: superset/connectors/druid/models.py
##########
@@ -147,11 +150,18 @@ def get_pydruid_client(self):
return cli
def get_datasources(self):
+ self.get_kerberos_auth()
endpoint = self.get_base_broker_url() + '/datasources'
- auth = requests.auth.HTTPBasicAuth(self.broker_user, self.broker_pass)
- return json.loads(requests.get(endpoint, auth=auth).text)
+ enable_kerberos_falg = conf.get('ENABLE_KERBEROS_AUTHENTICATION',
False)
+ if enable_kerberos_falg:
+ kerberos_auth = HTTPKerberosAuth(mutual_authentication=OPTIONAL)
+ response = requests.get(endpoint, auth=kerberos_auth)
+ else:
+ response = requests.get(endpoint)
+ return json.loads(response.text)
def get_druid_version(self):
+
Review comment:
extra space?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]