You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by GitBox <gi...@apache.org> on 2022/01/19 21:12:28 UTC

[GitHub] [superset] Painyjames edited a comment on pull request #18064: feat: datasource access to allow more granular access to tables on SQL Lab

Painyjames edited a comment on pull request #18064:
URL: https://github.com/apache/superset/pull/18064#issuecomment-1016872350


   > I created a test user `sqllab` in the ephemeral environment above (password `sqllab`) and assigned it to the role `sql_lab`, and assigned the permission `datasource access on [examples].[messages](id:10)` to that role.
   > 
   > But I wasn't able to query the table:
   > 
   > ```sql
   > SELECT * FROM examples.messages
   > ```
   
   I think the reason why this might not work is because the permission is `datasource access on [database].[table]` but on the sql query we have `SELECT * FROM schema.table`.
   
   In the acceptance tests we have against our patched superset container, we have the following:
   - permission `datasource access on [postgres].[audit_logs]`
   - sql editor query `SELECT * FROM public.audit_logs`
   
   This works fine cause we only have one schema on our database, but we wouldn't know what would happen if we had several schemas with the same table on the same database.
   
   In any case, this is still better than having only the schema permission that would grant access to all the tables under that schema, but honestly maybe we should consider generating permissions which are like this:
   - `datasource access on [database].[schema].[table]`
   
   


-- 
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