GitHub user baptisteaden created a discussion: Set database transaction params
Hi! **Question** Is there any way to make Superset call something like `set local app.user_id = 'some_id';` in a transaction onto my database before a query runs so that the RLS in my database can read it? **Context** I'm using Superset `guest_token` and the embedded-sdk to show a dashboard in my web app. I'd like to make use of the RLS defined in my database rather than the Superset one because some rules are complex and would be very tedious/impossible to rewrite in Superset. For this, I'd need to set some parameters in the db before queries run (user_id, tenant_id, role). Obviously these values change depending on the logged user, so they should be stored in the guest_token I guess... I searched everywhere but couldn't find an answer, and I'm a bit surprised because it doesn't seem like a very niche use case to be able to rely on database-level RLS. Is it doable? If not, is there a reason? Thanks for your help! GitHub link: https://github.com/apache/superset/discussions/37498 ---- This is an automatically sent email for [email protected]. To unsubscribe, please send an email to: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
