You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This PR updates the permission check for the PATCH /roles/{user} endpoint in the FAB Auth Manager FastAPI routes.
Specifically, it changes the permission check from PATCH to PUT in the requires_fab_custom_view dependency.
Why
Previously, the endpoint was using requires_fab_custom_view("PATCH", ...) for a PATCH route, which caused a mismatch between the HTTP method and the required permission.
Aligning the permission check with the actual HTTP method ensures correct and predictable access control.
Was generative AI tooling used to co-author this PR?
Yes (please specify the tool below)
Read the Pull Request Guidelines for more information. Note: commit author/co-author name and email in commits become permanently public when merged.
For fundamental code changes, an Airflow Improvement Proposal (AIP) is needed.
That's expected, in Airflow auth model we use PUT to any modification operation. Which is the case here. I dont see any benefit of using PATCH
I noticed that the /roles/{name} endpoint uses PATCH in the permission check, so I want to update the /users/{username} endpoint to also use PATCH for consistency. wdyt?
That's expected, in Airflow auth model we use PUT to any modification operation. Which is the case here. I dont see any benefit of using PATCH
I noticed that the /roles/{name} endpoint uses PATCH in the permission check, so I want to update the /users/{username} endpoint to also use PATCH for consistency. wdyt?
or update /roles/{name} to use PUT instead?
Good catch, it should be PUT, can you please update it?
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
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.
What
This PR updates the permission check for the
PATCH /roles/{user}endpoint in the FAB Auth Manager FastAPI routes.Specifically, it changes the permission check from
PATCHtoPUTin therequires_fab_custom_viewdependency.Why
Previously, the endpoint was using
requires_fab_custom_view("PATCH", ...)for aPATCHroute, which caused a mismatch between the HTTP method and the required permission.Aligning the permission check with the actual HTTP method ensures correct and predictable access control.
Was generative AI tooling used to co-author this PR?
{pr_number}.significant.rstor{issue_number}.significant.rst, in airflow-core/newsfragments.