Validate edge device ID headers#4825
Open
fallintoplace wants to merge 2 commits into
Open
Conversation
Contributor
f275c5d to
8b5f5cc
Compare
YuanTingHsieh
approved these changes
Jun 25, 2026
Collaborator
|
@fallintoplace |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #4825 +/- ##
==========================================
+ Coverage 56.07% 56.26% +0.19%
==========================================
Files 967 967
Lines 91966 91970 +4
==========================================
+ Hits 51571 51751 +180
+ Misses 40395 40219 -176
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Contributor
Author
|
@YuanTingHsieh I have updated both branch. Thank you for your attention. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
X-Flare-Device-IDas the canonical device identity for FEG requests.X-Flare-Device-Infocontains a conflictingdevice_id.Why
The FEG parser creates
DeviceInfofromX-Flare-Device-ID, but then blindly applies fields parsed fromX-Flare-Device-Info. Adevice_idembedded in the metadata header could override the canonical ID used for routing, selection, device tracking, and result attribution. The simulation client already removesdevice_idfrom the metadata header, so treating the standalone ID header as canonical matches the existing client behavior.Testing
.venv/bin/python -m pytest tests/unit_test/edge/web/views/feg_views_test.py -q.venv/bin/python -m black --check nvflare/edge/web/views/feg_views.py tests/unit_test/edge/web/views/feg_views_test.py.venv/bin/python -m isort --check-only nvflare/edge/web/views/feg_views.py tests/unit_test/edge/web/views/feg_views_test.py.venv/bin/python -m flake8 nvflare/edge/web/views/feg_views.py tests/unit_test/edge/web/views/feg_views_test.pysource .venv/bin/activate && ./runtest.sh -s