refactor: centralize peer control caller auth

This commit is contained in:
Eric Wendland 2026-07-05 23:38:19 +02:00
commit 1a6d9db913
3 changed files with 153 additions and 384 deletions

View file

@ -52,17 +52,17 @@ behavior.
- `[ ]` Each command family has a small handler module or function group.
- `[x]` Local-only behavior remains covered by existing integration tests.
- `[ ]` Extract protected peer-control routing.
- `[~]` Extract protected peer-control routing.
Acceptance criteria:
- `[x]` Shared bounded Iroh line-read and send-finish helpers live outside
the main feature handler module.
- `[x]` Outbound peer-control, pipe-wire, and overlay-wire request helpers
live outside the main feature handler module.
- `[ ]` Iroh control ALPN handling, nonce checks, peer-card validation, and
- `[~]` Iroh control ALPN handling, nonce checks, peer-card validation, and
endpoint-binding validation are centralized.
- `[ ]` Feature handlers receive authenticated caller context rather than
- `[x]` Feature handlers receive authenticated caller context rather than
repeating peer-card boilerplate.
- `[ ]` Remote request tests still prove discovery alone grants no access.
- `[x]` Remote request tests still prove discovery alone grants no access.
- `[ ]` Extract resource module handlers.
Acceptance criteria: