403 Forbidden on embedded dashboard in production (worked fine in test), missing can read on CurrentUserRestApi permission? #42547
Replies: 2 comments 3 replies
|
Hi @geovanasullivan! I'm Dosu and I'm helping the Apache Superset team. This is a well-documented issue with embedded dashboards in Superset 6.0+. The 403 is almost certainly coming from the Why you can't find the permission: The What to do:
One user who hit this same 403 in 6.0.1 confirmed that adding To reply, just mention @dosu. Docs are dead. Just use Dosu. |
|
Thanks for the earlier guidance, that was really helpful in confirming the root cause. @dosu Update: I confirmed that can read on CurrentUserRestApi did not exist in the database for this 6.0.0 install at all (not just hidden in the role editor UI). I created the missing permission_view manually via the Security REST API (POST /api/v1/security/permissions-resources/ with permission_id for can_read and view_menu_id for CurrentUserRestApi), then assigned it to the Public role through the normal UI. However, the 403 error persists, and I've now isolated it to a different stage of the flow: In our local/test environment, the guest token is generated successfully and the embedded dashboard loads without issues. Since both environments point to the same Superset instance and use identical credentials, this looks like it may be network-related (e.g., the production server's outbound IP not being allowed to reach the Superset instance, or some proxy/firewall layer in front of it), rather than a permissions issue this time. Has anyone run into guest token generation failing specifically from a production server while working fine locally against the same Superset instance? Any pointers on what to check on the network/infrastructure side would be appreciated. |
Uh oh!
There was an error while loading. Please reload this page.
Hi everyone,
I've embedded a Superset dashboard into our internal site using the guest token flow, and everything worked correctly in our test environment. However, when deploying to production, the dashboard fails to load entirely and returns a 403 Forbidden error (the guest token is generated successfully, but the dashboard itself does not render).
Environment:
Superset version: 6.0.0
FEATURE_FLAGS = {"EMBEDDED_SUPERSET": True} — configured
Guest role: Public (default GUEST_ROLE_NAME)
Service account used to request guest tokens has roles: Gamma + a custom role with can_grant_guest_token
Logged in as Admin while troubleshooting
What I've already checked/tried:
Confirmed the dashboard's "Embed dashboard" settings include the production domain in Allowed Domains
Confirmed resources: [{ type: "dashboard", id: DASHBOARD_UUID }] is correctly passed when generating the guest token
Added datasource access permissions on all underlying datasets to both Public and Gamma roles
Confirmed the dashboard's "Roles" field (Edit properties) includes both Public and Gamma
Searched for the permission can read on CurrentUserRestApi, which other threads mention as critical for embedded dashboards — this permission does not appear anywhere in the Public/Gamma/Admin permission lists, even though I can see plenty of other API-related permissions
My question:
Is can read on CurrentUserRestApi expected to exist by default in 6.0.0, or could it have a different name in this version? If it genuinely doesn't exist in 6.0.0, could that be causing this 403, or should I be looking elsewhere?
Any guidance would be greatly appreciated. Thanks!
All reactions