Skip to content

Comments

Use attribute based access control in KeycloakAuthManager#51486

Merged
vincbeck merged 1 commit intoapache:mainfrom
aws-mwaa:vincbeck/dag_is_authorized
Jun 9, 2025
Merged

Use attribute based access control in KeycloakAuthManager#51486
vincbeck merged 1 commit intoapache:mainfrom
aws-mwaa:vincbeck/dag_is_authorized

Conversation

@vincbeck
Copy link
Contributor

@vincbeck vincbeck commented Jun 6, 2025

While working on implementing is_authorized_dag I realized using ABAC (attribute based access control) would makes more sense and simplify everything. In the previous implementation, for each access control, we were checking:

  • Whether the user has access to the entity type
  • Whether the user has access to the resource itself

Example. If a user tries to access the variable test, we were checking whether the user has access to all variables, if not, we were checking whether the user has access to the variable test.

Now we are doing only one check: whether the user has access to variables and pass the variable key as an attribute. On Keycloak side then, it is up to the admin to use these attributes in policies. You can see examples of such policies here.


^ Add meaningful description above
Read the Pull Request Guidelines for more information.
In case of fundamental code changes, an Airflow Improvement Proposal (AIP) is needed.
In case of a new dependency, check compliance with the ASF 3rd Party License Policy.
In case of backwards incompatible changes please leave a note in a newsfragment file, named {pr_number}.significant.rst or {issue_number}.significant.rst, in airflow-core/newsfragments.

Copy link
Contributor

@bugraoz93 bugraoz93 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is an amazing addition! Thanks, Vincent!

Small update: I have started working on one of the items. I will share as a pull request soon. Most parts done, I need to add some refresh in the auth manager and make the calls.

@vincbeck vincbeck merged commit aadcf45 into apache:main Jun 9, 2025
67 checks passed
@vincbeck vincbeck deleted the vincbeck/dag_is_authorized branch June 9, 2025 14:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants