rusackas opened a new pull request, #40659: URL: https://github.com/apache/superset/pull/40659
### SUMMARY Two MCP authorization-hardening fixes: - **FINDING-040** — `user_has_permission()` (`superset/mcp_service/utils/permissions_utils.py`) hardcoded the admin check to role name `"Admin"`/`"admin"`, ignoring the configurable `AUTH_ROLE_ADMIN`. In deployments that rename the admin role, admins would be **over-filtered** (denied the field-level sensitive-data bypass) — a functionality regression, not an escalation. Now uses `current_app.config["AUTH_ROLE_ADMIN"]`. - **FINDING-039** — `check_tool_permission()` (`superset/mcp_service/auth.py`) silently allows a permission-protected tool that declares no `class_permission_name`. That's a supported configuration, so a blanket fail-closed would break legitimate tools — but an *accidentally* permission-less sensitive tool would fail open with no signal. Keep the allow behavior, but **log a warning** so the misconfiguration is visible. ### TESTING INSTRUCTIONS ``` pytest tests/unit_tests/mcp_service/utils/test_permissions_utils.py ``` New test: the admin bypass follows `AUTH_ROLE_ADMIN` (a renamed admin role is honored; the hardcoded "Admin" no longer grants it). ### ADDITIONAL INFORMATION - [ ] Has associated issue: - [ ] Required feature flags: - [ ] Changes UI - [ ] Includes DB Migration - [ ] Introduces new feature or API - [ ] Removes existing feature or API 🤖 Generated with [Claude Code](https://claude.com/claude-code) -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
