airflow.providers.fab.auth_manager.middleware¶
Classes¶
Attach an anonymous user to unauthenticated requests when public access is enabled. |
Module Contents¶
- class airflow.providers.fab.auth_manager.middleware.FabAuthRolePublicMiddleware(app, dispatch=None)[source]¶
Bases:
starlette.middleware.base.BaseHTTPMiddlewareAttach an anonymous user to unauthenticated requests when public access is enabled.
When
[fab] auth_role_public(or the legacyAUTH_ROLE_PUBLICentry inwebserver_config.py) is set, requests that do not carry any authentication token get a pre-populatedAnonymousUserassigned torequest.state.user. The FastAPIget_userdependency picks it up before attempting JWT validation, which would otherwise reject the request with 401.