jason810496 commented on code in PR #60412:
URL: https://github.com/apache/airflow/pull/60412#discussion_r2683214193
##########
airflow-core/src/airflow/api_fastapi/core_api/routes/public/log.py:
##########
@@ -170,7 +170,7 @@ def get_log(
@task_instances_log_router.get(
"/{task_id}/externalLogUrl/{try_number}",
responses=create_openapi_http_exception_doc([status.HTTP_400_BAD_REQUEST,
status.HTTP_404_NOT_FOUND]),
- dependencies=[Depends(requires_access_dag("GET",
DagAccessEntity.TASK_INSTANCE))],
+ dependencies=[Depends(requires_access_dag("GET",
DagAccessEntity.TASK_LOGS))],
Review Comment:
```suggestion
dependencies=[
Depends(requires_access_dag("GET", DagAccessEntity.TASK_LOGS)),
Depends(requires_access_dag("GET", DagAccessEntity.TASK_INSTANCE))
],
```
Instead of removing authorization for `TASK_INSTANCE`, it would be better to
add the authorization for `TASK_LOGS`. Since we will retrieve TaskInstance in
the route.
https://github.com/apache/airflow/blob/26a9d3b81b1d514ac00476885ba29676cd8f27e6/airflow-core/src/airflow/api_fastapi/core_api/routes/public/log.py#L189-L200
--
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]