Materialize gateway mediation for private resources - #13
Merged
Conversation
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.
A private resource named by an egress rule moves onto the egress gateway; this service owns every write that makes that true.
mediationcolumn 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 betweennetwork-resources-<network>andegress-services, swaps itshost.v1to the forwarding shape, and maintains oneprivate-<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 sharedprivate-resource-upstreams-<id>attribute.EgressRules.ListMediatedPrivateResources, repairs half-applied flips, and protects in-flight upstream objects from the orphan sweeps by name.DeletePrivateResourceand a protocol change totcpare refused while rules name the resource, listing them.CreatePrivateResourceAccessfor 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.updatedis additionally published to the flatprivate_resourcesroom for the egress gateway's cache invalidation.GetPrivateResourcetreats 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.