Keycloak CLI: provision multi‑team resources for auth manager (AIP‑67)#61256
Keycloak CLI: provision multi‑team resources for auth manager (AIP‑67)#61256vincbeck merged 8 commits intoapache:mainfrom
Conversation
vincbeck
left a comment
There was a problem hiding this comment.
Thanks for working on this one. It is pretty massive. Could you split this PR in 2? One for the CLI, one for the rest? That will make the review easier.
providers/keycloak/src/airflow/providers/keycloak/auth_manager/cli/commands.py
Outdated
Show resolved
Hide resolved
providers/keycloak/src/airflow/providers/keycloak/auth_manager/cli/commands.py
Outdated
Show resolved
Hide resolved
providers/keycloak/src/airflow/providers/keycloak/auth_manager/cli/commands.py
Outdated
Show resolved
Hide resolved
providers/keycloak/src/airflow/providers/keycloak/auth_manager/keycloak_auth_manager.py
Outdated
Show resolved
Hide resolved
providers/keycloak/src/airflow/providers/keycloak/auth_manager/keycloak_auth_manager.py
Outdated
Show resolved
Hide resolved
providers/keycloak/src/airflow/providers/keycloak/auth_manager/keycloak_auth_manager.py
Show resolved
Hide resolved
providers/keycloak/src/airflow/providers/keycloak/auth_manager/keycloak_auth_manager.py
Show resolved
Hide resolved
6f33e07 to
b093770
Compare
2bdf90b to
581e4eb
Compare
|
Thanks @stegololz for PR! Now it make a lot of sense to split, I overlooked single commit there :) |
c6eb21e to
98729f9
Compare
d34c3b9 to
bb008c6
Compare
vincbeck
left a comment
There was a problem hiding this comment.
Overall LGTM. I have to admit it is kind of hard to review all that code but I could not find anything off
|
@bugraoz93 If you could take a look as well please |
bugraoz93
left a comment
There was a problem hiding this comment.
Looks good! Thanks a lot, great work!
There is still one test failing on the PR, It would be amazing if you can solve it. We should be able to merge afterwards, otherwise this directly goes to CI teams plate :)
dd2f7d0 to
eb414e5
Compare
…al list permission in the cli
…enuItem enumeration
39043de to
1ae6d6f
Compare
|
Thanks for the reviews! Failing test have been fixed. I was not using the MenuItem Array, so resources were missing. |
|
Error unrelated to this PR, merging |
apache#61256) * feat: update keycloak CLI for multiteam setup * feat: align team-scoped resources permissions with model and add global list permission in the cli * docs: refine language in permissions documentation to be more assertive * fix: update policy name format by removing redundant 'Team-' prefix * feat: add global scoped resources and update permissions to include them * reflect changes on auth_ manager on keycloak resource creation * feat: add 'Jobs' to the CLI menu options in test_commands * refactor: streamline resource names in permission creation by using MenuItem enumeration
Description
This PR extends the Keycloak CLI to support multi‑team resources creation as outlined in AIP‑67. In multi‑team mode, team context from request details (e.g., team_name on DAGs, connections, assets) is now used to authorize access via team‑scoped Keycloak permissions. The model is:
Team = Keycloak group, role = role within that team.
Permissions are team‑scoped (e.g., Dag:team-a#LIST), so users only see and access resources for teams they belong to.
A global admin role remains available for cross‑team administration to preserve operational workflows and backward compatibility.
This CLI is updated to provision the required Keycloak objects for team mode, while remaining compatible with non‑multi‑team deployments (when --teams is not used, no team‑specific resources are created).
related: #60885
Was generative AI tooling used to co-author this PR?
Generated-by: Codex following the guidelines