Gateway (web2)
An HTTP proxy that injects credentials and enforces policy.
warden-gateway is an HTTP/MITM proxy (a fork of OneCLI, leaf-swapped onto the Warden vault). It is the
single credential-injection + policy point for Web2: the agent makes a normal HTTP request through
it with a placeholder credential, and the gateway injects the real one at the edge — the agent never sees
the key.
warden run wires this for you: it starts the gateway against your vault, points the
agent's HTTPS_PROXY at it (with the warrant token embedded so the gateway resolves scope), and trusts
the gateway's CA. You can also run it by hand and point any client at it:
HTTPS_PROXY=http://warden:warden2_…@127.0.0.1:10255
The client sends the token as Proxy-Authorization; the gateway resolves it to the warrant's scope,
applies policy, and injects the real credential at the edge. Routes or requests marked
manual_approval are held for owner sign-off before forwarding.
Where it runs
The gateway binds 127.0.0.1 by default — loopback only, so a leaked warrant token can't be used
from another machine. To run it in a container or on a trusted network, bind all interfaces with
--bind 0.0.0.0 (or $WARDEN_GATEWAY_BIND=0.0.0.0) — it logs a warning when it does, since it's exposing
a credential-injecting proxy. warden run's auto-started gateway is always loopback.