Skip to content

feat(framework): Allow task token in appio token auth interceptors#7068

Merged
danieljanes merged 4 commits intomainfrom
task-token-interceptor
May 5, 2026
Merged

feat(framework): Allow task token in appio token auth interceptors#7068
danieljanes merged 4 commits intomainfrom
task-token-interceptor

Conversation

@panh99
Copy link
Copy Markdown
Member

@panh99 panh99 commented May 1, 2026

No description provided.

Copilot AI review requested due to automatic review settings May 1, 2026 10:43
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: f07350d730

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread framework/py/flwr/supercore/interceptors/appio_token_interceptor.py Outdated
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Enables AppIo token auth interceptors to accept task tokens (in addition to existing run-bound app tokens) and exposes the authenticated task ID to downstream RPC handlers.

Changes:

  • Extend AppIoTokenServerInterceptor to authenticate via state.get_task_id_by_token(token) when run-token validation fails, and store the resolved task ID in a ContextVar.
  • Tighten AppIoTokenClientInterceptor behavior to reject outbound calls that already include the app-token header (instead of replacing it).
  • Add/adjust unit tests and export get_authenticated_task_id from the interceptors package.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.

File Description
framework/py/flwr/supercore/interceptors/appio_token_interceptor.py Adds task-token auth path, ContextVar-backed task ID accessor, and stricter outbound metadata handling.
framework/py/flwr/supercore/interceptors/appio_token_interceptor_test.py Updates client-interceptor expectations and adds a server-interceptor test asserting task-token auth sets task ID context.
framework/py/flwr/supercore/interceptors/__init__.py Re-exports get_authenticated_task_id.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread framework/py/flwr/supercore/interceptors/appio_token_interceptor.py
Comment thread framework/py/flwr/supercore/interceptors/appio_token_interceptor.py Outdated
Comment thread framework/py/flwr/supercore/interceptors/appio_token_interceptor.py Outdated
Comment thread framework/py/flwr/supercore/interceptors/appio_token_interceptor.py Outdated
@github-actions github-actions Bot added the Maintainer Used to determine what PRs (mainly) come from Flower maintainers. label May 1, 2026
@danieljanes danieljanes enabled auto-merge (squash) May 5, 2026 09:21
@danieljanes danieljanes merged commit ea23c20 into main May 5, 2026
69 checks passed
@danieljanes danieljanes deleted the task-token-interceptor branch May 5, 2026 09:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Maintainer Used to determine what PRs (mainly) come from Flower maintainers. task mechanism

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants