Module outbound

Module outbound 

Source
Expand description

The outbound HTTP client: beck_core::net::Outbound, over hyper.

The seam is in beck-core because the evaluator needs it and the evaluator must not know what a socket is. The implementation is here because this is the crate that already has an HTTP stack — docs/07 chose hyper, and the server half of it has been in crate::http since Phase 1. Nothing new was taken to make a request.

§TLS, when the request asked for it

[beck_core::net::Request::tls] decides, and the certificate is verified against [beck_core::net::Request::host] — the string the call site wrote, which is also the atom the call performs and therefore the peer in the cluster’s egress rule (adr/0013). There is deliberately no way to reach a peer under a name the deployment was not told about: no SNI override, no danger_accept_invalid_certs, no pinning.

The trust anchors are Mozilla’s, compiled in as data (adr/0023) rather than read from the container’s filesystem — §6.2’s images execute nothing at build time, so a ca-certificates package would be one more thing whose version the SBOM cannot state.

§Its own runtime

[beck_core::net::Outbound::fetch] is synchronous, because the evaluator is: a tree-walker cannot await. Rather than block on whatever runtime happens to be current — which panics on a current-thread runtime and steals a worker on a multi-thread one — this owns a small one of its own, on its own thread. An outbound call therefore cannot stall the runtime serving the page.

Structs§

HttpOutbound

Constants§

DEFAULT_TIMEOUT_MS
How long an exchange may take before it is a [Failure::TimedOut].
MAX_BODY_BYTES
The most of a reply that will be read.
TLS_VERSIONS
The TLS versions this project offers, named rather than defaulted.