getredash / redash

Make Your Company Data Driven. Connect to any data source, easily visualize, dashboard and share your data.
http://redash.io/
BSD 2-Clause "Simplified" License
26.21k stars 4.36k forks source link

Can redash use real user to query Presto? #2702

Open payt0nc opened 6 years ago

payt0nc commented 6 years ago

Issue Summary

Can redash use different users to query Presto?

We have nearly a hundred users sharing a redash to query our Presto. From Presto configuration, it's configured that only accepted two queries / user. I don't think enlarged presto limit is good solution because the instances of presto are limited and accepted more queries per user will let other users(we have other access like Tableau) slow down.

Will you consider that to use real user account in redash to query Presto instead of sharing redash?

Technical details:

Thanks.

nasmithan commented 6 years ago

Are you using any HTTPBasicAuth for connecting to presto? Using any certs or anything?

payt0nc commented 6 years ago

We did not use any auth on Presto. In other words, anyone can be connected into our presto if she/he get the connection string and given any username.(But she/he must be in our intranet first).

nasmithan commented 6 years ago

We are able to get it working on our setup. We use nginx for security to handle users, and we actually use a password as well. Our presto.py file has the following connection details (and added password to the schema) and it works:

connection = presto.connect(
    host=self.configuration.get('host', ''),
    protocol='https',
    port=self.configuration.get('port', 8080),
    username=self.configuration.get('username', 'redash'),
    password=self.configuration.get('password', 'redash'),
    catalog=self.configuration.get('catalog', 'hive'),
    schema=self.configuration.get('schema', 'default'))
Ralnoc commented 5 years ago

I have opened PR #3723 that resolves this issue.

Just waiting for them to review, approve and merge it.

payt0nc commented 5 years ago

Awesome. Thank you so much for creating this feature.🙇🏼‍♂️