You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by "Lau08 (via GitHub)" <gi...@apache.org> on 2025/08/07 14:20:34 UTC
Re: [I] 403 Forbidden error when trying to embed a dashboard & view it using a guest user token [superset]
Lau08 commented on issue #22258:
URL: https://github.com/apache/superset/issues/22258#issuecomment-3164408036
This config worked for me:
```
FEATURE_FLAGS = { "ALERT_REPORTS": True, "EMBEDDED_SUPERSET": True }
GUEST_ROLE_NAME = "Gamma"
GUEST_TOKEN_JWT_SECRET = "your-secret-here"
GUEST_TOKEN_JWT_AUDIENCE = "audi"
TALISMAN_ENABLED = False
OVERRIDE_HTTP_HEADERS = {
"X-Frame-Options": "ALLOWALL",
"Content-Security-Policy": "frame-ancestors 'self' http://localhost:5173"
}
ENABLE_CORS = True
```
And in the dashboard to embed in superset, copy the URL like this: http://localhost:5173 with the http://
<img width="601" height="351" alt="Image" src="https://github.com/user-attachments/assets/e0ad9315-cbe8-448e-b730-e4d98d5fff29" />
This worked using a guest token, payload to get it from the Svelte application in my case, and using the SDK:
```
const payload = {
user: {
first_name: 'Embedded first_name',
last_name: 'Embedded last_name',
username: 'Embedded_user'
},
resources: [
{
id: SUPERSET_DASHBOARD_ID, //your dashboard id
type: 'dashboard'
}
],
rls_rules: [],
aud: "audi", // same as GUEST_TOKEN_JWT_AUDIENCE in superset
type: 'guest'
};
const token = encodeJwt(payload, SUPERSET_GUEST_SECRET);
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org