From c98b2723c96ef787e3adc8f2a5719c61dbc2e394 Mon Sep 17 00:00:00 2001 From: Aritra Basu <24430013+aritra24@users.noreply.github.com> Date: Thu, 5 Mar 2026 09:57:25 +0530 Subject: [PATCH] [v3-1-test] Fix: Adds task instance validation for hitl (#62886) (cherry picked from commit 0f64abcee310fd392ac8b42edd2e0311a777847b) Co-authored-by: Aritra Basu <24430013+aritra24@users.noreply.github.com> --- .../src/airflow/api_fastapi/execution_api/routes/hitl.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/airflow-core/src/airflow/api_fastapi/execution_api/routes/hitl.py b/airflow-core/src/airflow/api_fastapi/execution_api/routes/hitl.py index 50b9377d2f814..8613855e38747 100644 --- a/airflow-core/src/airflow/api_fastapi/execution_api/routes/hitl.py +++ b/airflow-core/src/airflow/api_fastapi/execution_api/routes/hitl.py @@ -29,9 +29,15 @@ HITLDetailResponse, UpdateHITLDetailPayload, ) +from airflow.api_fastapi.execution_api.deps import JWTBearerTIPathDep from airflow.models.hitl import HITLDetail -router = APIRouter() +router = APIRouter( + dependencies=[ + # This checks that the UUID in the url matches the one in the token for us. + JWTBearerTIPathDep + ] +) log = structlog.get_logger(__name__)