-
Notifications
You must be signed in to change notification settings - Fork 13.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
29 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -27,6 +27,11 @@ using your app's authentication. | |
|
||
Embedding is done by inserting an iframe, containing a Superset page, into the host application. | ||
|
||
## Prerequisites | ||
|
||
* Activate the feature flag `EMBEDDED_SUPERSET` | ||
* Set a strong password in configuration variable `GUEST_TOKEN_JWT_SECRET` (see configuration file config.py). Be aware that its default value must be changed in production. | ||
|
||
## Embedding a Dashboard | ||
|
||
Using npm: | ||
|
@@ -108,6 +113,30 @@ Example `POST /security/guest_token` payload: | |
] | ||
} | ||
``` | ||
|
||
Alternatively, a guest token can be created directly in your app with a json like the following, and then signed | ||
with the secret set in configuration variable `GUEST_TOKEN_JWT_SECRET` (see configuration file config.py) | ||
``` | ||
{ | ||
"user": { | ||
"username": "[email protected]", | ||
"first_name": "embedded", | ||
"last_name": "embedded" | ||
}, | ||
"resources": [ | ||
{ | ||
"type": "dashboard", | ||
"id": "d73e7841-9342-4afd-8e29-b4a416a2498c" | ||
} | ||
], | ||
"rls_rules": [], | ||
"iat": 1730883214, | ||
"exp": 1732956814, | ||
"aud": "superset", | ||
"type": "guest" | ||
} | ||
``` | ||
|
||
### Sandbox iframe | ||
|
||
The Embedded SDK creates an iframe with [sandbox](https://developer.mozilla.org/es/docs/Web/HTML/Element/iframe#sandbox) mode by default | ||
|