Repository navigation
Grant Keycloak SuperAdmin access to teamless resources - #74640
Merged
vincbeck merged 1 commit intoOct 14, 2026
Merged
Conversation
In multi-team mode SuperAdmin is documented as the role with global admin access across all teams, but the repaired Admin permission only covered team-suffixed resources plus Asset, AssetAlias and Configuration. Dags, Variables, Connections and Pools without a team assignment are checked against their plain resource names, so a SuperAdmin received 403 when reading or editing any of them.
|
Congratulations on your first Pull Request and welcome to the Apache Airflow community! If you have any issues or are unsure about any anything please check our Contributors' Guide
|
vincbeck
approved these changes
Oct 13, 2026
|
Awesome work, congrats on your first merged pull request! You are invited to check our Issue Tracker for additional contributions. |
28 of 93 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
In multi-team mode, the Keycloak auth manager docs describe
SuperAdminas the role that "grants global admin access across all teams", and the multi-team docs state that resources without a team assignment are global. However, whencreate-teamrepairs the globalAdminpermission (the one bound toSuperAdmin), it only keeps team-suffixed resources (Dag:<team>,Variable:<team>, ...) plusAsset,AssetAliasandConfiguration.Dags, Variables, Connections and Pools that have no team are authorized against their plain resource names (
Dag,Variable,Connection,Pool), and no permission grantsSuperAdminanything butLISTon those. As a result aSuperAdmingets 403 when reading or editing any teamless Dag, Variable, Connection or Pool.This change keeps the plain team-scoped resource names in the repaired
Adminpermission, soSuperAdmincovers both team-owned and teamless resources. Existing deployments pick it up by re-runningairflow keycloak-auth-manager create-team <team>, as already described in the 0.9.0 changelog note.related: #71277
Testing
Unit: updated
test_update_admin_permission_resources_removes_admin_role_policy, whose expected resources encoded the missingDagentry; it fails without the change and passes with it.providers/keycloak/tests/unit/keycloak/auth_manager/cli/test_commands.pypasses.Manual, against Keycloak 26.0.8 with Airflow built from
main, provisioned withcreate-all --teams team-a,team-b,create-teamandadd-user-to-team, then querying Keycloak with the same UMA requestsKeycloakAuthManager._is_authorizedsends:SuperAdminrequestDag:team-a#GET,Dag:team-a#PUTDag#GET,Dag#PUT(teamless Dag)Variable#GET,Variable#PUTConnection#GET,Pool#GETTeam-role users (
Admininteam-a/team-b) are unchanged by this PR: still no access to the other team's resources.prekpre-commit hooks pass, exceptgenerate-openapi-spec-keycloak, which was skipped locally because it requires Breeze; this change does not touch the Keycloak API.Not in scope
Team roles (
Viewer/User/Op/Adminin a team) still only getLISTon teamless resources, so they cannot open or edit shared Dags or global Variables. That needs a decision on which team roles should read or write global resources, so it is left out of this PR.Was generative AI tooling used to co-author this PR?
Generated-by: Claude Code (Opus 5.5) following the guidelines