Commit Graph
5 Commits
Author SHA1 Message Date
Amin Ghadersohi f9f1aba40a fix(security): align scope issuance and enforcement 2026-08-14 16:52:34 +00:00
Amin Ghadersohi 9237b3d96d fix(security): fail closed for unknown flat scopes 2026-08-14 16:10:17 +00:00
Amin Ghadersohi 320fb9ef98 fix(security): centralize and validate resource scopes 2026-08-14 16:10:17 +00:00
Amin Ghadersohi 2d88c198dc fix(security): validate API key scopes against requested user 2026-08-14 16:10:16 +00:00
Amin GhadersohiandClaude Fable 5 048cfae595 feat(mcp): per-resource token scopes with user-permission intersection
Adds superset:<resource>:<action> scope support to the MCP service:

- CompositeTokenVerifier now propagates an API key's own ApiKey.scopes
  (via a new SupersetSecurityManager.get_api_key_scopes lookup) instead
  of always stamping the verifier-global required_scopes on the token.
- check_tool_permission/_token_scope_allows accept a per-resource scope
  (e.g. superset:dashboard:read, derived from the tool's
  class_permission_name) as an alternative grant path alongside the
  existing flat superset:read/superset:write scopes, which keep working
  for already-issued tokens.
- SupersetSecurityManager.create_api_key validates requested scopes
  against the issuing user's own RBAC before delegating to FAB
  (intersection rule: a key can never be scoped beyond the user's own
  permissions; flat scopes are Admin-only to self-issue; unknown scopes
  are rejected).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-14 16:10:15 +00:00