You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by "dosubot[bot] (via GitHub)" <gi...@apache.org> on 2026/05/02 03:17:11 UTC
Re: [D] Erro cokies [superset]
GitHub user dosubot[bot] edited a comment on the discussion: Erro cokies
<!-- Answer -->
@Tranqu1lo, este é exactamente o mesmo problema que já discutimos nas threads anteriores [[1]](https://github.com/apache/superset/discussions/39343) [[2]](https://github.com/apache/superset/discussions/39200) — o dashboard funciona com login noutro separador porque o browser já tem cookies de sessão, mas sem login os cookies não chegam ao iframe.
Aqui está a **checklist completa** para o `superset_config.py`:
**1. Feature Flag**
- [ ] `FEATURE_FLAGS = {"EMBEDDED_SUPERSET": True}`
**2. Cookies de Sessão**
- [ ] `SESSION_COOKIE_SAMESITE = "None"`
- [ ] `SESSION_COOKIE_SECURE = True` ← **usar `True` explícito, não `USE_HTTPS`** — se a variável não resolver correctamente, os cookies são bloqueados pelo browser [[2]](https://github.com/apache/superset/discussions/39200)
- [ ] `SESSION_COOKIE_HTTPONLY = True`
**3. CORS**
- [ ] `ENABLE_CORS = True`
- [ ] `CORS_OPTIONS` com o domínio **exacto** do seu site e `supports_credentials: True`:
```python
CORS_OPTIONS = {
"origins": ["https://seu-site.com"],
"supports_credentials": True,
}
```
**4. Content Security Policy (CSP)**
- [ ] `TALISMAN_ENABLED = True`
- [ ] `frame-ancestors` a incluir o domínio do seu site:
```python
TALISMAN_CONFIG = {
"content_security_policy": {
"frame-ancestors": ["'self'", "https://seu-site.com"]
}
}
```
**5. CSRF**
- [ ] O backend que gera o guest token deve buscar o CSRF token via `/api/v1/security/csrf_token/` e enviá-lo no header `X-CSRFToken` nas chamadas POST
- [ ] Opcionalmente, isentar o endpoint: `WTF_CSRF_EXEMPT_LIST = ["/api/v1/security/guest_token"]`
**6. Guest Token**
- [ ] `GUEST_TOKEN_JWT_SECRET` definido com um valor seguro (não o default `"test-guest-secret-change-me"`) [[3]](https://github.com/apache/superset/blob/829e4d92d91ceae4b43b1ed3b063ffe45377799c/superset/config.py#L1816)
- [ ] `GUEST_TOKEN_JWT_EXP_SECONDS` ajustado conforme necessidade (default: 300s)
**7. Proxy Reverso (se aplicável)**
- [ ] `ENABLE_PROXY_FIX = True` se estiver atrás de Nginx ou outro proxy que termina SSL
**8. HTTPS**
- [ ] HTTPS no Superset ✅ (já confirmado)
- [ ] HTTPS no site que faz o embed ✅ (já confirmado)
**9. Após alterações**
- [ ] Reiniciar o Superset
- [ ] Limpar cookies do browser e testar numa janela privada
O ponto mais provável do seu problema continua a ser o `SESSION_COOKIE_SECURE = USE_HTTPS` — substitua por `SESSION_COOKIE_SECURE = True` explícito e reinicie.
<!-- 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=c1627f4a-4399-46e9-b0cc-e1b16ec41ad4) [](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/39363#discussioncomment-16569077
----
This is an automatically sent email for notifications@superset.apache.org.
To unsubscribe, please send an email to: notifications-unsubscribe@superset.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org