Seeking Some Help On DataSource Security / RLS #33308
Replies: 2 comments 13 replies
-
Hello @Yash-alternativepath! 👋 I'm Dosu, your friendly bot here to help you solve bugs, answer questions, and navigate the world of contributions. I'm ready to assist you while we wait for a human maintainer. Let's tackle your issues together! 😊 To ensure that Row-Level Security (RLS) is applied when querying datasets in SQL Lab and allow users to create new virtual datasets through joins while only seeing data restricted by RLS or the virtual dataset, you need to follow these steps:
For more detailed implementation, you can refer to the integration tests and SQL Lab implementation in the Superset repository [1][2]. To continue talking to Dosu, mention @dosu. Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Bug Report | Other |
Beta Was this translation helpful? Give feedback.
-
@dosu Even after enabling "RLS_IN_SQLLAB": True, RLS still doesn't seem to be applied, and all data is visible. Could you also guide me on how to query virtual datasets in SQL Lab? it say no relation found |
Beta Was this translation helpful? Give feedback.
-
I have successfully implemented Row-Level Security (RLS) on a dataset, and it works as expected. However, the issue arises when querying the same table in SQL Lab — RLS is not applied, and all records are returned.
To resolve this, I attempted to create a virtual dataset or table, but when querying the virtual table, I encountered an error: "relation not found".
My goal is to ensure that whatever dataset or virtual dataset the user queries in SQL Lab, they should be able to create new virtual datasets through joins. Importantly, they should only see the data that the RLS or the virtual dataset is applied to.
Any help would be greatly appreciated.
Beta Was this translation helpful? Give feedback.
All reactions