Architecture
Outbound callout security
Praxis AI treats an outbound target, its resolved socket addresses, and the credentials attached to the request as one trust decision.
On this page
Praxis AI treats an outbound target, its resolved socket addresses, and the credentials attached to the request as one trust decision. Operator-configured HTTP targets are public-only by default. Each request resolves its target once, checks every returned address immediately before connecting, and hands those same addresses to the transport. One private, loopback, link-local, or other non-public result rejects the whole callout.
Private targets need an explicit opt-in on the filter. Direct callouts disable HTTP proxies and redirect following. URL userinfo is rejected, and forwarded or configured credentials stay bound to the validated target origin.
A private-target opt-in allows loopback, private, shared-address-space, link-local, and other special-use destinations. It never allows recognized cloud metadata endpoints, unspecified addresses, or multicast addresses. IPv4-mapped IPv6 and well-known-prefix NAT64 forms get the same verdict as their embedded IPv4 address. GCP ADC is the only exception: its dedicated, non-configurable metadata policy accepts recognized metadata addresses (and loopback test stubs) only after its authority has been independently restricted.
Callout inventory
No-follow means a redirect response is returned to the caller and its
Location is never requested.
| Callout | Target source | Private opt-in | Redirect policy | Authentication mode |
|---|---|---|---|---|
openai_web_search_dispatch, anthropic_web_search | Provider default or configured base_url, executed through the outbound_chain filtered-subrequest executor | insecure_options.allow_private_upstreams (executor-gated on the bound outbound chain) | No-follow | Configured provider API key; validated origin only |
openai_file_resolve Files API | Configured files_api_url via outbound_chain | allow_private_upstreams | No-follow | Headers named by forward_headers plus outbound_chain mutations |
openai_file_resolve file_url fetch | Request-derived URL via SubRequestClient | Exact allowed_file_url_origins | No-follow | Anonymous; no downstream headers |
openai_file_search_dispatch | Configured vector_store_url | allow_private_url | No-follow | Only headers named by forward_headers |
openai_responses_compact | Configured inference_url | allow_private_inference_url | No-follow | Anonymous; no downstream or cluster headers |
ai_guardrails with NeMo | Configured endpoint | Global allow_private_upstreams | No-follow | Configured outbound_chain; no downstream headers by default |
http_callout | Configured target.url | allow_private_addresses | No-follow | Configured static headers plus allowed forward_headers |
external_metering balance check and usage report | Configured metering_url via SubRequestClient | allow_private_endpoint | No-follow | Anonymous; no downstream headers |
| MCP client | Request-derived server URL or configured connector | allow_loopback for loopback only | No-follow | Sanitized request-provided MCP authorization/headers |
mcp broker backend_sessions handshake (initialize and answers to server requests on its stream, notifications/initialized, session DELETE) | Operator-configured server cluster, declared in top-level clusters: and dialed through the generated outbound chain’s load_balancer | Literal private endpoints need global allow_private_endpoints; hostnames that resolve to private ranges need allow_private_upstreams or the cluster’s trusted_private_endpoints | No-follow | Client headers named by backend_sessions.forward_headers (default authorization) plus outbound_filters mutations |
azure_ad token fetch | Configured authority plus tenant via SubRequestClient | allow_private_authority | No-follow | Client secret in the token POST body |
gcp_adc metadata fetch | Protocol-owned metadata endpoint via SubRequestClient | Intrinsic to metadata mode | No-follow | Metadata-Flavor protocol header; returned token is not forwarded back to metadata |
gcp_adc key-file token exchange | Key file token_uri, which must be exactly https://oauth2.googleapis.com/token, via SubRequestClient | None (public-only) | No-follow | Signed RS256 assertion in the token POST body |
The request-derived file_url and MCP transports keep stricter policies:
they resolve once per attempt, validate every address against AddressPolicy,
and allow private access only through their narrow origin or loopback controls.
GCP metadata allows only Google’s two protocol-owned metadata addresses via
AddressPolicy::AllowGoogleMetadata.
external_metering calls out twice per request, so it resolves its configured
host through the upstream DNS cache instead of on every call. Every cached
address is still validated against AddressPolicy before connecting.
Upstream cluster connections are not direct callouts. They use the core Praxis endpoint and TLS policy.
Adding a callout
A new filter that opens an outbound HTTP connection must:
- Classify the target as operator-configured, request-derived, or
protocol-owned.
An operator-configured target is a
clustername resolved against top-levelclusters:, never a URL field: the cluster supplies endpoints, load balancing, TLS (pinned CA, client certificate, SNI), timeouts, private-address policy, andcredential_injection. A filtered subrequest reaches it through aload_balancerin its outbound chain, as the IRR inference step does. Request-derived and protocol-owned targets stay URLs and follow the steps below. Operator URL fields in the inventory above predate this rule and are being migrated (#2014). - Reuse the shared target/address policy, or document why a stricter dedicated policy is required.
- Default to public addresses and expose a narrowly named private-address opt-in only when the use case requires it.
- Resolve once per connection attempt, reject the complete result set if any address violates policy, and connect only to that validated set.
- Disable ambient proxies and redirects unless their security behavior is explicitly designed and tested.
- Reject URL userinfo and bind every credential or forwarded header to the validated origin.
- Document the authentication mode and cover loopback/private/link-local, mixed DNS answers, redirects, userinfo, and credential non-disclosure in tests.
TLS backend
Production callouts use SubRequestClient, which inherits TLS from the
process-wide Pingora/praxis-tls provider installed at startup
(praxis_tls::provider::install). Callouts and upstream cluster connections
share that TLS stack, so no filter selects its own TLS backend.
On RHEL/OpenShift FIPS builds, the system OpenSSL provider enforces approved
cipher suites and algorithms on every outbound connection. The default FIPS
feature set (FIPS_FEATURES) enables only aws-sigv4-filter;
openai-file-resolve-filter is an experimental opt-in build. The FIPS profile
excludes openai-mcp-tools, because its store dependency pulls sha2 through
sqlx, and excludes the response stores and policy engine for the same reason.
reqwest is a dev/test-only dependency. Test TLS infrastructure
(tests/utils/src/net/tls.rs) uses rustls for mock servers and certificate
generation, independent of the production TLS backend.