Skip to content

fix(framework): Validate run_id#7020

Closed
danieljanes wants to merge 24 commits intomainfrom
validate-run-id
Closed

fix(framework): Validate run_id#7020
danieljanes wants to merge 24 commits intomainfrom
validate-run-id

Conversation

@danieljanes
Copy link
Copy Markdown
Member

No description provided.

Copilot AI review requested due to automatic review settings April 21, 2026 02:12
@github-actions github-actions Bot added the Maintainer Used to determine what PRs (mainly) come from Flower maintainers. label Apr 21, 2026
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

This PR enforces run-bound AppIo tokens by validating that request.run_id matches the run associated with the presented token.

Changes:

  • Add a run-binding failure path (PERMISSION_DENIED) and message constant in AppIoTokenServerInterceptor.
  • Extract run_id from protobuf requests (when present) and deny mismatched runs.
  • Extend interceptor tests to cover run-id mismatch denial and align one test request with the new requirement.

Reviewed changes

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

File Description
framework/py/flwr/supercore/interceptors/appio_token_interceptor.py Adds RUN_BINDING_FAILED_MESSAGE, run_id extraction, and run-binding enforcement in the server interceptor.
framework/py/flwr/supercore/interceptors/appio_token_interceptor_test.py Adds a test for run-id mismatch denial and updates a request to include run_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 Outdated
Comment thread framework/py/flwr/supercore/interceptors/appio_token_interceptor.py Outdated
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: 76001271a7

ℹ️ 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
panh99
panh99 previously approved these changes Apr 21, 2026
Copy link
Copy Markdown
Member

@panh99 panh99 left a comment

Choose a reason for hiding this comment

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

LGTM!

Comment thread framework/py/flwr/supercore/interceptors/appio_token_interceptor.py Outdated
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: 8412f77f3a

ℹ️ 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
@danieljanes danieljanes closed this May 9, 2026
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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants