superset icon indicating copy to clipboard operation
superset copied to clipboard

Access is denied for some charts in an embedded dashboard

Open ficapal18 opened this issue 2 years ago • 2 comments

We are building an AI cognitive tool for personalized medicine in cancer, and we would like to have an analytics dashboard in it.

For this reason, we embedded a Superset dashboard in the tool. So far, we are very satisfied with the outcomes and how the dashboard fits in the tool. We are close to make it work, but we require the help from an expert in Superset that can help us with the following problem:

Some charts in the dashboard return an "Access is Denied" error and are not shown. However, the other charts are correctly displayed. We already granted owner access to the "public" account to the dashboard, which is the one used to access an embedded dashboard. Surprisingly, when the dashboard is visualized by an admin account on the superset platform, without being embedded in our tool, all the charts are displayed and there's not such error.

Any ideas on what is happening?

Environment

  • superset version: apache/superset:1.5.1
  • any feature flags active:
    "EMBEDDED_SUPERSET":True, "DASHBOARD_CROSS_FILTER":True, "DASHBOARD_CROSS_FILTERS":True, "DASHBOARD_NATIVE_FILTERS_SET":True, "DASHBOARD_RBAC":True, "DASHBOARD_FILTERS_EXPERIMENTAL" :True, "ENABLE_TEMPLATE_PROCESSING": True

ficapal18 avatar Jul 08 '22 14:07 ficapal18

I just had the same issue today. In my case, only bar charts where the x-axis is a category and not a date/time gave me an Access Denied. While inspecting the network calls in chrome I find out that it was the explore_json endpoint that returned 403 so I added to the role I use for embed the right can explore json on Superset.

I hope it helps :)

catherinetrn avatar Aug 01 '22 16:08 catherinetrn

I just had the same issue today. In my case, only bar charts where the x-axis is a category and not a date/time gave me an Access Denied. While inspecting the network calls in chrome I find out that it was the explore_json endpoint that returned 403 so I added to the role I use for embed the right can explore json on Superset.

I hope it helps :)

Same on 1.4.2. I was getting 401 for some explore_json calls for some charts. Weirdly this API is not hit for every chart in dashboard but for select few. Added can explore json on Superset for the required role and it's working now.

Thanks @catherinetrn

perfectayush avatar Aug 03 '22 14:08 perfectayush

i am getting this error when i am trying to drill to detail on the map on embedded dashboard

Jaykin001 avatar Aug 08 '23 10:08 Jaykin001

I just added "can log on Superset" permission to Public role and that solved the problem for me.

lucasfernando avatar Aug 31 '23 14:08 lucasfernando

Hi i have similar problem with public (no login) access to dashboards I created role Guest and added in superset_config.py image

PUBLIC_ROLE_LIKE = "Guest"

DEFAULT_FEATURE_FLAGS = {
    "DASHBOARD_RBAC": True,
    "ENABLE_TEMPLATE_PROCESSING": True,
    "DASHBOARD_NATIVE_FILTERS": True,
    "DASHBOARD_CROSS_FILTERS": True
}

when i publish and share via link any embedded dashboard or chart i get Access is Denied and its redirect me on Log In Page.

Any suggestions how to evade it ?

Griffith88 avatar Sep 14 '23 11:09 Griffith88

i found a solution for myself and posted it in my discussion https://github.com/apache/superset/discussions/25299

Griffith88 avatar Sep 19 '23 13:09 Griffith88

Embedded dashboards without URL SLUG will not be opened

Griffith88 avatar Sep 19 '23 13:09 Griffith88

I'm hopeful that the solutions above panned out, and that's why this thread has gone quiet. We're no longer supporting Superset 2.x or prior, and since it's been a while since this thread saw any activity, I'll close this as stale. If it is still an issue in Superset 3.x or newer, we can re-open this, or feel free to open a new issue with updated context. Thanks!

rusackas avatar Mar 18 '24 21:03 rusackas