slice-soupam commented on code in PR #72297:
URL: https://github.com/apache/airflow/pull/72297#discussion_r4433238766
##########
airflow-core/src/airflow/api_fastapi/execution_api/routes/xcoms.py:
##########
@@ -679,6 +679,7 @@ def get_xcom(
@router.post(
"/{dag_id}/{run_id}/{task_id}/{key:path}",
status_code=status.HTTP_201_CREATED,
+ dependencies=[ExecutionOrDagParseToken, DagInGrantedBundle],
Review Comment:
Thanks — agreed, and this is now explicit + covered over HTTP (not only the
in-process client).
**Scope :** a `dag_parse` token may write XComs for any task instance whose
Dag is in the token’s granted bundle (`DagInGrantedBundle`), same boundary as
parse-time Variable writes. It is not limited to a single callback identity;
bundle membership is the authorization boundary.
**HTTP coverage:**
- `test_dag_parse_set_same_bundle_allowed_cross_bundle_forbidden` —
same-bundle POST succeeds (201), cross-bundle is rejected (403), using a real
`DagParseToken` on the Execution API client path.
- `test_security` / `test_token_scope_boundaries` updated so `POST /xcoms`
is admitted for `dag_parse` (auth then proceeds to normal 404-if-missing-TI
behavior).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]