Continue work on Cthulhu Remote.
This commit is contained in:
1 parent
63e84e9ac7
commit
0c74038c49
16 files changed
+2896
-30
No files matched your search
@@ -0,0 +1,92 @@
|
||||
# Remote connection workflow
|
||||
|
||||
The connection library now combines certificate review, saved-key actions and
|
||||
the coordinator in one workflow. This remains **test-only wiring**: no production
|
||||
command, manifest or reader consent issuer exists. Remote is not ready for live
|
||||
desktop testing. The maintained Tentacles `master` matched `origin/master` at
|
||||
`63e84e9` after fetch on 2026-11-03; existing uncommitted work was preserved.
|
||||
No reader files or installed programs changed.
|
||||
|
||||
## Workflow ownership
|
||||
|
||||
`new_connection_workflow` accepts an already-selected, validated endpoint, an
|
||||
optional open settings store and an action received by the coordinator from the
|
||||
public SDK. It claims that action for one workflow and copies the reader's
|
||||
role/grants and endpoint trust. Caller-modified role/grants are ignored. Opening
|
||||
the workflow neither reads a saved key nor opens a network connection.
|
||||
|
||||
The production owner must supply endpoint/role selection, verify local input
|
||||
origin and cancel the workflow context on closure, lock/handoff or retirement.
|
||||
The workflow does not manufacture consent from a command or `Submission`. Its
|
||||
`remote-connection` continuation is registered only in a private test peer.
|
||||
The owner must serialize the currently displayed form's submissions; this
|
||||
library supplies no proof that a submission came from that form or a local key.
|
||||
|
||||
Pending approval has a context that ends on replacement, matching revocation,
|
||||
consumption, disconnect or SDK loss. A replacement cancels setup and inspection.
|
||||
The reader remains authoritative for action expiry at `remote.open`; the
|
||||
protocol currently supplies no event for expiry of an unopened action. Merely
|
||||
keeping a form open does not extend approval. An expired action cannot connect.
|
||||
|
||||
The workflow's `done` barrier includes its inspection worker. Cancelling it
|
||||
initiates coordinator cleanup; wait separately on the coordinator's Disconnect
|
||||
barrier before disposing the SDK session/store. Cleanup is scoped to the original
|
||||
epoch: closing an old form cannot retire a newer approval or connection.
|
||||
|
||||
## Explicit actions
|
||||
|
||||
- **Connect relay** validates the entered key, or uses a key previously loaded
|
||||
by **Use saved key**, and starts the coordinator. Install grants and a form
|
||||
are insufficient: the reader must still accept `remote.open` before dialing.
|
||||
- **Use saved key** loads only the selected host/port's credential. It does not
|
||||
connect, copy it or prefill an entry. A typed key overrides it for that attempt.
|
||||
- **Remember or forget a key** opens the existing masked form. Completion or its
|
||||
Cancel button returns to Connect. A remembered key still requires explicit
|
||||
loading; Forget also discards the workflow's previously loaded key.
|
||||
- **Inspect relay certificate** discards a loaded key and runs the bounded
|
||||
key-free probe in a worker. **Refresh inspection status** presents its result.
|
||||
Inspection failure never changes trust or starts a connection.
|
||||
- **Copy fingerprint** requests exactly that clipboard write. **Trust once**
|
||||
returns to Connect with an endpoint-bound pin. It neither persists the pin nor
|
||||
connects. Connect performs fresh TLS authentication before sending the key.
|
||||
- **Disconnect** cancels the original attempt. Status distinguishes opening,
|
||||
connecting, waiting, peer membership, cleanup and failure. Every status states
|
||||
that desktop services are unavailable. **Disconnect and close**, Escape/form
|
||||
cancellation or owner cancellation retires the workflow.
|
||||
|
||||
Entries are always empty and masked. Responses and status omit channel keys and
|
||||
server/RPC error text. Loaded keys are released on Connect, inspection, saved-key
|
||||
actions and teardown; transient pins are released on Connect/teardown. This is
|
||||
reference cleanup, not guaranteed secure memory erasure. Unknown action names
|
||||
and duplicate Connect submissions cannot start another attempt. Completed
|
||||
nested workflows return to Connect rather than repeating a storage action.
|
||||
|
||||
## Verification and readiness
|
||||
|
||||
From the Tentacles repository, with private loopback sockets permitted:
|
||||
|
||||
```sh
|
||||
GOCACHE=/tmp/cthulhu-cache GOPROXY=off go test -race ./remote/src -run '^TestConnectionWorkflow' -count=1 -timeout=60s
|
||||
GOCACHE=/tmp/cthulhu-cache GOPROXY=off go test -race ./remote/src -count=1 -timeout=60s
|
||||
make check GOPROXY=off
|
||||
```
|
||||
|
||||
The workflow tests cover both roles, explicit saved-key use, secret-free replies,
|
||||
endpoint/permission failures, one-use approval, nested Remember/Forget, key-free
|
||||
inspection, Copy/Trust once, fresh pinned TLS, cancellation during stalled TLS,
|
||||
replacement/SDK EOF and old status controls against a newer connection. A
|
||||
separate executable speaks the real Go SDK over OS pipes to a synthetic host;
|
||||
it exercises the form continuations, saved-key storage, certificate review and
|
||||
relay join/close together. The fixtures grant synthetic approval and submit
|
||||
synthetic values. They do not prove local input origin or accessible form
|
||||
navigation. The focused race tests passed ten repetitions after correcting an
|
||||
inspection/cleanup race; the complete race suite and `make check` also passed.
|
||||
|
||||
Before production registration, resolve reader-owned consent/input provenance,
|
||||
endpoint/role selection, persistent-pin management and lock/handoff revocation.
|
||||
Then test these actual forms with Tab/Shift+Tab, list navigation, masked editing,
|
||||
Copy, Cancel and failed storage, including cancellation during inspection/join.
|
||||
Recheck ordinary Tentacle forms, CA and pin connections, certificate rotation,
|
||||
Hello World, Wormhole and Battery Status. Reader desktop services, real NVDA/Orca
|
||||
interoperability, audible speech, physical keyboard/Braille and packaging remain
|
||||
separate gates. Passing these private checks does not make Remote installable.
|
||||
Reference in new issue
Block a user