Skip to content

Remote layer Decision Log 28: a software first root, and the recovery key at org setup - #242

Merged
SSFSKIM merged 2 commits into
masterfrom
rl-dl28-software-root
Oct 28, 2026
Merged

SSFSKIM merged 2 commits into
masterfrom
rl-dl28-software-root

Conversation

@SSFSKIM

@SSFSKIM SSFSKIM commented Oct 28, 2026

Copy link
Copy Markdown
Owner

Answers p5-desk-track-owner's question on MAWS #241 (O13): may the org's first root be a software key, held by an owner-run command on the Mac, until O8's Org page exists? Yes, with conditions. This PR changes only the remote layer spec.

What changes

  • §5.2 gains A software root. Every root key is a software key until signed builds, the app's own device included (O10 M9, keyStorage: 'software'). So a software first root is admitted. The bullet then sets three limits on it:
    • No copies. An admin device's key file stays out of backups and sync: no Time Machine, no iCloud Drive, no ~/.claude, no agents' secret store. A lost key is replaced through another admin device or the recovery key, never restored from a backup.
    • Signing takes the person. Against a deployment, the stand-in reads its signing confirmation from /dev/tty. An agent's shell has no terminal, so it can't sign through the command.
    • A stand-in ends once the app's device is a root. Its keys go into revoked. This discredits nothing, because states verify step by step and an endorsement is checked only when its device is added. The end is set by the app's arrival, not by the Enclave: the app's device is software too until signed builds.
  • §5.2's backstop: until the app is an admin device, the stand-in signs the no-change successor at the owner's hand, and the owner is warned before the head turns 30 days old. The endpoint already refuses remote actions past 30 days (src/endpoint/org-sync.ts, BACKSTOP_MS).
  • §5.3, pairing a device: both screens show a fingerprint of the new device's channel key, and the person compares them before approving. Two entries that verify under one code are both refused. A pairing code passed through the clipboard is readable by every process running as the same user.
  • §5.3, org setup: recoveryPub is fixed at genesis for the life of the org (org-state.ts). So setup writes the recovery key only to its offline home, never to the disk holding an admin key. It reads the key back and checks it against recoveryPub before signing the genesis.
  • Decision Log 28 records all of this, plus the rejected options: retiring the stand-in instead of revoking it, and requiring an Enclave root.

Sminos-Session: remote-architecture#3502a215 (macbook on macbook)

… key at org setup

O13 roots production with a software admin device on the owner's Mac before
O8's Org page exists. The trust model admits it, since every root key is a
software key until signed builds, and bounds it: admin key files stay out of
backup and sync scopes, a stand-in signs only on a terminal confirmation, and
it is revoked once the app's device is a root. recoveryPub never changes
after genesis, so setup writes the recovery key only to its offline home and
checks it before signing the genesis. Device pairing adds a fingerprint
compare, and the stand-in carries the 30-day backstop until the app does.

Sminos-Session: remote-architecture#3502a215 (macbook on macbook)
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 28, 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
📝 Code Review ✅ Completed 2026-10-28T01:13:14.924244Z eca3288 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.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: eca3288d66

ℹ️ 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

- The hub stores the certificates, and serves them beside the state.
- **A device.** A new MAWS install generates its keys: in the Enclave on signed builds, as software keys before that (§5.1).
- The approving device shows a one-time pairing code, which the person types into the new install. The new device sends its public keys with a MAC under that code, as for a machine.
- The MAC holds only while the code is secret, and a code passed by clipboard is readable by every process of the uid. So both screens also show a short fingerprint of the new device's channel key, computed by the protocol package beside the MAC, and the person compares them before approving (Decision Log 28).

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Bind the pairing fingerprint to every enrolled public key

When the pairing code leaks, comparing only the channel-key fingerprint does not authenticate the device's step-up key. An attacker able to replace the enrollment request can preserve the legitimate channelPub, substitute an attacker-owned stepUpPub, and recompute the MAC; both screens still display the same fingerprint. An untrusted hub can withhold the original request, so refusing duplicate entries does not prevent this. This is especially consequential for admin enrollment because rootKeys() in apps/org-protocol/src/org-state.ts takes root authority from stepUpPub: approval can therefore authorize an attacker-controlled root key. Compute the compared fingerprint over the complete enrollment payload, including the step-up key and any passkey, rather than the channel key alone.

Useful? React with 👍 / 👎.

SSFSKIM added a commit that referenced this pull request Oct 28, 2026
…L28 amended)

#242's review: a fingerprint over channelPub alone matched an entry whose
step-up key or passkey a leaked k let an attacker swap. It now hashes the
MAC's own input without k, with a swapped-credential vector.

Sminos-Session: p5-desk-track-owner#b4948247 (doperpowers on macbook)
…p keys that may have been copied

Pairing's fingerprint covered only the channel key, so a leaked code could swap stepUpPub or the passkey; it now covers the whole entry the MAC covers.
The app's key file predates the backup exclusion, so a device whose file may have been copied is re-registered with new keys before it becomes a root.

Sminos-Session: remote-architecture#3502a215 (macbook on macbook)
@SSFSKIM
SSFSKIM merged commit 587f6fc into master Oct 28, 2026
@SSFSKIM
SSFSKIM deleted the rl-dl28-software-root branch October 28, 2026 01:27
SSFSKIM added a commit that referenced this pull request Nov 1, 2026
… the app-tab fence and R3 removed; R2 approve accepted by O10 with its four pins; R1 to O7 M5, M9 on top; R4 confirmed by O16 with its two conditions; R6 to cua #242 and #251) and the idle exception for headless tabs (D20); the recount at about 6,000

Sminos-Session: GUI AI agent workspace charter#37052769 (MAWS on macbook)
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