Skip to content

Commit f95cb44

Browse files
committed
Drop the token reissue opt-out from the Dag processor session exchange
The opt-out stopped the reissue middleware from re-validating the external workload identity as if it were an Airflow token. The middleware now only renews tokens that Airflow's own JWT check has already validated, and the exchange never runs that check, so the opt-out no longer prevents anything.
1 parent b072d6b commit f95cb44

2 files changed

Lines changed: 0 additions & 4 deletions

File tree

‎airflow-core/src/airflow/api_fastapi/execution_api/app.py‎

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -152,9 +152,6 @@ class JWTReissueMiddleware(BaseHTTPMiddleware):
152152
async def dispatch(self, request: Request, call_next):
153153
response: Response = await call_next(request)
154154

155-
if getattr(request.state, "skip_execution_token_reissue", False):
156-
return response
157-
158155
refreshed_token: str | None = None
159156
token = request.scope.get(_REQUEST_SCOPE_TOKEN_KEY)
160157
if token:

‎airflow-core/src/airflow/api_fastapi/execution_api/routes/session_tokens.py‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,6 @@ async def require_workload_identity(
5151
request: Request,
5252
credentials: Annotated[HTTPAuthorizationCredentials | None, Depends(identity_bearer)],
5353
) -> DagProcessorIdentity:
54-
request.state.skip_execution_token_reissue = True
5554
verifier: DagProcessorIdentityVerifier | None = request.app.state.dag_processor_identity_verifier
5655
if verifier is None:
5756
raise HTTPException(status.HTTP_404_NOT_FOUND, "Workload identity provisioning is not enabled")

0 commit comments

Comments
 (0)