SQL Lab - permission enforcing based on schema access (Gamma roles) #30839
Labels
authentication:access-control
Rlated to access control
sqllab
Namespace | Anything related to the SQL Lab
Bug description
There is a scenario here that seems to be a permission bug.
I have one Database connection, where I have multiple schemas. The schemas are identical in structure, but differ in data, of course.
I create Gamma users, and I create Gamma roles for different schemas. Gamma_A and Gamma_B, let's say. The only permission for each of these roles is
schema access on [DB].[db_conn].[schema_A]
, etc.In my use case, I need these Gamma users with access to SQL Lab. In it, the single schema assigned to the Gamma_A role is the only one that shows in the schema dropdown - this is correct. However, in the SQL query window, if I change the schema name in my SQL, I'm able to access the tables in other schemas.
Example:
SELECT * FROM schema_a.projects
andSELECT * from schema_b.projects
work equally. This Gamma user, however, only was assigned schema access on schema_a.Screenshots/recordings
No response
Superset version
master / latest-dev
Python version
3.10
Node version
16
Browser
Chrome
Additional context
No response
Checklist
The text was updated successfully, but these errors were encountered: