-
Notifications
You must be signed in to change notification settings - Fork 14.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Password not replaced in SQLAlchemy URL when impersonation is enabled causing 401 Unauthorized #7170
Comments
I just create database named hive-username for everyone by using username:password@host:port/hive, so the user can login, then choose the db with their name. The disadvantage is that DB link needs to be maintained, but it does work. You can try
|
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. For admin, please label this issue |
I'm having the same problem with a PostgreSQL connection. |
@haydenwhitehead @nladuguie how you guys solved this issue facing similar issue #11359 ? |
Hi everybody, we use Superset to execute queries on a PrestoDB cluster.

We activated the impersonation feature on our PrestoDB connection, because we want to identify which user run which query just for auditing.
But when this feature is activated, all queries run result in a HTTP
401
error.FYI, we have securized our PrestoDB cluster with SSL access and LDAP authentifcation, so PrestoDB URL configured in Superset includes basic authentication with
user:password
inside it (see attached image).This error appears right after saving the Presto datasource with those configurations.
After debugging Superset execution, I observed that the impersonation features only replaces the username inside URL but not the password.
So in the resulting impersonated URL, the current user name is associated with the configured password in the datasource, which is not correct.
Superset version
0.28.1
Expected results
Run query with impersonation feature enabled should replace password (is specified) in the datasource URL, like username is.
Actual results
Queries are run with the current username in the datasource URL which has replaced the configured default username of the datasource URL, but the password in the URL remains the default one configure on the datasource.

The attached image shows the error resulting in saving the datasource after having activated the impersonation feature.
Steps to reproduce
Configure PrestoDB datasource with SSL and username/password configured (like shown in attached image), activate impersonation feature, and save the datasource.
The text was updated successfully, but these errors were encountered: