Skip to content

[v3-4-test] Scope upstream asset events of a Dag run to assets and Dags the caller may read (#72924) - #75108

Merged
potiuk merged 3 commits into
v3-4-testfrom
backport-6f408e1-v3-4-test
Oct 19, 2026
Merged

potiuk merged 3 commits into
v3-4-testfrom
backport-6f408e1-v3-4-test

Conversation

@github-actions

Copy link
Copy Markdown
Contributor

GET /dags/{dag_id}/dagRuns/{dag_run_id}/upstreamAssetEvents returned every
asset event a run consumed as long as the caller could read the consuming Dag.
Events of assets, or produced by source Dags, the caller is not allowed to read
were exposed, including their name, uri, extra and source Dag/task ids, even
though GET /assets/events hides the same events.

Query the consumed events through the dagrun_asset_event table and apply the
same per-asset and per-source-Dag readability filters as GET /assets/events,
so hidden events are excluded from both the response and total_entries.
(cherry picked from commit 6f408e1)

Co-authored-by: Henry Chen [email protected]

…gs the caller may read (#72924)

GET /dags/{dag_id}/dagRuns/{dag_run_id}/upstreamAssetEvents returned every
asset event a run consumed as long as the caller could read the consuming Dag.
Events of assets, or produced by source Dags, the caller is not allowed to read
were exposed, including their name, uri, extra and source Dag/task ids, even
though GET /assets/events hides the same events.

Query the consumed events through the dagrun_asset_event table and apply the
same per-asset and per-source-Dag readability filters as GET /assets/events,
so hidden events are excluded from both the response and total_entries.
(cherry picked from commit 6f408e1)

Co-authored-by: Henry Chen <[email protected]>
@boring-cyborg boring-cyborg Bot added the area:API Airflow's REST/HTTP API label Oct 19, 2026
…test (#75126)

SimpleAuthManager overrides get_authorized_assets since #72934, so patching the BaseAuthManager method left the real one in place, every asset stayed readable, and the test added in #72924 failed on main.

Generated-by: Claude Opus 5
(cherry picked from commit 33e6b5f)
@potiuk
potiuk marked this pull request as ready for review October 19, 2026 20:19
@potiuk
potiuk merged commit 4ae8da9 into v3-4-test Oct 19, 2026
68 checks passed
@potiuk
potiuk deleted the backport-6f408e1-v3-4-test branch October 19, 2026 20:41
@github-actions github-actions Bot added this to the Airflow 3.4.1 milestone Oct 19, 2026
@github-actions

Copy link
Copy Markdown
Contributor Author

Hi maintainer, this PR was merged without a milestone set.
We've automatically set the milestone to Airflow 3.4.1 based on: merged to version branch
If this milestone is not correct, please update it to the appropriate milestone.

This comment was generated by Milestone Tag Assistant.

vatsrahul1001 pushed a commit that referenced this pull request Oct 20, 2026
…gs the caller may read (#72924) (#75108)

* [v3-4-test] Scope upstream asset events of a Dag run to assets and Dags the caller may read (#72924)

GET /dags/{dag_id}/dagRuns/{dag_run_id}/upstreamAssetEvents returned every
asset event a run consumed as long as the caller could read the consuming Dag.
Events of assets, or produced by source Dags, the caller is not allowed to read
were exposed, including their name, uri, extra and source Dag/task ids, even
though GET /assets/events hides the same events.

Query the consumed events through the dagrun_asset_event table and apply the
same per-asset and per-source-Dag readability filters as GET /assets/events,
so hidden events are excluded from both the response and total_entries.
(cherry picked from commit 6f408e1)

Co-authored-by: Henry Chen <[email protected]>

* Mock the simple auth manager in the upstream asset events permission test (#75126)

SimpleAuthManager overrides get_authorized_assets since #72934, so patching the BaseAuthManager method left the real one in place, every asset stayed readable, and the test added in #72924 failed on main.

Generated-by: Claude Opus 5
(cherry picked from commit 33e6b5f)

---------

Co-authored-by: Henry Chen <[email protected]>
Co-authored-by: Jarek Potiuk <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:API Airflow's REST/HTTP API

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants