Outbound Egress
Technical reference. This page is for integrations, advanced configuration, or platform operations. For portal tasks, start with the user guide.
Runtime outbound HTTP and provider calls are governed at the runtime boundary. The egress filters reject unsafe destinations and response URLs, and audit events carry bounded correlation identifiers rather than raw payloads.
Egress governance applies to plugin HTTP clients, web fetch-style tools, SMTP host checks, MCP discovery, and provider response URLs. It is designed to stop SSRF, DNS rebinding, metadata endpoint access, and accidental leakage of credential-bearing URLs into logs.
ORQESTRA_ALLOWED_ACTION_HOSTS is the primary runtime allowlist for outbound
plugin HTTP calls. When a local or internal service intentionally resolves to an
RFC1918 private IPv4 address, add that hostname to ORQESTRA_PRIVATE_ACTION_HOSTS
as well. Keep the private-host list as a subset of the action-host allowlist.
Metadata, loopback, link-local, reserved, multicast, unspecified, and private
IPv6 destinations are still blocked.
This global ORQESTRA_ALLOWED_ACTION_HOSTS list governs the native workload
path (plugin calls inside an Orqestra-run flow). External-runtime mediated
tool calls are governed instead by the per-profile egress allowlist carried in
the capability token — the certified adapter_artifact.egress_allowlist the
control-plane copies into the signed egress_allowlist claim at mint, which the
gateway enforces as the mediated tool’s allowed_action_hosts. A networked
mediated tool reaching an off-list host fails closed; the global setting does not
widen (or veto) a governance-certified profile’s egress bound. The SSRF floor
(metadata/loopback/private destinations blocked) applies to both paths.
Configuration
| Setting | Purpose |
|---|---|
ORQESTRA_ALLOWED_ACTION_HOSTS | Comma-separated host allowlist for runtime action/plugin HTTP calls. |
ORQESTRA_PRIVATE_ACTION_HOSTS | Subset of allowed hosts that may resolve to private IPv4 addresses. |
ORQESTRA_PLUGIN_AWS_SNS_REGION | Deployment-owned AWS region used for SNS SDK calls. |
ORQESTRA_PLUGIN_S3_ENDPOINT_URL | Deployment-owned S3-compatible endpoint used for SDK calls. |
ORQESTRA_PLUGIN_S3_REGION_NAME | Deployment-owned signing/SDK region for S3 calls. |
Example:
export ORQESTRA_ALLOWED_ACTION_HOSTS="api.stripe.com,hooks.slack.com,internal-api.example.com"
export ORQESTRA_PRIVATE_ACTION_HOSTS="internal-api.example.com"Do not allowlist raw metadata IPs, loopback, link-local, or broad wildcard-style hostnames. The guard still blocks metadata and unsafe address classes even when they appear in an allowlist.
SNS and S3 SDK destinations are deployment authority, not workflow inputs. The
runtime rejects caller-supplied region, endpoint_url, and region_name
values, validates the configured destination before creating an SDK client, and
fails closed when the corresponding deployment setting is absent. Configure the
three plugin settings in the runtime-gateway API and executor environment, and
include their exact hostnames in the applicable action allowlist. S3 also
supports deployment-owned S3-compatible endpoints after the shared URL guard,
exact host allowlist, SSRF, and DNS-host preflights. Botocore still owns the
later socket connection and cannot reuse Orqestra’s DNS-pinned HTTP transport,
so SDK socket pinning remains an outbound-proxy follow-up. SNS binds the
checked regional endpoint explicitly to its SDK client.
Enforcement Layers
| Layer | What it protects |
|---|---|
| Host allowlist | Rejects destinations not declared for runtime action calls. |
| SSRF guard | Rejects private, loopback, link-local, metadata, and unsafe IP forms. |
| DNS-pinning transport | Pins shared HTTP clients to the resolved public IP; SDK-managed SNS/S3 calls use deployment-owned endpoint preflight and explicit SDK binding instead. |
| Redirect re-check | Revalidates redirect targets before following them. |
| Provider URL filtering | Checks provider-returned URLs before they become runtime-visible output. |
| Bounded audit | Records host/outcome/reason without raw request payloads or full URLs. |
Response Budgets
Runtime egress responses are read through immutable, code-owned profiles. Each
profile limits both encoded wire bytes and decoded body bytes before JSON, text,
or protocol parsing. A caller-provided max_response_bytes can only lower the
selected profile ceiling; it cannot replace the registry profile or raise its
limits. Unknown encodings, stacked encodings, invalid declarations, wire
overflow, decoded overflow, and cancellation fail closed with value-free
errors.
Manually handled redirects are checked against the allowlist and SSRF policy,
then their response streams are closed without reading or materializing the
redirect body. The next Location is checked again before a request is made.
Only the final application response is exposed to the caller.
follow_redirects=True is rejected at the shared client before HTTPX is
invoked. Runtime callers must make each hop with follow_redirects=False and
discard_redirect_body=True, so every target and response remains under the
same guard.
MCP tools/resources discovery also enforces the frozen shape limits: names are
at most 128 UTF-8 bytes, descriptions 4 KiB, and each input schema or metadata
item 64 KiB. Each list has at most 256 items; the complete list may use the
mcp_catalog response profile (512 KiB encoded wire / 1 MiB decoded aggregate).
The complete response is validated before projection; one malformed item
rejects the response rather than accepting a prefix.
Portal API proxy logs intentionally avoid full upstream URLs. Logs include the incoming path and the upstream path only; query parameters are forwarded to the control plane but are not written to structured logs.
Correlation Fields
Use these bounded IDs for cross-service joins:
x-request-idtraceparentx-orqestra-workspace-idx-orqestra-workload-idx-orqestra-execution-idx-orqestra-release-id
Audit Event
Outbound HTTP decisions are recorded as
v1.infrastructure.egress_http_request. The event is intentionally bounded:
operators can join it to execution, workload, workspace, and release context
without exposing request bodies, secret values, or full URLs.
Common outcomes include:
| Outcome | Meaning |
|---|---|
allowed | Destination passed allowlist and SSRF checks. |
blocked | Destination failed allowlist, IP, redirect, or URL filter checks. |
transport_error | The guarded transport failed while making the request. |
Provider Accounting
Provider calls route through governed provider transport. If provider usage has already been burned and a response URL is blocked after the provider returns, runtime-gateway commits burned usage instead of releasing the reservation. This keeps TPM and cost accounting aligned with provider-side spend.
Operator Workflow
When a tenant reports blocked outbound access:
- Check control-plane governance events for
v1.infrastructure.egress_http_requestwith the workload or execution ID. - Confirm the event
outcomeand boundedreason. - Review the workload’s allowed host policy and release binding.
- Add or update the allowlist only through the governed release path.
- Re-run the affected workflow and verify a new allowed egress event appears.
Use the resilience runbook for incident triage:
docs/resilience/outbound-egress-runbook.md.
Troubleshooting
| Symptom | Likely cause | Fix |
|---|---|---|
egress_guard: host not in allowlist | Host missing from ORQESTRA_ALLOWED_ACTION_HOSTS | Add the exact hostname through the governed config path. |
egress_guard: Private IP | Host resolves to private IP | Add host to ORQESTRA_PRIVATE_ACTION_HOSTS only if intentional. |
| Metadata endpoint blocked | Destination is cloud metadata or link-local | Do not bypass. Use cloud identity APIs through supported SDKs. |
| Redirect blocked after first request | Redirect target is unsafe | Fix upstream redirect or allow the final public hostname. |
| Provider response filtered | Provider returned unsafe URL content | Treat as provider/output risk and inspect release policy. |