Skip to content

feat(web-console): confirm first-use certificates, warn on changes, show peer provenance - #306

Closed
Mearman wants to merge 15 commits into
feat/console-namingfrom
feat/console-trust
Closed

Mearman wants to merge 15 commits into
feat/console-namingfrom
feat/console-trust

Conversation

@Mearman

@Mearman Mearman commented Sep 30, 2026 •

Copy link
Copy Markdown
Member

Stacked on #305 (base is feat/console-naming, so CI does not run for this PR; verification was local).

A pinned WebTransport address is now assessed against the certificate memory before it is dialled, whether it was typed into the connect form or gossiped and then confirmed in the discovered-peers table. Nothing remembered for the node shows a first-use confirmation naming the node and the SHA-256 fingerprint to be pinned; a remembered set that shares no certificate with the presented one shows a red change warning that has to be accepted explicitly; a presented set that overlaps the remembered one connects silently, because that is what a rotation looks like (a node announces the certificate it serves now beside the next ones). Trusting writes the presented hashes to the memory, cancelling dials nothing and writes nothing. Addresses with malformed pins skip the gate and fail in the transport with the parser's message, as before.

The second half covers a connected node that announces certificates sharing nothing with what was remembered. The announcement arrives on a session pinned by a certificate the console already trusted, so it is still stored, but the certificate memory handed to the dial transport is now wrapped so a disjoint replacement raises a dismissible notice instead of overwriting silently.

Each row of the discovered-peers table now has a "gossiped by" column naming the connection (by its dialled address) whose directory carried the peer and, when that connection was itself reached by gossip, the device that vouched for it, and the panel says that this is the only thing vouching for the address.

WebSocket (ws/wss) addresses have no certificate memory, so the trust prompt does not apply to them; this was the behaviour before and is unchanged.

The pinned-address Playwright specs and the offline containers spec accept the first-use prompt the way a person would (a later commit on this branch); they could only be run at the top of the stack, where they pass.

Fixes #296

A petname is this viewer's own label for a device, kept in the console's
own storage and never gossiped. A self display name is read from the
agent/self entry of a verified advert, the key agent-comms and the public
hub's advert policy already carry, and this console publishes its own
through the same entry. The convention is implemented once in peer-names.ts
and reached through a context by the conversation list, the connection
directory and the discovered-peers table.
…how peer provenance

An address that carries certificate pins is assessed against the
certificate memory before it is dialled: nothing remembered asks the user
to trust the presented certificate, a disjoint remembered set raises a
change warning that must be accepted, and an overlapping set (a rotation)
connects silently. A node that later announces certificates sharing
nothing with the remembered ones is reported rather than overwritten
silently. Each discovered-peer row names the connection whose directory
gossiped it and, when known, the node that vouched for that connection.
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 30, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
🔒 Security Review ✅ Completed 2026-09-30T19:18:37.951408Z 224b876 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

…trip control characters from it

PeerName and the conversation labels rendered only the stranger-chosen
name, so two peers claiming one name could not be told apart.
cleanName now drops control and bidirectional formatting characters and
truncates by code point.
# Conflicts:
#	ts/packages/web-console/test/App.unit.test.tsx
… show gossiped device identity as a claim

An address presenting one remembered certificate beside others was dialled
with all of them, so the address could add a pin the console had never
approved. confirmAddress now returns the address to dial, narrowed to the
remembered pins. A request for the same node and certificates shares one
prompt, pending prompts are refused and dials skipped once the console is
closed, and the device a gossiping node claimed for an address is shown as
a claim and forgotten once its dial is settled.
A session's reconnect timer outlived the console, so a late redial could
construct a socket after the console was gone.
…nd trim a name after the length cut

A self name is shown in italics under a 'calls itself' marker and flagged
when it equals a petname the viewer holds for any device. cleanName trims
after truncating so a cut after a space leaves no trailing space, and the
Save button compares the draft with its cleaned form.
…t connects, and claim no device for a shared address
@Mearman
Mearman force-pushed the feat/console-naming branch 2 times, most recently from 1260305 to f659e79 Compare October 1, 2026 08:58
@Mearman
Mearman deleted the branch feat/console-naming October 1, 2026 09:57
@Mearman Mearman closed this Oct 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant