You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix: Capture in-cluster TCP egress in enforce-redirect (keep DNS direct)
enforce-redirect blanket-RETURNed all CLUSTER_CIDRS (default 10.0.0.0/8) egress, so agent->in-cluster TCP (e.g. agent->tool) bypassed the egress pipeline entirely: outbound policy / token-exchange (OBO) never ran for those hops. Only the cooperative HTTP_PROXY path captured them, so any client that ignores HTTP_PROXY escaped enforcement for in-cluster calls.
Narrow the in-cluster RETURN in the nat (TCP) chain to DNS-over-TCP (TCP/53) only: cluster name resolution stays direct while all other in-cluster TCP is REDIRECTed to the transparent listener and seen by the pipeline. The mangle (non-TCP) chain still RETURNs in-cluster CIDRs so DNS-over-UDP and other in-cluster UDP are untouched.
Mesh-agnostic: the proxy's re-originated egress (PROXY_UID, exempt) still falls through to ISTIO_OUTPUT -> ztunnel for transport mTLS under Istio ambient, and goes out plain without a mesh. ztunnel re-captures it because its OUTPUT redirect is mark-gated (! 0x539), not UID-gated.
Validation: structural test (test-enforce-redirect.sh) updated; full cluster validation (Istio ambient mTLS chaining + no-mesh) pending.
Assisted-By: Claude (Anthropic AI) <noreply@anthropic.com>
Signed-off-by: Hai Huang <huang195@gmail.com>
0 commit comments