You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@superset.apache.org by ma...@apache.org on 2026/10/06 19:45:08 UTC
(superset) 02/23: fix(security): exempt the login-token mint endpoint from CSRF
This is an automated email from the ASF dual-hosted git repository.
madhushreeag pushed a commit to branch madhu-one-time-login-tokens
in repository https://gitbox.apache.org/repos/asf/superset.git
commit dc5f3f5c078b3df264f85c5bb9984732b38e59a9
Author: madhushree agarwal <ma...@apple.com>
AuthorDate: Tue Sep 15 12:02:42 2026 -0700
fix(security): exempt the login-token mint endpoint from CSRF
POST /api/v1/security/login-token/ is a server-to-server call from a trusted
parent application's backend, authenticated by LOGIN_TOKEN_IDENTITY_RESOLVER
rather than by a session cookie. Such a caller holds no Superset session and so
has no CSRF token to present, and there is no session for an attacker to forge
against -- the same rationale as the token-authenticated chart-data and
datasource-query endpoints already in WTF_CSRF_EXEMPT_LIST.
Without this the mint endpoint returns "400 The CSRF token is missing" and the
flow cannot be used at all.
---
superset/config.py | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/superset/config.py b/superset/config.py
index 6842f13ef39..c4e1b22a9d7 100644
--- a/superset/config.py
+++ b/superset/config.py
@@ -392,6 +392,11 @@ WTF_CSRF_EXEMPT_LIST = [
"superset.dashboards.api.export_xlsx",
"superset.views.core.log",
"superset.views.datasource.views.samples",
+ # Minting a one-time login token is a server-to-server call from a trusted
+ # parent application's backend, authenticated by
+ # LOGIN_TOKEN_IDENTITY_RESOLVER rather than by a session cookie. There is no
+ # session to forge against, and such a caller has no CSRF token to present.
+ "superset.security.api.login_token",
"flask_appbuilder.security.views.acs",
]