Skip to content

fix(framework): Fail trusted entity verification when SuperLink doesn't have app validation support#6811

Merged
danieljanes merged 6 commits intomainfrom
supernode-fail-closed-trusted-entities
Mar 23, 2026
Merged

fix(framework): Fail trusted entity verification when SuperLink doesn't have app validation support#6811
danieljanes merged 6 commits intomainfrom
supernode-fail-closed-trusted-entities

Conversation

@mohammadnaseri
Copy link
Member

When trusted_entities is configured on a SuperNode, app verification now fails if the connected SuperLink does not return validation metadata. Previously, the SuperNode only logged a warning and continued, with this change it rejects the FAB instead, so trusted-entity verification behaves consistently across SuperLinks that do and do not support app validation.

Copilot AI review requested due to automatic review settings March 22, 2026 18:29
@github-actions github-actions bot added the Maintainer Used to determine what PRs (mainly) come from Flower maintainers. label Mar 22, 2026
Copy link
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 makes trusted-entity verification on the SuperNode fail closed when the connected SuperLink does not provide app validation metadata, ensuring consistent enforcement of trusted_entities across SuperLink variants.

Changes:

  • Update SuperNode FAB handling to reject FABs (and generate an error reply) when trusted_entities is configured but validation metadata is missing.
  • Add unit tests covering rejection when verification metadata is missing and when FAB signature verification fails.

Reviewed changes

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

File Description
framework/py/flwr/supernode/start_client_internal.py Changes _pull_and_store_message to treat missing app validation metadata as a hard failure when trusted_entities is set.
framework/py/flwr/supernode/start_client_internal_test.py Adds tests to assert fail-closed behavior for missing metadata and invalid FAB verification.

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

@msheller
Copy link
Member

LGTM, but I have a few items for cleaning up in the future:

  • a single failure code path is preferred to prevent future bugs
  • "magic strings" are risky in security checks. Ideally, these are clean enums/constants (again, helps with future bugs and with review because it builds the mental model)

@danieljanes danieljanes enabled auto-merge (squash) March 23, 2026 21:34
@danieljanes danieljanes merged commit bd9c898 into main Mar 23, 2026
70 checks passed
@danieljanes danieljanes deleted the supernode-fail-closed-trusted-entities branch March 23, 2026 21:42
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.

4 participants