mirror of
https://github.com/agent-substrate/substrate.git
synced 2026-11-12 10:35:06 +08:00
The router used to rewrite :authority to the actor's worker pod IP and let the dynamic_forward_proxy cluster resolve it, reaching the actor over plaintext pod-IP:80. The worker no longer DNATs pod-IP:80 to the actor, so that path is gone. Instead the ext_proc resolves the actor to its worker's atunnel ingress address (IP:443) and puts it in x-ate-original-dst. An ORIGINAL_DST cluster dials exactly that address, which leaves the request Host as the actor DNS name -- atunnel needs it to authorize the active actor. The header is set with OVERWRITE_IF_EXISTS_OR_ADD so a client-supplied value can never influence the address Envoy dials. The upstream hop is mTLS: the cluster presents the router's podidentity credential bundle as its client cert and validates the atunnel server against the podidentity trust bundle. Validation matches the SPIFFE URI SAN prefix rather than the dialed pod IP, because the atunnel cert carries only a spiffe:// URI SAN and Envoy's default SAN check against an ephemeral pod IP would never match. atunnel in turn only accepts spiffe://cluster.local/ns/ate-system/sa/atenet-router. The dynamic_forward_proxy cluster, HTTP filter and DNS cache config are removed along with the :authority rewrite.