Lee-W commented on code in PR #66505:
URL: https://github.com/apache/airflow/pull/66505#discussion_r3257356853
##########
airflow-core/tests/unit/api_fastapi/core_api/test_app.py:
##########
@@ -116,3 +116,33 @@ def test_gzip_middleware_should_not_be_chunked(self,
test_client) -> None:
# Ensure we do not reintroduce Transfer-Encoding: chunked
assert "transfer-encoding" not in headers
+
+
+class TestRouterLevelDefaultDeny:
+ """
+ Authentication is enforced as a router-level default on the routers that
+ serve user-facing endpoints. A future route added under one of these
+ routers cannot accidentally be added without an auth dependency — the
+ router-level Depends(get_user) is the defense-in-depth backstop.
+ """
+
+ def test_authenticated_router_carries_get_user_dependency(self):
+ from airflow.api_fastapi.core_api.routes.public import
authenticated_router
Review Comment:
let's move these imports to top
--
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]