GitHub user dosubot[bot] added a comment to the discussion: Dashboard Embed
<!-- Answer -->
Para o Guest User funcionar com embedded dashboards, você precisa de:
**1. Configuração no `superset_config.py`**
```python
FEATURE_FLAGS = {
"EMBEDDED_SUPERSET": True
}
GUEST_ROLE_NAME = "EmbedGuest" # Nome do role customizado
GUEST_TOKEN_JWT_SECRET = "seu-segredo-forte-aqui" # Obrigatório alterar do
padrão
GUEST_TOKEN_JWT_EXP_SECONDS = 300 # Expiração do token
```
[[1]](https://github.com/apache/superset/blob/829e4d92d91ceae4b43b1ed3b063ffe45377799c/superset/security/manager.py#L2622-L2625)
**2. Permissões mínimas para o role do Guest User**
- `can read` em **Dashboard**, **Chart**, **Dataset**, **Database**
- `can list`, `can get` em **Dataset** e **Database**
- `can explore` e `can explore_json` em **Superset**
- `can read` em **CurrentUserRestApi** — crítico, sem isso aparece tela preta
[[2]](https://github.com/apache/superset/discussions/39094)
- `can log` em **Superset** (obrigatório no v6.0.0+)
- `can time range` em **Api** (se usar filtros de tempo)
**Importante**: O `GUEST_ROLE_NAME` no config deve corresponder exatamente ao
nome do role que você criou. O Superset ignora o campo `roles` do payload do
token e usa apenas o role configurado no servidor
[[3]](https://github.com/apache/superset/discussions/35670#discussioncomment-14695540).
**3. Se o embed for cross-origin (domínio diferente)**
```python
SESSION_COOKIE_SAMESITE = "None"
SESSION_COOKIE_SECURE = True
SESSION_COOKIE_HTTPONLY = True
ENABLE_CORS = True
CORS_OPTIONS = {
"origins": ["https://seu-dominio.com"],
"supports_credentials": True,
}
```
**4. Causas comuns de erro 403**
- Permissão `can read` em `CurrentUserRestApi` ausente
[[2]](https://github.com/apache/superset/discussions/39094)
- Dashboard não publicado ou embedding não habilitado nele
- `allowed_domains` configurado no dashboard não inclui seu domínio
- Token expirado ou assinado com secret errado
**Dica**: Verifique no network tab do navegador qual endpoint específico
retorna 403 — isso indica exatamente qual permissão está faltando.
<!-- Dosu Comment Footer -->
*To reply, just mention
[@dosu](https://go.dosu.dev/dosubot?utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=reply-with-mention&utm_term=apache%2Fsuperset).*
---
Share context across your team and agents. Try
[Dosu](https://dosu.dev?utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=knowledge-infrastructure-tagline&utm_term=apache%2Fsuperset).
[](https://app.dosu.dev/response-feedback?utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=knowledge-infrastructure-feedback&utm_term=apache%2Fsuperset&message_id=5767cb6b-6d3d-43e2-b81c-f1898f125634)
[](https://github.dosu.com/apache/superset?utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=knowledge-infrastructure-learn-repo&utm_term=apache%2Fsuperset)
[](https://app.dosu.dev/signup?referrer=openSource&source=github-footer&utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=knowledge-infrastructure-add-team&utm_term=apache%2Fsuperset)
GitHub link:
https://github.com/apache/superset/discussions/41152#discussioncomment-17334903
----
This is an automatically sent email for [email protected].
To unsubscribe, please send an email to:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]