superset icon indicating copy to clipboard operation
superset copied to clipboard

No authorization checks on dashboard import / export

Open jaylindquist opened this issue 9 years ago • 1 comments

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

Superset version

Reproduced the issue on versions:

  • 0.17.0
  • 0.17.3

Expected results

Exporting and importing dashboard anonymously should fail with an authorization error unless permissions were granted to the Public role.

Actual results

  • No authorization checks occur on dashboard export or import.
  • Dashboards and slices are successfully exported and will be imported without an owner ID (effectively creating a duplicate dashboard / slices)

Steps to reproduce

  • Install Superset
  • Configure a data source
  • Create a slice
  • Create a dashboard and add the slice
  • Note the ID of the dashboard
  • Use curl to export the dashboard to a pickle file (see below for actual command)
  • Optionally modify the existing dashboard
  • Use curl to import the dashboard
  • See that the imported dashboard is created without an owner

curl commands

Export the dashboard with a given ID:

  • This will export the dashboard with ID=6 and save the output as test.pickle
$ curl 'http://localhost:8088/dashboardmodelview/export_dashboards_form?id=6&action=go' -o test.pickle

Import the dashboard back into Superset:

  • This will import the above test.pickle file back into Superset
$ curl -X POST http://localhost:8088/superset/import_dashboards -F "[email protected]"

Other details

  • OS is CentOS 7
  • Configuration has AUTH_ROLE_PUBLIC = 'Public'
  • The Public role has the default empty set of permissions

jaylindquist avatar Apr 05 '17 20:04 jaylindquist

Notice: this issue has been closed because it has been inactive for 382 days. Feel free to comment and request for this issue to be reopened.

mistercrunch avatar Apr 23 '18 05:04 mistercrunch