0260. Plain HTTP for loopback and allowlisted hosts
- Status: Accepted (maintainer, 2026-11-17)
- Date: 2026-11-16
- Plan: M-HTTP.8, M15.5
- Review: Forge P1;
PLAN-httpM-HTTP.8–.9
Context
Local registries and agent tools need plain HTTP without silently trusting LANs or weakening HTTPS. Builds on ADR-0163, ADR-0166, ADR-0247 and ADR-0252.
Decision
- Allow
http://without config for exact loopback hosts127.0.0.1,localhostand (plugin only)[::1]. Any port; default 80. - Other hosts require explicit opt-in: plugin
Plain.hosts, or usersources.toml[[registry]]roots /[[mirror]].toroots. Never automatically trust RFC1918. Warn off loopback, except the library exposesloopbackfor apps. - The capability-free plugin uses caller-supplied
Conn/Netand nativeNet.connect, not curl. Registry curl uses--proto =http --proto-redir =http,--noproxy '*', no proxy environment and zero redirects. - Bearer tokens are permitted only on loopback plain HTTP.
Configuring a token for another HTTP authority is an error; never
send it. Never follow plain-HTTP redirects or read
http_proxy. ADR-0252 HTTPS proxy rules remain unchanged. - DNS-in-connect (named LAN hosts validate but cannot connect), registry IPv6, chunked responses, keep-alive and TLS are out of scope. This does not choose TLS, runner isolation, or any ADR-0204–0207 item.
Alternatives considered
- curl
--proto =httpin http.client — Forge chooses a separate native client. - Automatic RFC1918 trust — silently trusts the LAN.
- Opt-in LAN bearer tokens — opt-in supplies no channel protection.
Consequences
M-HTTP.8 adds pure wire encoding/parsing; M-HTTP.9 will add the native client; M15.5 P1b will add registry policy. Existing HTTPS client behavior is unchanged. Applications must explicitly acknowledge non-loopback plaintext risk.
Open questions
- Allowlist host or authority? Default: exact authority as
written, including port, consistent with
allowed_url. - IPv6 loopback? Default: plugin
[::1]yes; registry follows up (host_valid). - Timeout knob? Default: none, use native connection deadline.
Verify in P1a2: if
Conn.timeoutexists, use 30000 ms; otherwise wait for a setter. - Redirects? Default: plugin returns 30x as Reply, never follows; registry refuses via curl max-redirs 0.
- Chunked? Default: reject; track with streaming responses in PLAN-http Later.
- Token diagnostic? Default: E1087, not E1084 (unavailable). E1085 is used by RG4.1c (release tags).
- Project non-loopback HTTP roots? Default: no, E1083;
user-machine opt-in, like
[[auth]].