superset icon indicating copy to clipboard operation
superset copied to clipboard

Gamma user able to access data they do not have explicit permission for via Change Datasource menu item

Open thunter009 opened this issue 7 years ago • 4 comments

When exploring a chart as a Gamma user with explicit permissions to only specific datasources, I am able to see and select datasources I should not have access to via the Change Datasource menu item/modal.

Expected results

I expect to only see the datasources I have been explicitly granted access permissions for.

Actual results

I can see all datasources connected to the application, including those I do not have any permissions on.

Screenshots

image image image image image

How to reproduce the bug

  1. Add a test user and grant them the Gamma role + datasource access on a single table
  2. Login as the test user and confirm that you can access charts built on top of the datasource you granted access to
  3. Select "Change Datasource" from the chart explore page
  4. See all the datasources available to the instance, regardless of the roles granted

Environment

  • superset version: Superset 0.999.0dev
  • python version: Python 3.7.2
  • node.js version: v10.14.2
  • npm version: 6.9.0

Checklist

Make sure these boxes are checked before submitting your issue - thank you!

  • [x] I have checked the superset logs for python stacktraces and included it here as text if there are any.
  • [x] I have reproduced the issue with at least the latest released version of superset.
  • [x] I have checked the issue tracker for the same issue and I haven't found one similar.

Additional context

Looking through the code base it seems this list of datasources is generated via the superset/datasources endpoint.

thunter009 avatar Jun 13 '19 15:06 thunter009

Issue-Label Bot is automatically applying the label #bug to this issue, with a confidence of 0.88. Please mark this comment with :thumbsup: or :thumbsdown: to give our bot feedback!

Links: app homepage, dashboard and code for this bot.

issue-label-bot[bot] avatar Jun 13 '19 15:06 issue-label-bot[bot]

The same problem with "Create a new chart" view. In "Choose a datasource" Gamma users can see all available tables

scatmanoleg avatar Jun 25 '19 12:06 scatmanoleg

fixed by: https://github.com/apache/incubator-superset/pull/7875

thunter009 avatar Jul 16 '19 17:07 thunter009

Great, thanks

scatmanoleg avatar Jul 22 '19 16:07 scatmanoleg