Skip to content

Fixes 38451: Authorize can_create on DAGs as PUT so FAB admins reach health-auth and deploy - #38452

Merged
ulixius9 merged 1 commit into
mainfrom
ulixius9/airflow-2.1-argocd-issue
Nov 23, 2026
Merged

ulixius9 merged 1 commit into
mainfrom
ulixius9/airflow-2.1-argocd-issue

Conversation

@ulixius9

@ulixius9 ulixius9 commented Nov 23, 2026 •

Copy link
Copy Markdown
Member

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 configures FabAuthManager, which checks POST on DAGs as ("can_create", "DAGs") in user.perms. FAB's DAGs resource only defines can_read / can_edit / can_delete, so no role ever has that permission. Every caller, the chart's Admin included, gets a 403 on health-auth and deploy, the two routes that declare can_create. On 2.1.0 Helm deployments the server sees Airflow as unavailable and can't deploy any pipeline:

[info]    Updated user Peter Parker                       ← basic-auth login OK
[warning] Access denied for /api/v2/openmetadata/health-auth
GET /pluginsv2/api/v2/openmetadata/health-auth  status_code=403

Fix: in security_compat._is_authorized_for, can_create on the DAGs resource is authorized as PUT (can_edit). Other resources keep the existing map. SimpleAuthManager (docker-compose) gives POST and PUT on 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:

  • Bug fix

High-level design:

N/A — small change (one mapping in one function, plus its test and the ADR amendment).

Tests:

Use cases covered

  • A FAB Admin (full DAG permission set, taken from FAB's own DAG_ACTIONS) authenticating with basic credentials can reach a can_create route: was 403, now 200.
  • A FAB user holding only can_read on DAGs is still forbidden on a can_create route.
  • A SimpleAuthManager viewer is still forbidden on a can_create route (both 3.0/3.1 and 3.2+ API shapes).

Unit tests

  • I added unit tests for the new/changed logic.
  • Files updated: openmetadata-airflow-apis/tests/unit/test_security_compat.py. New TestBasicCredentialsAgainstFabAuthManager drives the real FabAuthManager; only the user store is a stand-in.
  • pytest tests/unit/test_security_compat.py on Airflow 3.3.2 + apache-airflow-providers-fab 3.9.0 (the image's constraints): 34 passed. Without the fix: test_admin_dispatches_on_create_route fails with assert 403 == 200 (1 failed, 33 passed).
  • ruff check / ruff format --check (0.15.12): clean.
  • Not run locally: the rest of openmetadata-airflow-apis/tests/unit. My throwaway venv has no openmetadata-ingestion, so it couldn't import them. The airflow-apis-tests CI job runs them.

Backend integration tests

  • Not applicable (no backend API changes).

Ingestion integration tests

  • Not applicable (no ingestion/ changes).

Playwright (UI) tests

  • Not applicable (no UI changes).

Manual testing performed

  1. On a 2.1.0 Helm/ArgoCD deployment (chart openmetadata-dependencies 2.1.0, image openmetadata/ingestion:2.1.0), confirmed every health-auth call from the server is Updated user … followed by Access denied → 403 in the api-server log. That's the failure above.

  2. Traced it to FabAuthManager._is_authorized / DAG_ACTIONS in apache-airflow-providers-fab==3.9.0 (the version the image pins).

  3. Reproduced and verified on the real openmetadata/ingestion:2.1.0 image, set up like the Helm chart (AIRFLOW__CORE__AUTH_MANAGER=…FabAuthManager, users created with airflow users create -r Admin / -r Viewer). I called each permission class with basic auth, first on the stock image, then with this PR's security_compat.py mounted over the installed one:

    Route (permission) Stock 2.1.0: Admin / Viewer Patched: Admin / Viewer
    GET health-auth (create) 403 / 403 200 {"status":"healthy"} / 403
    POST deploy (create) 403 / 403 reaches handler¹ / 403
    GET status (read) reaches handler / reaches handler reaches handler / reaches handler
    POST enable, POST trigger (edit) reaches handler¹ / 403 reaches handler¹ / 403
    DELETE delete (delete) reaches handler¹ / 403 reaches handler¹ / 403

    ¹ The handler ran and rejected the dummy probe payload (Missing dag_id, KeyError: 'sourceConfig', DAG x not found), so authorization passed.

  4. 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 (the pr-checklist skill 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

RetriggerView in GreptileConfidence Score: 5/5

The PR appears safe to merge; no actionable defects were found.

Summary

Changes Airflow 3 checks for can_create on DAGs from POST to PUT, allowing FAB users with DAG edit permission to reach health-auth and deploy.

  • FAB admins can now reach Airflow health checks and deploy pipeline DAGs.

Reviews (1) · Last reviewed commit: "fix(airflow-apis): authorize can_create ..." · Reviewed by Greptile

…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.
Copilot AI balanced review requested due to automatic review settings November 23, 2026 09:14
@github-actions

Copy link
Copy Markdown
Contributor

❌ PR checklist incomplete

This 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 skip-pr-checks label.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

@gitar-bot

gitar-bot Bot commented Nov 23, 2026 •

Copy link
Copy Markdown
Code Review ✅ Approved 🔴 High risk

Mapping DAG can_create to PUT changes authorization for health-auth and deploy; users with DAG edit rights could trigger pipeline deployments.

Maps can_create on the DAGs resource to PUT in security_compat._is_authorized_for, so FAB admins can reach the health-auth and deploy routes that were returning 403 on 2.1.0 Helm deployments. Other resources keep the existing mapping and unknown actions still fail closed. No issues found.

Verification

Rules No rules evaluated

Functional validation Not enabled

Set up

Auto-approval Not enabled

Set up

For more verification details, comment gitar display:verbose.

Options

Display: compact → Showing compact verification results.

Comment with these commands to change the behavior for this request:

Compact
gitar display:verbose         

Was this helpful? React with 👍 / 👎 | Powered by Gitar — free for open source

@ulixius9
ulixius9 merged commit 2597927 into main Nov 23, 2026
50 of 53 checks passed
@ulixius9
ulixius9 deleted the ulixius9/airflow-2.1-argocd-issue branch November 23, 2026 09:48
ulixius9 added a commit that referenced this pull request Nov 23, 2026
…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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Airflow 3 + FAB auth manager: health-auth and deploy return 403 for Admin on 2.1.0 Helm deployments

3 participants