GitHub user dosubot[bot] added a comment to the discussion: Seeking Some Help On DataSource Security / RLS
<!-- Answer --> To enforce schema usage in SQL Lab and ensure that Row-Level Security (RLS) is consistently applied, you need to implement the `adjust_engine_params` class method for your database engine specs. This method modifies the SQLAlchemy URI and `connect_args` to ensure that queries run in the specified schema. By doing so, Superset can determine the schema to which any unqualified table names belong, thus applying RLS correctly and preventing data leaks. Additionally, set the class attribute `supports_dynamic_schema` to true to enable this functionality <sup>[[1]](https://github.com/apache/superset/blob/master/superset/db_engine_specs/README.md)</sup>. <!-- Dosu Comment Footer --> *To continue talking to [Dosu](https://dosu.dev), mention @dosu.* --- <sup>Help Dosu learn! Give it feedback: [Great Response](https://app.dosu.dev/response-feedback/f8f8321e-2d36-4fc0-bfbe-810d76c6c4c3?feedback_type=great_response) | [Irrelevant Answer](https://app.dosu.dev/response-feedback/f8f8321e-2d36-4fc0-bfbe-810d76c6c4c3?feedback_type=irrelevant_answer) | [Incorrect Sources](https://app.dosu.dev/response-feedback/f8f8321e-2d36-4fc0-bfbe-810d76c6c4c3?feedback_type=incorrect_sources) | [Too Verbose](https://app.dosu.dev/response-feedback/f8f8321e-2d36-4fc0-bfbe-810d76c6c4c3?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/f8f8321e-2d36-4fc0-bfbe-810d76c6c4c3?feedback_type=hallucination) | [Bug Report](https://app.dosu.dev/response-feedback/f8f8321e-2d36-4fc0-bfbe-810d76c6c4c3?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/f8f8321e-2d36-4fc0-bfbe-810d76c6c4c3?feedback_type=other)</sup> GitHub link: https://github.com/apache/superset/discussions/33308#discussioncomment-13007999 ---- 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]
