Overview
ThecreateAtlsFetch function creates a fetch-compatible API for making HTTP requests over attested TLS connections. It handles the full HTTP protocol in Rust/WASM, providing a familiar interface for browser applications.
This is the recommended high-level API for most browser use cases.
Function signature
Parameters
Configuration for the attested fetch connection
WebSocket proxy URL for TCP tunneling. Required because browsers cannot make raw TCP connections.Example:
"ws://127.0.0.1:9000"The TEE server hostname to connect to.Example:
"vllm.example.com"Attestation verification policy that determines what TEE evidence is accepted.See Policy configuration for details.
Optional callback invoked after attestation verification completes.Receives an
AttestationSummary object with:trusted(boolean): Verification resultteeType(string): TEE type (e.g., “Tdx”)tcbStatus(string): TCB status from InteladvisoryIds(string[]): Security advisories
Return value
A fetch-compatible function for making HTTP requests over the attested TLS connection.The returned function has the same signature as the standard The
fetch API:Response object includes an additional attestation property with the verification result.Proxy configuration
Browser deployments require a WebSocket-to-TCP proxy since browsers cannot make raw TCP connections. The proxy forwards bytes without TLS termination - all encryption and attestation verification happens in the browser.Running the proxy
Security considerations
- The proxy only forwards bytes and never terminates TLS
- Attestation verification occurs entirely in the browser
- An allowlist is required to prevent SSRF attacks
- The proxy can be deployed alongside your web application