Skip to content

Hybrid: installs require the v2 relay signature (merge after #309 is deployed) - #317

Merged
nambok merged 1 commit into
mainfrom
fix/hybrid-relay-v2-required
Oct 26, 2026
Merged

nambok merged 1 commit into
mainfrom
fix/hybrid-relay-v2-required

Conversation

@nambok

@nambok nambok commented Oct 26, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Merge only after #309 has been deployed and live for a release cycle. Since #309, the hosted relay signs each forwarded event with v2, which also covers the source and event headers. Installs still accept v1 alone so they keep working with an older hosted side. This PR removes that allowance: an install refuses any relayed event without a matching v2.

Changes

  • common/src/hybrid/sign.rs: verify_relay requires v2 (missing: signature_malformed; wrong: signature_mismatch), and the tests sign with sign_relay_routed.
  • gateway/src/routes/hybrid_install.rs: the intake's OpenAPI description says a request without v2 is refused. docs/api/openapi.json is regenerated.
  • docs/self-host/hybrid.md: says so too.

Verification

  • the_route_of_a_relayed_event_is_signed now asserts that a v1-only header is refused.
  • cargo fmt --check, cargo clippy --all-targets -- -D warnings, cargo test (workspace, including the OpenAPI document check).
  • If this is deployed before the hosted side signs v2, installs answer 401 (signature_malformed) to every relayed event. The relay retries a 401 for about 24 hours and then gives up, so events would be lost if the hosted side isn't updated within that time.

Relayed events have carried v2 (which also signs the source and event
headers) since the hosted side's hardening. Installs now refuse an event
without it, so the routing headers can never be changed in transit. Merge
only after that hosted change has been live for a release cycle: an older
hosted side sends v1 alone.
@nambok
nambok merged commit d0b4c0c into main Oct 26, 2026
8 checks passed
@nambok
nambok deleted the fix/hybrid-relay-v2-required branch October 26, 2026 21:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant