Skip to content

Dashboard RBAC access doesn't conform to documentation (and access permission exposes a possible security risk) #22640

@giovannipapini-agilelab

Description

@giovannipapini-agilelab

DASHBOARD_RBAC does not behave as explained in documentation: it says 'Roles is a list which defines access to the dashboard. Granting a role access to a dashboard will bypass dataset level checks. If no roles are defined, then the dashboard is available to all roles.', but instead when I do not assign any role to the dashboard only admin and owners can access to it.

How to reproduce the bug

  1. Feature flag DASHBOARD_RBAC set to True
  2. Open a published dashboard that has no role assigned as a Alpha-role-assigned user

Expected results

The dashboard

Actual results

A permission error

Screenshots

image

Environment

(please complete the following information):

  • browser type and version: both Edge and Firefox
  • superset version: both 1.5 and 2.0
  • python version: python --version 3.9

Checklist

Make sure to follow these steps before submitting your issue - thank you!

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

Additional context

While investigating in the problem I found out that it is possible to access any dashboard with status DRAFT from any user (when dashboard has no RBAC role assigned).

The problem could probably be here:

or (not dashboard.published and not dashboard.roles)

Indeed, I cannot figure out why the condition should be or (not dashboard.published and not dashboard.roles) and not or (dashboard.published and not dashboard.roles).

Is there a case in which a non-admin and non-owner user should view a (not even menu-listed) draft dashboard?

Metadata

Metadata

Assignees

Labels

#bugBug report

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions