Incubator-superset: Unable to grant per datasource/schema access with 0.33.rc1

Created on 20 May 2019  路  3Comments  路  Source: apache/incubator-superset

After upgrading to 0.33.rc1, we are unable to grant access to specific schemas as per the functionality in 0.32.0rc2

We have setup a database connection and followed this guide
https://superset.incubator.apache.org/security.html#managing-gamma-per-data-source-access

In 0.32.0rc2, it was enough to specify schema access on "schema"."table_name" and the user was able to query the table (albeit with some permission issues like https://github.com/apache/incubator-superset/issues/7541)

In 0.33.rc1, on loading the sql lab page with the same permissions we are prompted with an error message saying "It seems you don't have access to any database", even though we have applied "schema"."table_name" permissions. If we apply database permissions to the role then the users can access all schemas within the database. If we apply datasource permissions there is no effect.

Expected results

In 0.33.rc1, we would expect that if the user has only permissions to datasource and schemas permissions then they should only be able to query in those schemas.

Actual results

The user cannot query when given schema and datasource permissions and require database access which in turn grants them permissions to all schemas.

How to reproduce the bug

  1. Create a data source connection with multiple schemas
  2. For a gamma role, grant the role datasource access (datasource access on [conn].[id:1]) and schema access to one schema (schema access on [conn].[schema1]
  3. Log in as user with gamma and navigate to the sql lab
  4. See error prompted about "It seems you don't have access to any database" and that the user cannot query

Environment

(please complete the following information):

  • superset version: 0.33.rc1
  • python version: 3.6.8
  • node.js version: v10.15.3
  • npm version: 6.4.1

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

Add any other context about the problem here.

#bug inactive v0.33

All 3 comments

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

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

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. For admin, please label this issue .pinned to prevent stale bot from closing the issue.

Any update on this? Still can't use sql lab without database permissions. Even on 0.34.0rc1

Was this page helpful?
0 / 5 - 0 ratings