Archived
fleet: the admin routes read all three legs, as the engine's guards do
The fleet front guarded its admin routes with the loopback socket alone. The socket is the one leg that forges: a DNS-rebinding page is same-origin with its victim's browser and dials through loopback, and a localhost proxy delivers remote clients on loopback sockets carrying the public Host. With CORS open by default, a web page in the operator's browser could unload and park any model, reload the fleet, and read the topology -- disk paths in the body -- from outside the machine. The three-leg rule (loopback socket, no foreign Origin, a Host that names this box) was Server::local_operator's, locked inside Server. Hoist it to server::local_operator(request, bind_host, local_hosts) beside the request whose fields it reads, keep the member as the delegate it now is, and let the fleet's guard call the very same predicate with its own config's host and --allow-host names. One rule, two callers, no forked wording.
This commit is contained in:
1 parent
2a2b756371
commit
41a1aa00fe
6 files changed
+83
-32
No files matched your search
@@ -257,13 +257,8 @@ public:
|
||||
/* Renders each --reasoning-effort-map target as a request's effort. Empty when the template
|
||||
* takes all of them; otherwise the first refusal, naming the target. */
|
||||
std::string check_reasoning_effort_map() const;
|
||||
/* The identity the keyless "loopback only" guards accept: the socket is loopback, the
|
||||
* request carries no foreign Origin, and the Host names the loopback, one of
|
||||
* ServerOptions::local_hosts, or the address --host names. Two ways forge the socket alone:
|
||||
* a DNS-rebinding page is same-origin with the server and its victim's browser *is* the
|
||||
* loopback peer — only the Host still tells which page asked for it — and a localhost TLS
|
||||
* proxy puts every remote client behind the loopback socket, carrying the public Host. An
|
||||
* attacker at the console of this machine is a local user either way, and stays admitted. */
|
||||
/* The identity the keyless "loopback only" guards accept: loopback socket, no foreign
|
||||
* Origin, and a Host that names this box (server::local_operator, http.cpp). */
|
||||
bool local_operator(const HttpRequest& req) const;
|
||||
void stop();
|
||||
/* stop() without the transport: for a server behind a Front (front.h), which owns the socket.
|
||||
|
||||
Reference in new issue
Block a user