Repository navigation
Fixes 38451: Authorize can_create on DAGs as PUT so FAB admins reach health-auth and deploy - #38452
Conversation
…reach health-auth and deploy FabAuthManager has no can_create on the DAGs resource (only read/edit/delete), so mapping can_create to POST denied every user, Admin included, on the health-auth and deploy routes. Every Helm deployment of 2.1.0 (the Airflow chart configures FabAuthManager) lost its pipeline service with 403s.
❌ PR checklist incompleteThis PR cannot be merged until the following are addressed on its linked issue:
The fields live on the linked issue in the Shipping project (open the issue → right sidebar → Projects). After you set them, re-run this check (or push a commit) — issue/project changes do not re-trigger it automatically. Maintainers can bypass this check by adding the |
Code Review ✅ Approved 🔴 High riskMapping DAG can_create to PUT changes authorization for health-auth and deploy; users with DAG edit rights could trigger pipeline deployments. Maps VerificationRules No rules evaluated Functional validation Not enabledAuto-approval Not enabledFor more verification details, comment OptionsDisplay: compact → Showing compact verification results. Comment with these commands to change the behavior for this request:
Was this helpful? React with 👍 / 👎 | Powered by Gitar — free for open source |
…s reach health-auth and deploy (#38452) + bump ingestion 2.1.0.2 (#38461) * fix(airflow-apis): authorize can_create on DAGs as PUT so FAB admins reach health-auth and deploy FabAuthManager has no can_create on the DAGs resource (only read/edit/delete), so mapping can_create to POST denied every user, Admin included, on the health-auth and deploy routes. Every Helm deployment of 2.1.0 (the Airflow chart configures FabAuthManager) lost its pipeline service with 403s. (cherry picked from commit f34f5fe) * bump ingestion 2.1.0.2
Describe your changes:
Fixes #38451
#36145 made the managed-API plugin routes authorize through the configured auth manager. It maps
can_create→POST. The Airflow Helm chart configuresFabAuthManager, which checksPOSTonDAGsas("can_create", "DAGs") in user.perms. FAB'sDAGsresource only definescan_read/can_edit/can_delete, so no role ever has that permission. Every caller, the chart'sAdminincluded, gets a 403 onhealth-authanddeploy, the two routes that declarecan_create. On 2.1.0 Helm deployments the server sees Airflow as unavailable and can't deploy any pipeline:Fix: in
security_compat._is_authorized_for,can_createon theDAGsresource is authorized asPUT(can_edit). Other resources keep the existing map.SimpleAuthManager(docker-compose) givesPOSTandPUTon DAGs to the same roles, so it's unchanged. Unknown actions still fail closed. The ADR from #36145 gets a v2 amendment recording the mapping.Backport: this should go to the 2.1 release branch. Every 2.1.0 Helm/ArgoCD deployment is affected.
Type of change:
High-level design:
N/A — small change (one mapping in one function, plus its test and the ADR amendment).
Tests:
Use cases covered
Admin(full DAG permission set, taken from FAB's ownDAG_ACTIONS) authenticating with basic credentials can reach acan_createroute: was 403, now 200.can_readon DAGs is still forbidden on acan_createroute.SimpleAuthManagerviewer is still forbidden on acan_createroute (both 3.0/3.1 and 3.2+ API shapes).Unit tests
openmetadata-airflow-apis/tests/unit/test_security_compat.py. NewTestBasicCredentialsAgainstFabAuthManagerdrives the realFabAuthManager; only the user store is a stand-in.pytest tests/unit/test_security_compat.pyon Airflow 3.3.2 +apache-airflow-providers-fab3.9.0 (the image's constraints): 34 passed. Without the fix:test_admin_dispatches_on_create_routefails withassert 403 == 200(1 failed, 33 passed).ruff check/ruff format --check(0.15.12): clean.openmetadata-airflow-apis/tests/unit. My throwaway venv has noopenmetadata-ingestion, so it couldn't import them. Theairflow-apis-testsCI job runs them.Backend integration tests
Ingestion integration tests
ingestion/changes).Playwright (UI) tests
Manual testing performed
On a 2.1.0 Helm/ArgoCD deployment (chart
openmetadata-dependencies2.1.0, imageopenmetadata/ingestion:2.1.0), confirmed everyhealth-authcall from the server isUpdated user …followed byAccess denied→ 403 in the api-server log. That's the failure above.Traced it to
FabAuthManager._is_authorized/DAG_ACTIONSinapache-airflow-providers-fab==3.9.0(the version the image pins).Reproduced and verified on the real
openmetadata/ingestion:2.1.0image, set up like the Helm chart (AIRFLOW__CORE__AUTH_MANAGER=…FabAuthManager, users created withairflow users create -r Admin/-r Viewer). I called each permission class with basic auth, first on the stock image, then with this PR'ssecurity_compat.pymounted over the installed one:GET health-auth(create){"status":"healthy"}/ 403POST deploy(create)GET status(read)POST enable,POST trigger(edit)DELETE delete(delete)¹ The handler ran and rejected the dummy probe payload (
Missing dag_id,KeyError: 'sourceConfig',DAG x not found), so authorization passed.Not yet done: a full server→Airflow deploy-and-run cycle on the Helm deployment once an image with this fix is built.
UI screen recording:
Not applicable — backend-only fix in the Airflow plugin.
Checklist:
I have read the CONTRIBUTING document.
My PR title is
Fixes <issue-number>: <short explanation>My PR is linked to a GitHub issue via
Fixes #<issue-number>above.I have commented on my code, particularly in hard-to-understand areas.
For JSON Schema changes: N/A, no schema changes.
For a UI feature or feature task: N/A, backend-only.
I have added tests (unit / integration / Playwright as applicable) and listed them above.
Self-review: I reviewed the final diff against
REVIEW.md(thepr-checklistskill runs it) and fixed every 🔴 finding, or answered it on the line below.Reviewed
f34f5fe218b: no 🔴 or 🟡. The reviewer confirmed the new test fails without the fix.Decision check: amends
ADR:2026-10-26-airflow3-plugin-routes-authenticate-through-the-configured-auth-manager(v2).I have added a test that covers the exact scenario we are fixing.
🤖 Generated with Claude Code


Confidence Score: 5/5
The PR appears safe to merge; no actionable defects were found.Summary
Changes Airflow 3 checks for
can_createonDAGsfromPOSTtoPUT, allowing FAB users with DAG edit permission to reachhealth-authanddeploy.Reviews (1) · Last reviewed commit: "fix(airflow-apis): authorize can_create ..." · Reviewed by Greptile