egress: add egress gateway support - atenet-egress - #693
Open
Lior Lieberman (LiorLieberman) wants to merge 2 commits into
Open
egress: add egress gateway support - atenet-egress#693Lior Lieberman (LiorLieberman) wants to merge 2 commits into
Lior Lieberman (LiorLieberman) wants to merge 2 commits into
Conversation
The gateway terminates actor's CONNECT request. It requires downstream mTLS, so only a worker's atunnel can reach it. The gateway consists of an Envoy and an `atenet router --standalone` ext_proc sidecar.
demos/egress is a small Actor that fetches a URL it is given and echoes the upstream status and body back, which makes the egress path observable from outside the sandbox. hack/install-demo-egress.sh registers it as a --deploy-demo-egress fixture and hack/verify-egress-demo.sh drives it and checks the atenet-egress logs for the corresponding authorized CONNECT. TestActorEgress in the networking suite covers the same path automatically: it creates an Actor from the demo template, POSTs a fetch request through atenet-router, and asserts 200. The suite's actor helper is parameterised by template so the ingress test keeps using the counter fixture.
Lior Lieberman (LiorLieberman)
requested review from
Bowei Du (bowei) and
John Howard (howardjohn)
August 2, 2026 03:48
Collaborator
Author
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.
Added pluggable egress PEP support. (Feedback on atenet-egress name is welcomed - will open a separate PR to rename atenet-router to atenet-ingress )
#559 shipped the actor egress data path without any egress gateway. This adds an Envoy deployment that terminates actor CONNECTs. It requires downstream mTLS, so only a worker's atunnel can reach it.
The gateway consists of an Envoy and an
atenet router --standaloneext_proc sidecar.The same ext_proc binary now serves both directions. Direction is decided by
the accepting listener via the xds.listener_name CEL attribute, not by
anything in the request, so an ingress client cannot reach the egress handler
by crafting a CONNECT (and maybe thats not ideal? feedback is welcomed!).
handleEgressRequestHeaderschecks the method,validates the worker-asserted actor identity headers, authenticates them
against the control plane with GetActor, and rejects actors that are not
RUNNING or whose asserted version is stale.
With that change, atelet's Run/Restore requests grow two fields it now
populates on the way down to ateom:
egress_gateway_address, from the new cluster-wide
--egress-gateway-address flag, which the manifests point at
atenet-egress.ate-system.svc:443. This is the value that arms the
nftables REDIRECT; from here actor TCP egress leaves through the gateway
rather than the worker's masquerade.
actor_version, the Actor resource version ate-api observed when it
assigned the worker. atunnel asserts it to the gateway, and the gateway
fails closed when its own GetActor read is older, so a stale control-plane
view cannot authorize egress for an Actor whose assignment has since
moved. atelet rejects Run/Restore without it.