Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@
from uuid import UUID

import structlog
from fastapi import APIRouter, HTTPException, status
from cadwyn import VersionedAPIRouter
from fastapi import HTTPException, Security, status
from sqlalchemy import select

from airflow._shared.timezones import timezone
Expand All @@ -29,14 +30,15 @@
HITLDetailResponse,
UpdateHITLDetailPayload,
)
from airflow.api_fastapi.execution_api.deps import JWTBearerTIPathDep
from airflow.api_fastapi.execution_api.security import ExecutionAPIRoute, require_auth
from airflow.models.hitl import HITLDetail

router = APIRouter(
router = VersionedAPIRouter(
route_class=ExecutionAPIRoute,
dependencies=[
# This checks that the UUID in the url matches the one in the token for us.
JWTBearerTIPathDep
]
# Validates that the JWT sub matches the task_instance_id path parameter.
Security(require_auth, scopes=["ti:self"]),
],
)

log = structlog.get_logger(__name__)
Expand Down
Loading