Repository navigation
[v3-4-test] UI: Scope partitioned Dag run asset list to readable assets (#75213) - #75817
Merged
Merged
Conversation
…ts (#75213) * Scope asset expressions to the assets the caller may read `next_run_assets` scopes the asset scheduling expression it serves to the assets the caller may read (#72864), and the dependencies graph followed (#73008). Four endpoints still served `DagModel.asset_expression` verbatim: the public Dag details endpoint, the UI Dag list, and both partitioned Dag run endpoints. A caller authorized on a Dag but not on its upstream assets could read every name and uri out of them, and the public endpoint needs no UI to reach. Asset names and uris commonly encode bucket, table or dataset names, which is why the rest of the asset API already scopes them. The sibling `assets` array of the pending partitioned Dag run response carries the same names; scoping that is a separate change with its own UI consumers. * UI: Scope partitioned Dag run asset list to readable assets The pending partitioned Dag run detail response carries two asset-bearing fields. `asset_expression` is scoped to the assets the caller may read; the sibling `assets` array was not, so one payload could blank an asset inside the boolean tree while spelling its name and uri out one key over. That defeated the redaction on this route, and the route's own asset dependency only checks whether the caller may read assets at all -- there is no asset id in its path for it to authorize against. The counts and partition keys of a blanked asset are kept. They describe the Dag's own schedule, which a caller who reached this endpoint can already read, and dropping them would leave a stuck run with no explanation at all. This endpoint is served only to the UI: the public v2 spec regenerates byte-identical, and no airflow-ctl model references the response. (cherry picked from commit a462d68) Co-authored-by: Henry Chen <henrychen@apache.org>
1 task done
bbovenzi
marked this pull request as ready for review
October 27, 2026 20:51
bbovenzi
requested review from
bbovenzi,
pierrejeambrun and
ryanahamilton
as code owners
October 27, 2026 20:51
bbovenzi
enabled auto-merge (squash)
October 27, 2026 20:51
bbovenzi
requested review from
bugraoz93,
choo121600,
ephraimbuddy,
guan404ming,
henry3260,
jason810496,
rawwar,
shubhamraj-git and
vatsrahul1001
as code owners
October 27, 2026 20:51
Contributor
Author
|
Hi maintainer, this PR was merged without a milestone set.
|
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
next_run_assetsscopes the asset scheduling expression it serves to theassets the caller may read (#72864), and the dependencies graph followed
(#73008). Four endpoints still served
DagModel.asset_expressionverbatim:the public Dag details endpoint, the UI Dag list, and both partitioned Dag
run endpoints. A caller authorized on a Dag but not on its upstream assets
could read every name and uri out of them, and the public endpoint needs no
UI to reach. Asset names and uris commonly encode bucket, table or dataset
names, which is why the rest of the asset API already scopes them.
The sibling
assetsarray of the pending partitioned Dag run responsecarries the same names; scoping that is a separate change with its own UI
consumers.
The pending partitioned Dag run detail response carries two asset-bearing
fields.
asset_expressionis scoped to the assets the caller may read; thesibling
assetsarray was not, so one payload could blank an asset inside theboolean tree while spelling its name and uri out one key over. That defeated
the redaction on this route, and the route's own asset dependency only checks
whether the caller may read assets at all -- there is no asset id in its path
for it to authorize against.
The counts and partition keys of a blanked asset are kept. They describe the
Dag's own schedule, which a caller who reached this endpoint can already read,
and dropping them would leave a stuck run with no explanation at all.
This endpoint is served only to the UI: the public v2 spec regenerates
byte-identical, and no airflow-ctl model references the response.
(cherry picked from commit a462d68)
Co-authored-by: Henry Chen henrychen@apache.org