aleksi75 opened a new issue #4776: [Druid] Superset not working with Druid when 
'Druid Basic Security' is activated
URL: https://github.com/apache/incubator-superset/issues/4776
 
 
   Make sure these boxes are checked before submitting your issue - thank you!
   
   - [x ] I have checked the superset logs for python stacktraces and included 
it here as text if any
   - [x ] I have reproduced the issue with at least the latest released version 
of superset
   - [x ] I have checked the issue tracker for the same issue and I haven't 
found one similar
   
   
   ### Superset version
   0.24.0
   
   ### Expected results
   Data is queried from Druid broker and shown in chart
   
   ### Actual results
   We are using Druid 0.12.0 and testing the new Druid Basic Security extension 
in our DEV zone.
   The Feature is new but working well. In connection with Superset we are 
running into troubles, 
   because there is no (known) possibility to configure the data (user, pwd) 
for the auth header.
   We also tested a more old school variation with prepending user and pwd to 
the url as 
   seen in example below (sry I am not able/allowed to post a screenshot):
   
   Coordinator Host:        **admin:admin@host1337**
   Coordinator Port:        8081
   Coordinator Endpoint: druid/coordinator/v1/metadata
   Broker Host:                **admin:admin@host1337**
   Broker Port:                 8082
   Broker Endpoint:          druid/v2
   
   This seems to work with coordinator, we are able to scan datasources and 
refreshing metadata.
   In case of the broker this approach did not work, after running a query a 
chart we get:
   
   Traceback (most recent call last):
     File "/opt/venv/lib/python2.7/site-packages/superset/viz.py", line 329, in 
get_df_payload
       df = self.get_df(query_obj)
     File "/opt/venv/lib/python2.7/site-packages/superset/viz.py", line 142, in 
get_df
       self.results = self.datasource.query(query_obj)
     File 
"/opt/venv/lib/python2.7/site-packages/superset/connectors/druid/models.py", 
line 1238, in query
       client=client, query_obj=query_obj, phase=2)
     File 
"/opt/venv/lib/python2.7/site-packages/superset/connectors/druid/models.py", 
line 959, in get_query_str
       return self.run_query(client=client, phase=phase, **query_obj)
     File 
"/opt/venv/lib/python2.7/site-packages/superset/connectors/druid/models.py", 
line 1126, in run_query
       client.timeseries(**qry)
     File "/opt/venv/lib/python2.7/site-packages/pydruid/client.py", line 167, 
in timeseries
       return self._post(query)
     File "/opt/venv/lib/python2.7/site-packages/pydruid/client.py", line 484, 
in _post
       res = urllib.request.urlopen(req)
     File "/usr/lib64/python2.7/urllib2.py", line 154, in urlopen
       return opener.open(url, data, timeout)
     File "/usr/lib64/python2.7/urllib2.py", line 431, in open
       response = self._open(req, data)
     File "/usr/lib64/python2.7/urllib2.py", line 449, in _open
       '_open', req)
     File "/usr/lib64/python2.7/urllib2.py", line 409, in _call_chain
       result = func(*args)
     File "/usr/lib64/python2.7/urllib2.py", line 1244, in http_open
       return self.do_open(httplib.HTTPConnection, req)
     File "/usr/lib64/python2.7/urllib2.py", line 1214, in do_open
       raise URLError(err)
   URLError: <urlopen error [Errno -2] Name or service not known>
   
   
   For us it seems that prepending user and pwd to the url is not possible with 
urllib2.py.
   
   On the other hand, without them we get an auth error.
   
   Traceback (most recent call last):
     File "/opt/venv/lib/python2.7/site-packages/superset/viz.py", line 329, in 
get_df_payload
       df = self.get_df(query_obj)
     File "/opt/venv/lib/python2.7/site-packages/superset/viz.py", line 142, in 
get_df
       self.results = self.datasource.query(query_obj)
     File 
"/opt/venv/lib/python2.7/site-packages/superset/connectors/druid/models.py", 
line 1238, in query
       client=client, query_obj=query_obj, phase=2)
     File 
"/opt/venv/lib/python2.7/site-packages/superset/connectors/druid/models.py", 
line 959, in get_query_str
       return self.run_query(client=client, phase=phase, **query_obj)
     File 
"/opt/venv/lib/python2.7/site-packages/superset/connectors/druid/models.py", 
line 1126, in run_query
       client.timeseries(**qry)
     File "/opt/venv/lib/python2.7/site-packages/pydruid/client.py", line 167, 
in timeseries
       return self._post(query)
     File "/opt/venv/lib/python2.7/site-packages/pydruid/client.py", line 498, 
in _post
       e, err, json.dumps(query.query_dict, indent=4)))
   IOError: HTTP Error 401: Unauthorized 
   
   You may correct me, but at the moment Superset and Druid with auth enabled is
   not working?
   
   ### Steps to reproduce
   
   
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to