Skip to content

fix: a connection-bound login is never given to another request - #603

Merged
7schmiede merged 1 commit into
mainfrom
fix/569-connection-bound-auth
Nov 20, 2026
Merged

7schmiede merged 1 commit into
mainfrom
fix/569-connection-bound-auth

Conversation

@7schmiede

Copy link
Copy Markdown
Member

What and why

Since #556/#559 the service proxy, a static service's forward and the public link router keep their connections to a service. A service that ties its login to the connection (Windows Negotiate/NTLM, Kestrel's and HTTP.sys's default) took a second visitor's request on such a kept connection as the first visitor's session — behind a public link, another person's.

Pool::send now returns the connection as Option: None when the request carried Authorization: Negotiate|NTLM or the answer WWW-Authenticate: Negotiate|NTLM (binds_connection), as YARP does. Such a connection goes with its answer.

Cause the pool gave back any connection whose answer was read to its end, whatever state the service tied to it
Bug class connection-bound-state-shared
Proof connpool test against an upstream that challenges with Negotiate/NTLM: red with both connections kept (left: 2, right: 0), green with the fix; the second half (request header only, answer header only) each fail on their own; a Basic login keeps its connection (no overcorrection). Not reproduced against a real Kestrel/HTTP.sys service (none in the stack)
Siblings all users of the pool (proxy, static forward, public link router) go through send; the hub's own pool to the daemons carries devstack's API only and gives back as before (Some)
Safeguard the Option in send's result: no user of the pool can give a bound connection back without handling it

Closes #569

🤖 Generated with Claude Code

The service proxy, a static service's `forward` and the public link router
keep their connections to a service per target (#556, #559). A service
that ties its login to the connection (Windows Negotiate/NTLM, Kestrel's
and HTTP.sys's default) then took a second visitor's request on such a
kept connection as the first visitor's authenticated session.

`Pool::send` now hands the connection back as `Option`: `None` when the
request carried `Authorization: Negotiate|NTLM` or the answer
`WWW-Authenticate: Negotiate|NTLM` (`binds_connection`), as YARP does. The
type makes every user of the pool handle it; such a connection goes with
its answer.

Closes #569

Bug-Class: connection-bound-state-shared
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@7schmiede
7schmiede force-pushed the fix/569-connection-bound-auth branch from 4462d11 to 873c930 Compare November 20, 2026 16:44
@7schmiede
7schmiede merged commit af0234e into main Nov 20, 2026
14 checks passed
@7schmiede
7schmiede deleted the fix/569-connection-bound-auth branch November 20, 2026 16:54
7schmiede added a commit that referenced this pull request Nov 21, 2026
…ks) (#607)

- connpool: a connection that carried a Windows login (Negotiate, NTLM,
  Kerberos, CredSSP; several schemes in one value) stays with its client
  connection (`Bound`, one per accepted connection in the service proxy,
  the static forward and the public link router) instead of being
  dropped: #603 broke NTLM, whose handshake needs one connection. Proxy
  login headers are stripped as hop-by-hop.
- GPUs: the cap counts what the leases hold, offers the largest free
  GPUs, and lets the admission give any free GPU that fits within it;
  `nvidia-smi` runs with a 5 s limit; `--max-gpus` goes only to an agent
  that takes new lanes.
- asks (#599): no notice about the admin's own machine, no baseline (and
  burst) for a non-admin, at most one notice per machine in 30 min; the
  Admin tab says "same address" or "similar name, not checked" with the
  other's id; the coordinator drops invisible characters from a machine's
  name; the Machines pill shows to admins only.
- watcher: the relist thread lists what came meanwhile once.
- share switch and setup dialog say when the GPU cap is no whole number.

Bug-Class: connection-bound-state-shared

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

A kept upstream connection can carry one visitor's connection-bound login to another

1 participant