You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by "berlicon (via GitHub)" <gi...@apache.org> on 2025/12/12 13:30:50 UTC
Re: [I] Database Impersonification with PostgreSQL not working anymore [superset]
berlicon commented on issue #17074:
URL: https://github.com/apache/superset/issues/17074#issuecomment-3646498454
I have the same problem. If user watches shared dashboard and he has dbs.impersonate_user = true in Superset DB, then he gets error: DB::Exception: admin: Authentication failed: password is incorrect, or there is no user with such name.
The route cause of the error in these rows:
if impersonate_user and username is not None:
url = url.set(username=username)
It seems in addition we should add rows like this:
user = security_manager.find_user(username=username)
url = url.set(password=user.password)
... But unfortunatelly, user.password containd encoded value like this:
scrypt:32768:8:1$iVy4M6mkGXr5y0AT$1b5eff974069e11d5e5d623d2d3428ed23cdfcb321167a9b7af2175b2e92c56cec16285cc9193edc9b1a1eda5638d7749c8b3fcf88fd4253ef4a41692f5d9e6f
... And I don't know how to decode it.
I checked and add this row: url = url.set(password='8i^hO$0g') # it is decoded value of password
... and user can load the dashboard. But decoded password I can see in this line:
effective_username = self.get_effective_user(sqlalchemy_url)
# here I can see decoded password in this variable: sqlalchemy_url.password
... but it happens when user load his own dashboard.
--
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.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org