Skip to content

Add "MENU" permission in auth manager - #37881

Merged
vincbeck merged 4 commits into
apache:mainfrom
aws-mwaa:vincbeck/fab_menu
Mar 5, 2024
Merged

Add "MENU" permission in auth manager#37881
vincbeck merged 4 commits into
apache:mainfrom
aws-mwaa:vincbeck/fab_menu

Conversation

@vincbeck

@vincbeck vincbeck commented Mar 4, 2024

Copy link
Copy Markdown
Contributor

^ 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 newsfragments.

@vincbeck

vincbeck commented Mar 4, 2024

Copy link
Copy Markdown
Contributor Author

cc @potiuk @jedcunningham

Comment thread airflow/providers/fab/auth_manager/fab_auth_manager.py Outdated
Comment thread airflow/providers/fab/auth_manager/fab_auth_manager.py
@vincbeck

vincbeck commented Mar 5, 2024

Copy link
Copy Markdown
Contributor Author

Merging. The test failure is unrelated to this PR

@vincbeck
vincbeck merged commit 89e7f3e into apache:main Mar 5, 2024
@vincbeck
vincbeck deleted the vincbeck/fab_menu branch March 5, 2024 18:56
@utkarsharma2 utkarsharma2 added the type:bug-fix Changelog: Bug Fixes label Mar 6, 2024
@utkarsharma2 utkarsharma2 added this to the Airflow 2.8.3 milestone Mar 6, 2024
ephraimbuddy pushed a commit that referenced this pull request Mar 6, 2024
sehaj-sandhu added a commit to acceldata-io/airflow that referenced this pull request Jul 9, 2026
…024-28746)

The auth manager collapsed ACTION_CAN_ACCESS_MENU into ACTION_CAN_READ
(menu access treated as read access), so an authenticated low-privilege
user could see menu items - and the resources behind them (Variables,
Connections, Config, etc.) - without holding the menu-access permission.

Backport of upstream commit 89e7f3e (apache#37881, fixed in
2.8.3), adapted to 2.8.1 layout (FAB auth manager lives under
airflow/auth/managers/fab/, not airflow/providers/fab/):
- base_auth_manager: add "MENU" to the ResourceMethod literal
- utils/fab: map MENU -> ACTION_CAN_ACCESS_MENU, and stop aliasing
  ACTION_CAN_ACCESS_MENU back to "GET"
- fab_auth_manager: is_authorized_view uses MENU for AccessView.DOCS;
  _get_user_permissions no longer rewrites CAN_ACCESS_MENU to CAN_READ
- www/security_manager: custom-view check no longer aliases the two

Pre-images matched 2.8.1 exactly; removed permission imports are unused
after the change. Registered all four files in odp/patch_files.txt.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
sehaj-sandhu added a commit to acceldata-io/airflow that referenced this pull request Jul 10, 2026
…024-28746)

The auth manager collapsed ACTION_CAN_ACCESS_MENU into ACTION_CAN_READ
(menu access treated as read access), so an authenticated low-privilege
user could see menu items - and the resources behind them (Variables,
Connections, Config, etc.) - without holding the menu-access permission.

Backport of upstream commit 89e7f3e (apache#37881, fixed in
2.8.3), adapted to 2.8.1 layout (FAB auth manager lives under
airflow/auth/managers/fab/, not airflow/providers/fab/):
- base_auth_manager: add "MENU" to the ResourceMethod literal
- utils/fab: map MENU -> ACTION_CAN_ACCESS_MENU, and stop aliasing
  ACTION_CAN_ACCESS_MENU back to "GET"
- fab_auth_manager: is_authorized_view uses MENU for AccessView.DOCS;
  _get_user_permissions no longer rewrites CAN_ACCESS_MENU to CAN_READ
- www/security_manager: custom-view check no longer aliases the two

Pre-images matched 2.8.1 exactly; removed permission imports are unused
after the change. Registered all four files in odp/patch_files.txt.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
JeffreySmith pushed a commit to acceldata-io/airflow that referenced this pull request Jul 27, 2026
JeffreySmith pushed a commit to acceldata-io/airflow that referenced this pull request Jul 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:providers area:webserver Webserver related Issues provider:fab type:bug-fix Changelog: Bug Fixes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants