Skip to content

Materialize gateway mediation for private resources - #13

Merged
vitramir merged 2 commits into
mainfrom
egress-rule-private-destinations
Aug 15, 2026
Merged

Materialize gateway mediation for private resources#13
vitramir merged 2 commits into
mainfrom
egress-rule-private-destinations

Conversation

@vitramir

Copy link
Copy Markdown
Contributor

A private resource named by an egress rule moves onto the egress gateway; this service owns every write that makes that true.

  • mediation column on private_resources, derived from whether any rule names the resource. SetPrivateResourceMediation (internal, called by the EgressRules service on a resource's first rule and last) rebinds the front service between network-resources-<network> and egress-services, swaps its host.v1 to the forwarding shape, and maintains one private-<id>-upstream-<intercept_port> service per intercept port — each naming its paired target port statically, so choosing the service is what applies the port mapping — plus a single gateway dial policy selecting the shared private-resource-upstreams-<id> attribute.
  • Reconciliation re-derives desired mediation per organization from EgressRules.ListMediatedPrivateResources, repairs half-applied flips, and protects in-flight upstream objects from the orphan sweeps by name.
  • DeletePrivateResource and a protocol change to tcp are refused while rules name the resource, listing them.
  • CreatePrivateResourceAccess for agent and environment principals fast-fails when a public rule already intercepts the resource's hostname for that principal (best-effort, expanded through the agent's environment; EgressRules.ListAttachedRuleDomains).
  • ListPrivateResourcesReachableBy (internal) expands grants through the principal's groups (ListMemberGroupsBatch) and, for an agent, its environment, and reports the grants behind each resource for collision reports.
  • private_resource.updated is additionally published to the flat private_resources room for the egress gateway's cache invalidation.
  • GetPrivateResource treats a caller without identity metadata as mesh-internal (the EgressRules service validating and denormalizing rule targets); identified callers keep the membership check.

Part of egress rules address private resources; protocol change in agynio/api#193.

@vitramir
vitramir merged commit 86a3bcc into main Aug 15, 2026
1 check passed
@vitramir
vitramir deleted the egress-rule-private-destinations branch August 15, 2026 16:56
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