ollie/toolsrv
Levi Neely 11c67a7fb1 toolsrv: implement 9P Tauth authentication
Replace HMAC-based registration with proper 9P Tauth flow:
- First client to connect sets the secret via Tauth afid write
- Server stores secret in memory, returns session token
- Subsequent clients must provide matching secret
- Secret never in env vars or disk, only transmitted over socket

Changes:
- server9p.go: Authenticate() replaces RegisterAgent/GetAgent
- client9p.go: Dial() does Tauth handshake (write secret, read token)
- spawn.go: generates secret, no longer passes via TOOLSRV_SECRET env
- auth9p.go: simplified to just GenerateSecret()
- spec9p.go: removed /register file, token validation at connection level
- cmd/toolsrv/server.go: handleAuth/handleAuthWrite/handleAuthRead

Security model:
- Session generates secret on Spawn()
- All agents share session's secret via ProcessKeeper
- Socket permissions (local) or SSH (remote) protect transport
- Secret dies with toolsrv process, new secret on respawn

Added integration tests verifying:
- First connection sets secret
- Reconnect with same secret works
- Wrong secret rejected
- ProcessKeeper reconnect/respawn behavior
- Concurrent connections
2026-08-10 19:03:10 +02:00
..
auth9p.go toolsrv: implement 9P Tauth authentication 2026-08-10 19:03:10 +02:00
client9p.go toolsrv: implement 9P Tauth authentication 2026-08-10 19:03:10 +02:00
exec9p.go toolsrv: remove JSON-RPC, add compat stubs for 9P transition 2026-08-10 16:48:40 +02:00
fs9p.go toolsrv: add 9P-based tool server foundation 2026-08-10 14:53:13 +02:00
fs9p_test.go toolsrv: add 9P-based tool server foundation 2026-08-10 14:53:13 +02:00
integration_test.go toolsrv: implement 9P Tauth authentication 2026-08-10 19:03:10 +02:00
meta.go feat: add resetsCounter tool property to reset step budget on active progress 2026-08-07 17:13:14 +02:00
registry.go all: merge toolsrv files, fix context hierarchy, remove dead params 2026-08-08 16:13:55 +02:00
server9p.go toolsrv: implement 9P Tauth authentication 2026-08-10 19:03:10 +02:00
server9p_test.go toolsrv: implement 9P Tauth authentication 2026-08-10 19:03:10 +02:00
spawn.go toolsrv: implement 9P Tauth authentication 2026-08-10 19:03:10 +02:00
spec9p.go toolsrv: implement 9P Tauth authentication 2026-08-10 19:03:10 +02:00