Skip to content

fix(event): trust only meshed backend LMS issuers on callback routes - #866

Draft
ron96g wants to merge 1 commit into
mainfrom
agents/optimize-trustedissuers-callback-routes
Draft

ron96g wants to merge 1 commit into
mainfrom
agents/optimize-trustedissuers-callback-routes

Conversation

@ron96g

@ron96g ron96g commented Nov 16, 2026

Copy link
Copy Markdown
Member

What

Callback route trust

  • A primary callback Route now trusts its zone's own issuer plus the LMS issuers of non-proxy zones whose mesh includes this zone.
  • gateway is added as a consumer only when at least one such zone exists.

Callback Consumer status

  • The callback gateway Consumer is now recorded in the new status.callbackConsumer field on EventConfig (CRD regenerated).

Why

Callback primaries trusted the LMS issuer of every peer whose mesh includes the zone, including proxy zones. Proxy zones run no Horizon and own no outbound callback Routes. Every advertised callback URL points at a local backend's gateway, so a proxy zone's LMS token never reaches a callback primary. Trusting those issuers only widened the set of accepted tokens.

In the playground, the issuers of the proxy zones space, canis and hu-it-onprem (all targeting aws) drop out of the callback routes.

The Consumer status reference fixes a 08-child-refs-in-status finding from the code-auditor: the Consumer was the only owned child not referenced in status.

Reviewer notes

  • Voyager routes are unchanged. Proxy zones do forward Voyager traffic, so their LMS issuers are still trusted there.
  • .agents/auditignore gains one entry for a confirmed false positive. The issuer list is sorted and deduplicated in Options.applySecurity before it's stored on the Route.
  • Docs updated in docs/docs/architecture/event.mdx.

Tests

  • New cases in callback_routes_test.go:
    • A meshed backend and a proxy zone both point at the subscriber: only the backend's LMS issuer is trusted.
    • Only a proxy zone points at the subscriber: no LMS issuer and no gateway consumer.
  • Both cases fail against the old logic.
  • callback_lifecycle_test.go now checks status.callbackConsumer, including after the client ID is replaced.
  • make test and make lint pass in event/. The code-auditor (staged scope) reports no findings at or above HIGH.

Callback primaries trusted the LMS issuers of every peer whose mesh includes the zone, including proxy zones. Proxy zones run no Horizon and own no outbound callback Routes, so their LMS tokens never reach a callback primary. Trust is now limited to non-proxy zones whose mesh includes this zone.

Also record the callback gateway Consumer in status.callbackConsumer so every owned child is referenced from the EventConfig status.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@ron96g ron96g self-assigned this Nov 16, 2026

This branch has not been deployed

No deployments
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