fix(framework): Validate run_id#7020
Conversation
There was a problem hiding this comment.
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 inAppIoTokenServerInterceptor. - Extract
run_idfrom 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.
There was a problem hiding this comment.
💡 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".
…or.py Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…to validate-run-id
…to validate-run-id
…or.py Co-authored-by: Heng Pan <pan@flower.ai>
There was a problem hiding this comment.
💡 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".
No description provided.