Short · Cloud security · 17 min read
How Do You Verify That Cloud Workloads Cannot Bypass an Outbound Proxy?
Verify outbound proxy enforcement by testing whether representative workloads can establish fresh connections to controlled external destinations without using the proxy, while independently confirming that permitted proxy traffic succeeds. Cover every supported address family, relevant transport, execution environment and approved exception. Then repeat the decisive tests when the proxy is unavailable. A proxy setting, an egress diagram or a quiet access log does not establish that the network prevents another path.
The defensible conclusion is bounded: these workloads, under these configurations and failure conditions, could not use the tested unauthorized paths. It is not a permanent guarantee that every future deployment is unable to communicate externally. The evidence must identify the boundary that denied each attempt and the changes that would invalidate that evidence.
This paper develops an original verification method from twelve authoritative works: network and security guidance, protocol specifications and official implementation documentation. It is a technical synthesis, not an empirical study. The scope is mandatory outbound path enforcement for application workloads. Whether a permitted destination may receive particular data is a separate decision, examined in private endpoints and cloud data exfiltration.
Define the promise before testing the machinery
“Everything goes through the proxy” can mean several incompatible things. Applications may receive a standard environment variable. Their sidecars may normally intercept HTTP traffic. A subnet may route internet destinations through an appliance. A firewall may restrict direct connections while permitting approved exceptions. Only the last two descriptions begin to specify a network restriction, and neither is complete without identifying the affected traffic and alternate routes.
I would write the claim in terms of a source population, destination classes, protocols and enforcement conditions. For example: production application pods may reach approved external HTTPS services only through the designated gateway; infrastructure DNS and named private dependencies use separately controlled paths. This statement permits necessary dependencies without disguising them as proxy traffic. It also gives reviewers an explicit list of exceptions to examine.
Specify the adversary's authority. This paper assumes an application process can choose its network client and attempt connections but cannot alter the independent network controls. A process with host administration, cluster policy administration or cloud networking privileges presents a broader problem. A successful test from an ordinary pod does not establish resistance to an administrator who can create a new route or change which policies select that pod.
The distinction follows a general architectural principle: enforcement must occur at a component that controls the communication path. NIST describes the policy enforcement point as responsible for enabling, monitoring and terminating connections between a subject and a resource (Rose et al., 2020, Section 3). Applying that principle here means locating the actual decision point, not treating an application convention as equivalent to an independently enforced boundary.
Proxy configuration establishes intention, not confinement
Client settings are useful for directing ordinary application behavior. They also reveal why configuration evidence is insufficient. Curl supports proxy environment variables and explicit proxy exclusions through NO_PROXY; its documentation also describes a command-line exclusion mechanism (curl project, n.d.). An application that intentionally chooses a direct connection can therefore behave differently from the health check that inherited the expected environment.
The relevant control question is not whether exclusions exist. Internal services may need them. It is whether a direct attempt outside the approved exceptions succeeds. A failed proxied request followed by a successful direct request would reveal an unintended alternate path. Conversely, a direct attempt that is blocked while the equivalent proxied request succeeds provides evidence of a restriction, provided the failure is attributable to that restriction.
Avoid assuming that the runtime used for testing represents the runtime used in production. A diagnostic container, background worker, build runner and application container may have different network placement or policy selection. The application image may also contain libraries with different proxy support. Test selection should follow execution environments and effective access, rather than the number of libraries in the dependency inventory.
This is why distributing a common proxy configuration remains worthwhile but does not close the acceptance question. It makes authorized behavior predictable and reduces accidental failures. Network enforcement then constrains behavior when the application ignores that configuration. The two controls have complementary purposes, and the verification record should preserve the distinction rather than credit one with the properties of both.
Put service-mesh steering inside a wider enforcement boundary
Istio's security guidance explicitly describes REGISTRY_ONLY as a best-effort mechanism rather than a strong security boundary. It recommends an egress gateway combined with network policy when outbound traffic must traverse a proxy (Istio Authors, n.d.-b). That is a particularly useful correction to a common architectural inference: declaring external services in a registry does not prove that a compromised client cannot communicate outside it.
The sidecar egress-gateway task makes the responsibility clearer. Istio can arrange the desired path through its sidecars, but mechanisms outside that traffic steering must prevent workloads from reaching external services directly. Its examples include network policies and external firewall or network arrangements (Istio Authors, n.d.-a, “Additional security considerations”). The retrieved task was presented under Istio 1.31.3; installed versions and deployment modes require their own review.
I would therefore examine two boundaries separately. First, can the workload reach only the gateway and its explicit supporting dependencies? Second, does the gateway allow only the intended external connections? Restricting the workload without constraining the gateway creates a mandatory but permissive relay. Constraining the gateway without restricting the workload leaves a possible route around the decision point.
Gateway administration belongs in the threat model. If application owners can change gateway selectors, attach permissive networking or deploy a substitute relay in an allowed location, the effective boundary may differ from the diagram. The assessment should identify who controls each relevant object and which changes receive independent review. This does not require asserting that all application administrators are adversaries; it requires describing what the security claim assumes they cannot do.
Evaluate effective permissions, not the most restrictive-looking rule
Kubernetes NetworkPolicy requires a network plugin that implements enforcement. Policies are additive: an additional policy can permit traffic even when another policy appears narrowly restrictive. The documentation also leaves hostNetwork treatment dependent on the implementation and describes existing-connection behavior after policy changes as implementation-defined (Kubernetes Authors, n.d.). Creating a restrictive policy object is consequently only one part of establishing the effective restriction.
For each test source, record its namespace and relevant labels, the policies that select it, the network plugin and version, and whether it uses the pod or host network. Review the union of applicable allowances. A broad namespace exception may be more consequential than an error in the carefully reviewed gateway policy. A deployment label change can move a workload into a different policy population without modifying the policy itself.
AWS security groups illustrate the same review problem in another system. They contain allow rules; permissions from multiple attached groups are aggregated. New groups initially include an outbound allowance, and some effects of rule changes depend on connection tracking. The documentation also identifies a specific limitation on blocking traffic to the Route 53 Resolver using security groups (Amazon Web Services, n.d.-b). These are provider-specific mechanics, not universal firewall behavior.
The practical implication is to capture the complete effective permission set for the tested interface. A screenshot of the intended restrictive group is insufficient if another attached group permits broad egress. Record resolver exceptions separately rather than claiming that an empty ordinary outbound rule list proves every packet is blocked. Reviewers need to see both the rule intended to constrain traffic and other rules or platform behaviors that might defeat that intention.
Follow routes before attributing a block to the proxy design
AWS documents longest-prefix matching and independent IPv4 and IPv6 route selection (Amazon Web Services, n.d.-a). A default route is therefore not a complete statement about where every destination goes. More-specific routes can direct particular destination ranges elsewhere. Whether that creates unauthorized egress depends on the subsequent path and its permissions; the existence of a different next hop alone does not establish a working bypass.
Build a path inventory from source interfaces outward. Include routes to the proxy, ordinary internet destinations, private services, connected networks and any other allowed relay. Ask whether a privately reached system can forward traffic onward. If it can, assess that onward function as a distinct destination and authority, rather than assuming that “private” means the communication cannot leave the intended boundary.
An explicit proxy also changes what needs to be routed. The workload connects to the proxy, which establishes another connection toward the destination. A transparent appliance may instead intercept traffic already addressed to that destination. Their evidence requirements differ. A route pointing toward an appliance may establish intended traversal; it does not show which application rule evaluated a request or whether the appliance was operating in the expected mode.
Routing evidence and enforcement evidence should meet at the same test case. Record which interface and route were relevant to the direct attempt, which rule governed the resulting traffic, and what the receiver observed. If a connection fails because the destination has no return route, that is not evidence that the intended outbound policy rejected it. The distinction matters when a later routing repair silently removes the accidental restriction.
Separate proxy traversal from application inspection
Azure Firewall documents terminating rule processing and an order in which network rules are processed before application rules, regardless of collection priority and policy inheritance (Microsoft, 2026). A matching network allowance can therefore mean that the expected application rule is never evaluated. This is a specific product behavior that should be checked against the deployed policy, not generalized to every firewall brand.
This creates a second kind of bypass: the connection traverses the designated appliance but avoids the intended application decision. Test records should distinguish an alternate network path from a different rule path through the approved device. Both can invalidate the promised control, but the repairs differ. One needs routing or network restrictions; the other needs correct policy composition and evidence that the relevant rule actually evaluated the connection.
HTTP CONNECT introduces another boundary. RFC 9110 defines a successful CONNECT tunnel in terms of forwarding data between its endpoints; the tunnel may carry an end-to-end TLS connection (Fielding et al., 2022, Section 9.3.6). Traversing a CONNECT proxy does not by itself establish that encrypted application content was inspected. If content inspection is part of the requirement, its termination, trust and verification arrangements need separate evidence.
Be precise about the accepted statement. “Only approved proxy paths were usable” is different from “only approved domains were reachable,” which is different again from “only approved data transfers were possible.” The last claim requires application and recipient authorization as well as transport controls. A rigorous assessment can establish one of these properties while explicitly leaving the others outside scope, rather than inflating a network result into a data-protection guarantee.
Cover the transports that the application could actually use
QUIC is a UDP-based transport, not a TCP connection with a different application label (Iyengar & Thomson, 2021). A test program that exercises only TCP cannot establish that relevant UDP paths are blocked. The assessment should identify whether UDP egress is permitted and whether any permitted UDP application has an authorized purpose. It should not label all UDP as malicious or assume every web workload necessarily uses QUIC.
Address-family coverage is similarly explicit. If an application can obtain or use IPv6 connectivity, a successful IPv4-only restriction is incomplete. Test the supported families separately, including whether the destination and source are genuinely configured for the attempted family. An IPv6 failure caused by an absent source address proves nothing about an IPv6 firewall rule. Unsupported families should be recorded as unavailable, with the configuration evidence supporting that finding.
DNS policy requires careful wording. DNS over HTTPS carries DNS queries and responses within HTTPS exchanges (Hoffman & McManus, 2018). Restricting ordinary DNS traffic therefore does not independently establish that a workload cannot resolve names by another permitted HTTPS path. Conversely, permitting an approved encrypted resolver is not necessarily a proxy bypass. The question is whether that permitted service contradicts the defined resolver or destination-control requirement.
Keep transport testing tied to a realistic access inventory. Enumerating every theoretical covert channel would make the exercise unbounded. Ignoring a supported transport would make it misleading. The reasonable boundary is an explicit list of enabled communication mechanisms and exceptions, supported by configuration inspection, with additional cases added when new capabilities or incidents expose a gap. This is a coverage argument, not a claim that an arbitrary number of probes proves universal isolation.
Design a test that can distinguish denial from malfunction
A useful test requires an authorized source and a destination controlled by the organization or its assessment provider. Use synthetic request identifiers and nonsensitive content. The receiver should be able to record whether a particular request arrived. It should not depend on customer data, third-party endpoints that prohibit testing, or an actual attacker's infrastructure to demonstrate a boundary.
Begin with a positive control through the approved proxy. Confirm that the intended destination is available, the application request is valid, and the proxy records the expected policy decision. Where appropriate, separately establish the receiver's availability from an authorized reference environment. The reference environment's success is not evidence about production egress; it rules out a broken destination as the explanation for a later negative result.
Then make the corresponding direct attempt from the representative workload environment. Keep the relevant application request and destination comparable while changing the path. Preserve destination identity when testing TLS so that a certificate-name mismatch is not misreported as a network block. The objective is to isolate the control being tested, not produce an error message by any available means.
Classify outcomes as permitted, denied with attributable evidence, or indeterminate. A timeout without supporting observations is indeterminate. A deny event tied to the source and test destination is stronger evidence, but still needs the configuration context. A receiver observation without a proxy observation may indicate bypass, missing proxy telemetry or a mistaken correlation. Investigate the alternatives before concluding which control failed.
I propose identifying each case by seven fields: execution environment, address family, transport, destination class, intended path, policy version and failure state. These fields define which claim a result can support. Two tests that differ in a field relevant to enforcement should not be merged simply because both received the same application error. This proposed model organizes evidence; it is not a statistical assurance formula.
Make telemetry disagreements explainable
The source identity seen by a network device may not be the identity seen by the application or destination. Address translation, shared gateways and pooled connections can collapse many workloads into one apparent source. Consequently, a receiver log showing the organization's public address does not identify which internal process sent the request. Correlation should preserve a synthetic application marker where feasible and the mapping between internal source, gateway and external observation.
Time alignment matters, but matching timestamps alone is weak evidence on a busy shared system. Record the test window, destination, transport and unique marker, together with the relevant connection mapping where available. If the proxy cannot observe the marker inside an encrypted tunnel, do not require it to report information it cannot see. Correlate the tunnel's connection evidence with the marker observed at the controlled receiver and document the remaining attribution uncertainty.
Missing evidence deserves its own diagnostic branch. If an expected proxy record is absent, check whether the relevant logging policy was active and whether collection delivered comparable records during the same window. A positive control can expose a broken collection path: when even the known proxied request is absent, silence about the direct attempt cannot distinguish bypass from telemetry failure. Avoid treating an observability defect as either a security success or a proven network escape.
Gateway health checks should also be interpreted narrowly. A process can be running while its active policy differs from the intended policy, or while the service it depends on is unavailable. Record the policy version actually loaded and the result of the representative application request. This proposed acceptance step prevents a successful infrastructure health probe from standing in for a decision made by the required enforcement rule.
Finally, define how uncertainty affects release. An unresolved correlation gap need not mean the entire architecture is unusable, but it prevents a confident claim for that case. Either improve the evidence, constrain the affected population, or have the accountable owner explicitly accept the unresolved condition. Relabeling the case as a pass because the surrounding cases succeeded destroys the value of the test record.
Test failure behavior and old connections separately
A proxy outage is particularly revealing because availability mechanisms can introduce alternate behavior. In a controlled, approved exercise, make the proxy unavailable to the selected test workload and repeat both ordinary and direct attempts. The expected result should follow the written policy: fail closed, use another equally controlled proxy, or enter an explicitly authorized exception. Do not infer that the preferred behavior occurred merely because the application reported an outage.
A redundant gateway is not automatically an exception. It can be part of the same approved path if its identity, rule set and evidence meet the requirement. A fallback directly to the destination is different. It should have a named owner, purpose, permitted population, expiry and compensating restrictions. An undocumented fallback cannot simultaneously provide availability and support a claim that all external traffic always traverses the proxy.
Existing connections need separate treatment. Establish whether the acceptance criterion concerns new connection admission, termination of existing sessions, or both. Kubernetes explicitly leaves aspects of existing-connection handling to the network implementation after policy changes (Kubernetes Authors, n.d.). Test fresh connections when validating admission; test pre-existing sessions separately when termination is required. Neither result can substitute for the other.
NIST's firewall guidance treats testing and deployment as distinct implementation stages and calls for integrating changes with configuration management (Scarfone & Hoffman, 2009, Sections 5.3–5.4). For this assessment, that means using a bounded test population and an agreed restoration procedure. It also means verifying the restored policy after an exercise. A test that temporarily weakens a boundary must not leave its temporary configuration as the undocumented production state.
A worked example: three failures behind one reassuring diagram
Consider fictional Alder Finance, whose payment-reporting workers are meant to reach an external reporting service through a shared proxy. No customer case or observed performance is implied. The initial architecture review finds an approved proxy setting, an IPv4 default route toward the security appliance and successful proxy access logs. Those facts establish normal operation, but not mandatory traversal.
The team defines four representative environments: application pods, scheduled-job pods, host-network maintenance tools and the build runner. It discovers that only the application pods are selected by the narrow egress policy. A controlled direct attempt from a scheduled job reaches the test receiver. The relevant defect is coverage of the source population, not a defective proxy rule. Repairing the application's proxy settings would not resolve it.
A second case reaches the security appliance but is permitted by a broad network rule before the intended application restriction. This is an application-policy bypass within the designated path. The team removes the unnecessary allowance through normal change control and confirms that the same synthetic destination is now evaluated under the intended policy. It retains the earlier result as failure evidence instead of overwriting it with a successful retest.
The third apparent failure is less conclusive. An IPv6 attempt times out, and someone proposes marking it blocked. Inspection shows that the test source lacked usable IPv6 connectivity. The team records the case as untested for an enabled IPv6 population and establishes whether production actually has such a population. It does not convert missing test capability into evidence that IPv6 restrictions work.
Alder's eventual acceptance is narrower and more useful than its original diagram. It names the covered execution environments, the active configuration, the controls responsible for direct-access denial and the separate approval for maintenance traffic. Proxy-failure behavior and existing-session requirements have their own results. The evidence can now guide a change review because reviewers know exactly which assumptions a new runtime or rule would invalidate.
Turn the evidence into a maintained decision
A release decision should separate three questions. Is ordinary approved traffic functional? Are the tested unauthorized paths denied by the intended controls? Are remaining exceptions acceptable for the business task? These questions can have different answers. A perfectly restrictive network that prevents a required dependency from working is not operationally ready; a functional application with undocumented direct access is not ready under a mandatory-proxy policy.
Keep a concise evidence bundle: source selection, effective routes and permissions, gateway configuration, test identifiers, relevant timestamps, receiver observations, enforcement events, interpretation and unresolved cases. Retain only the necessary diagnostic content and restrict access to internal topology. Request identifiers should not encode credentials, customer records or confidential transaction data. Evidence collection itself should not become a second sensitive-data distribution channel.
Changes should trigger targeted retesting when they alter a relevant field in the coverage model. Examples include new execution environments, namespace selectors, attached security groups, routes, gateway rules, address-family enablement and permitted transports. An unchanged application release may not require repeating every case; an infrastructure change that expands egress can require review even when no application code changed. The trigger should follow effective access, not team ownership.
There is a reasonable counterargument that mandatory proxies increase complexity and create availability dependencies. Some workloads need protocols or services that the chosen proxy cannot support. The response is to select a different enforceable architecture or document narrow exceptions, rather than pretend universal proxying is the only defensible design. The business requirement may be controlled egress, for which several architectures can provide appropriate evidence.
The method also has limits. Configuration inspection can miss undocumented paths, and tests sample particular states rather than prove every possible execution. Provider documents describe intended mechanics, not the actual deployment. A compromised administrator may invalidate the threat assumptions. These limits should constrain the acceptance statement and the review interval; they should not be hidden behind a percentage derived from counting successful probes.
The useful result is an enforceable, testable claim about outbound access, accompanied by a clear account of its exceptions. If your team cannot identify which workloads can send traffic directly, a cloud egress assessment can map the effective paths, design controlled verification, and produce a prioritized remediation and exception plan. The deliverable is a decision about the boundary you can defend, with evidence that makes the next change review easier.
References
- Amazon Web Services. (n.d.-a). How route priority works. Amazon Virtual Private Cloud User Guide. Retrieved October 29, 2026, from https://docs.aws.amazon.com/vpc/latest/userguide/route-tables-priority.html
- Amazon Web Services. (n.d.-b). Security group rules. Amazon Virtual Private Cloud User Guide. Retrieved October 29, 2026, from https://docs.aws.amazon.com/vpc/latest/userguide/security-group-rules.html
- curl project. (n.d.). Proxy environment variables. Everything curl. Retrieved October 29, 2026, from https://everything.curl.dev/usingcurl/proxies/env.html
- Fielding, R., Nottingham, M., & Reschke, J. (Eds.). (2022). HTTP semantics (RFC 9110). Internet Engineering Task Force. https://www.rfc-editor.org/rfc/rfc9110
- Hoffman, P., & McManus, P. (2018). DNS queries over HTTPS (DoH) (RFC 8484). Internet Engineering Task Force. https://www.rfc-editor.org/rfc/rfc8484
- Istio Authors. (n.d.-a). Egress gateways. Retrieved October 29, 2026, from https://istio.io/latest/docs/tasks/traffic-management/egress/egress-gateway/
- Istio Authors. (n.d.-b). Security best practices. Retrieved October 29, 2026, from https://istio.io/latest/docs/ops/best-practices/security/
- Iyengar, J., & Thomson, M. (Eds.). (2021). QUIC: A UDP-based multiplexed and secure transport (RFC 9000). Internet Engineering Task Force. https://www.rfc-editor.org/rfc/rfc9000
- Kubernetes Authors. (n.d.). Network policies. Retrieved October 29, 2026, from https://kubernetes.io/docs/concepts/services-networking/network-policies/
- Microsoft. (2026, April 2). Configure Azure Firewall rules. Microsoft Learn. https://learn.microsoft.com/en-us/azure/firewall/rule-processing
- Rose, S., Borchert, O., Mitchell, S., & Connelly, S. (2020). Zero trust architecture (NIST SP 800-207). National Institute of Standards and Technology. https://doi.org/10.6028/NIST.SP.800-207
- Scarfone, K., & Hoffman, P. (2009). Guidelines on firewalls and firewall policy (NIST SP 800-41 Rev. 1). National Institute of Standards and Technology. https://doi.org/10.6028/NIST.SP.800-41r1