Repository navigation
feat(workbench,nsh-ios): add remote Host pairing/store and iOS AppOptions EngineConfig hooks - #7141
Conversation
…ions EngineConfig hooks
jackwener
left a comment
There was a problem hiding this comment.
I found one persistence issue that prevents a paired Host from surviving a normal client restart.
Reviewed head: 1c7f0fed44820069314972ce010082b3b32a6a48.
Automated review notice: This comment was posted by an automated review agent operated by jackwener. It is not an independent human review and does not replace one.
| host_name: String, | ||
| peer_id: String, | ||
| endpoints: Vec<String>, | ||
| credential_id: String, |
There was a problem hiding this comment.
[P1][normal restart path] Persist the Host bearer needed to reconnect
PairingTicketV1 carries the actual bearer in pairing_token, but the persisted profile keeps only credential_id. Nothing else in this stack stores that bearer in Keychain or another credential store. After pairing is finalized and the ticket object is dropped (or the iOS app restarts), HostClient::connect_websocket still requires the same bearer on every connection; a credential ID cannot authenticate, so this saved Host cannot reconnect.
There is a second gap in the same handoff: the maka://pair/v1 payload emitted by #7139 does not contain credentialId, although this constructor requires it, and finalize_access returns no ID. The test hides both gaps by inventing "cred-mac" after decoding instead of exercising pair -> persist -> restart -> reconnect.
Please add a secure client credential-store seam (Keychain on iOS), commit the bearer only after successful finalization, coordinate removal/rollback with the metadata store, and carry or return the credential ID if later revocation needs it. A real Host regression should pair, destroy all in-memory ticket state, reload the profile and secret, reconnect, then remove/revoke them together.
Stack B: iOS App & Remote Client (Stacked PRs)
stack/ios-app-1-remote-client-splitrust-previewstack/ios-app-2-saved-hosts-and-pairing-uistack/ios-app-1-remote-client-splitAdd remote Host pairing tickets, persistent multi-computer Host storage, and
AppOptionsEngineConfigforwarding fornsh-platform-ios.Changes
products/maka/workbench/src/remote_hosts.rs:PairingTicketV1(URI codec, redactedDebug, expiration, 6-digit SAS),SavedHostProfile,SavedHostStore(path-traversal-saferoot_idvalidation, atomicNamedTempFilepersistence with rollback, pinnedpeer_idverification, cross-computerHostViewFilterand drawer collapse state).third-party/nsh/crates/nsh-platform-ios/src/app.rs: forwardassets,chunk_loader,runtime,data_dir,context, andhostthroughAppOptions.Verification
cargo test --locked -p maka-workbench --lib remote_hosts::tests(pass)node scripts/asf-license-headers.mjs check(pass)