docs(ledger): CF-005 — connect-side serving path has no caller-identity capture (alktunnels reverse-flow POC W1)
This commit is contained in:
1 parent
d22cecd317
commit
0d287a97b0
1 file changed
+37
-1
@@ -11,7 +11,43 @@ Format: date | found-in (alkhttp context) | severity | status.
|
||||
|
||||
## Open
|
||||
|
||||
(none)
|
||||
### CF-005 — connect-side serving path (`from_connection_with_serving`) has no caller-identity capture; scope-gated ops are satisfiable only via payload `auth_token` (2026-09-07)
|
||||
|
||||
- **Found in:** alktunnels reverse-flow POC
|
||||
(`alktunnels-reverse-poc`, summary at
|
||||
`/workspace/@alkdev/alktunnels/docs/research/reverse-poc-summary.md`
|
||||
§W1; verified against alkcall 0.6.0). The worker is the connect side
|
||||
AND the serving side (ADR-022 §2 both-sides): it serves its tunnel
|
||||
open op to the hub over the connection it dialed. The open op is
|
||||
scope-gated (`AccessControl.required_scopes`), but the identity the
|
||||
ACL sees comes from `Dispatcher::dispatch_start` →
|
||||
`resolve_identity(connection_identity, payload)`, and:
|
||||
- `connection.identity()` is `None` — `from_connection_with_serving`
|
||||
builds channel 0 internally via `Connection::from_source`
|
||||
(`client.rs` channel-0 block) and never sets an identity; there is
|
||||
no capture point for the transport-authenticated peer
|
||||
(mTLS/QUIC identity) on this path.
|
||||
- The only caller-identity path is the payload `auth_token` →
|
||||
`ServingConfig.identity_provider` (`resolve_from_token`).
|
||||
- Corollary: the `AuthContext` closed over by
|
||||
`register_openable*`'s wrapper (what the establisher and pump
|
||||
handler receive) is the connection-establishment-time context, not
|
||||
the per-call opener's identity — on the accept side the install
|
||||
hook receives the transport `AuthContext` and can
|
||||
`channel0_conn.set_identity`, but `from_connection_with_serving`
|
||||
has no equivalent seam.
|
||||
- **Impact:** a connect-side serving op with a scope gate cannot
|
||||
authenticate the legitimate peer by transport identity — the POC
|
||||
had to attach `auth_token` payloads from the hub side
|
||||
(`CallConnection::call_with_payload`). Acceptable for hub-forwarding
|
||||
topologies (from_call's ADR-017 §7 token path), but a gap for
|
||||
direct connect-side serving where the transport already
|
||||
authenticated the peer.
|
||||
- **Candidate remediations (upstream's call):** (a) `ServingConfig`
|
||||
gains an optional identity (or the channel-0 connection is exposed
|
||||
for `set_identity` before the serving loop starts); (b) documented
|
||||
token-only posture for connect-side serving. Either is additive.
|
||||
- **Status:** open — filed 2026-09-07 (alktunnels reverse-flow POC W1).
|
||||
|
||||
---
|
||||
|
||||
|
||||
Reference in new issue
Block a user