Hue User impersonation for Presto doesn't work #2449
Replies: 8 comments 3 replies
-
|
Beta Was this translation helpful? Give feedback.
-
Hi @romainr, It looks like my description is malformed. Please check the updated url now. I think it looks like a bug here. When impersonation is enabled, Logged in user is being replaced in the connection url, but the password is the one existing in the connection instead of the logged in user. I think its worth reopening this and taking a look. Thanks. |
Beta Was this translation helpful? Give feedback.
-
Impersonation means using |
Beta Was this translation helpful? Give feedback.
-
When we create a Notebook for Presto via JDBC, it will pop up for the authentication. But, with SQLAlchemy, the user will not be prompted for password. I think this is the problem. |
Beta Was this translation helpful? Give feedback.
-
@romainr, May I know the version of PyHive we are using for Hue? I tried finding but couldn't locate the version. |
Beta Was this translation helpful? Give feedback.
-
https://github.com/gethue/PyHive bu will probably rebase on https://github.com/dropbox/PyHive soon |
Beta Was this translation helpful? Give feedback.
-
I also faced this error while enabling Trino connector "has_impersonation" option with interface=SqlAlchemy. Luckily, this can be resolved by PyHive 0.6.3 principal_username option. But then the problem now is, we cannot send the principal_username dynamically with current implementation. If we set a fixed @romainr I think 'has_impersonation' option needs to be revised to use the above |
Beta Was this translation helpful? Give feedback.
-
👍 to make it smarter. AFAIK this is only used for Hive/Presto (and DaskSql): Also just rebased https://github.com/gethue/PyHive on https://github.com/dropbox/PyHive to get the Trino commit. |
Beta Was this translation helpful? Give feedback.
-
Is the issue already present in https://github.com/cloudera/hue/issues or discussed in the forum https://discourse.gethue.com? No
Describe the bug: After enabling Hue to impersonate user in Presto, observing
(pyhive.exc.OperationalError) Unexpected status code 401 Access Denied: Invalid credentials [SQL: select count(*) from event_detail] (Background on this error at: http://sqlalche.me/e/e3q8)
Steps to reproduce it?
options configured for SQLAlchemy in hue.ini
options='{"url": "presto://user:password@localhost:8443/hive/dwh","has_impersonation": true}'
Enabled impersonation in Presto
Hue version or source? (e.g. open source 4.5, CDH 5.16, CDP 1.0...). System info (e.g. OS, Browser...). Hue-4.8.0, open source Docker image. Safari on Mac OS Mojave
Beta Was this translation helpful? Give feedback.
All reactions