Skip to content

fix(cluster): show the other Mac's pairing posture as reported, not verified - #2129

Merged
jonathan308 merged 5 commits into
devfrom
fix/cluster-pairing-posture-is-self-reported
Nov 14, 2026
Merged

jonathan308 merged 5 commits into
devfrom
fix/cluster-pairing-posture-is-self-reported

Conversation

@jonathan308

@jonathan308 jonathan308 commented Nov 14, 2026 •

Copy link
Copy Markdown
Collaborator

Problem

A security scan (finding 274) reported that cluster pairing accepts self-signed Secure Enclave claims. Confirmed on dev, with a smaller impact than reported:

  • ClusterPairingProvider.verifyAttestation verifies the other Mac's attestation signature under the public key embedded in the same blob (AttestationBuilder.verify), then checks that key equals the identity key it pairs with, binds this ceremony's ephemeral key and is fresh. That proves possession of the paired key, not that a Secure Enclave holds it: a software P-256 key passes with any claimed posture (the existing attestationBindsTheKeyAndTheCeremony test already pairs software keys).
  • The posture gates nothing: it is shown beside the pairing code, persisted, and never read back. The six-digit code commits to both identity keys, both ephemeral keys and the attestation hashes, so only the Mac the person confirms can lie, and as a paired leader it can already do far more. For public pairs the coordinator separately requires App Attest per member.
  • What was wrong is presentation: darkbloom cluster pair (and the setup wizard) stated the other Mac's SIP, Secure Boot and sealed-volume status and its "Secure Enclave key pin" as facts; the "Paired" summary, the wizard and the proof-failure message called the other Mac's key a Secure Enclave key; and the encryption doc said both Macs "verify each other".

Change

  • ClusterPairingTerminal.reportedPosture renders the posture as "… (reported by the other Mac, not verified)", used by the pairing screen and the onboarding pairing event; the other Mac's pin is a "key pin". This Mac's own line still names its Secure Enclave key, which it knows.
  • The "Paired" summary, the wizard text and ClusterPairingError.proofInvalid say "the key it pairs with" instead of "Secure Enclave key".
  • ClusterPairingProvider, ClusterPairingPeerPosture and docs/architecture/security/encryption.md say exactly what is verified.

No check, gate, ceremony step or stored field changes. Binding the key to Apple hardware (for example App Attest over the ceremony transcript) is a separate feature.

Before

flowchart LR
  classDef bad fill:#fde2e1,stroke:#c0392b,color:#1b1b1b
  classDef ok fill:#e3f4e1,stroke:#2e7d32,color:#1b1b1b
  classDef io fill:#e6eefc,stroke:#2f5fb3,color:#1b1b1b
  P["peer attestation<br/>(signed by the key it names)"]:::io --> V["verifyAttestation:<br/>signature, key = paired key,<br/>ephemeral binding, freshness"]:::ok
  V --> S["screen: 'SIP on, Secure Boot full,<br/>sealed system volume'<br/>'Secure Enclave key pin …'"]:::bad
  V --> D["Paired. … pins the other Mac's<br/>Secure Enclave key"]:::bad
Loading

After

flowchart LR
  classDef ok fill:#e3f4e1,stroke:#2e7d32,color:#1b1b1b
  classDef io fill:#e6eefc,stroke:#2f5fb3,color:#1b1b1b
  P["peer attestation<br/>(signed by the key it names)"]:::io --> V["verifyAttestation (unchanged)"]:::ok
  V --> S["screen: '… (reported by the<br/>other Mac, not verified)'<br/>'key pin …'"]:::ok
  V --> D["Paired. … pins the<br/>other Mac's key"]:::ok
Loading

Validation

Check Result
provider-swift/Tests/ClusterPairingChecks/run.sh (real two-process pairing over pseudo-terminals) with dev's terminal code fails the two new expectations (posture shown as fact; peer pin called a Secure Enclave key)
Same runner with this change 275/275 pass
ClusterConsoleChecks/run.sh 79,396 expectations in 41 groups pass
ClusterOnboardingChecks/run.sh 1,999/1,999 pass
ProviderCore pairing, onboarding and wizard suites (incl. new peerPostureIsShownAsReportedNotVerified: a software-key attestation still verifies, and its posture renders as reported) 65 tests pass
make docs-check, make docs-impact-check BASE=upstream/dev, make changelog-check pass

This touches libs/darkbloom-cluster, so the cluster CI jobs run. No live two-Mac pass was needed: only strings, comments and docs change.

Limitations

  • darkbloom cluster pair --status --json still prints the stored peerPosture without a "self-reported" marker (a JSON field; changing its shape is a separate decision).
  • Onboarding (darkbloom cluster) shows only the code, not the posture, before and after this change.

Security stack

No change to encryption, attestation verification, signing or weight hashes: the same checks run and the same fields are stored. Only what the screen claims changes.

Refactor pass

An independent refactor pass confirmed nothing reads the posture back, found that onboarding never displayed it (the first draft's docs and changelog said otherwise; corrected) and listed the remaining places that still called the other Mac's key a Secure Enclave key; those are fixed in the second commit.

🤖 Generated with Claude Code


Autofix with [code]smith
Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.

jonathan308 and others added 2 commits November 13, 2026 16:37
…erified

`ClusterPairingProvider.verifyAttestation` checks that the other Mac's
attestation is signed by the identity key it pairs with, binds this
ceremony's ephemeral key and is fresh. The signing key comes from the same
blob, so this proves possession of the key, not that a Secure Enclave holds
it: a software P-256 key passes with any claimed posture. The posture gates
nothing (it is shown, persisted and never read back), but
`darkbloom cluster pair` stated the other Mac's SIP, Secure Boot and
sealed-volume status and a "Secure Enclave key pin" as facts.

- Add `ClusterPairingTerminal.reportedPosture`, used by the pairing screen
  and the onboarding pairing event, which marks the posture "reported by the
  other Mac, not verified", and call the other Mac's pin a key pin. This
  Mac's own line still names its Secure Enclave key, which it knows.
- Say what is and is not verified in `ClusterPairingProvider`,
  `ClusterPairingPeerPosture` and the encryption architecture doc.

Binding the key to Apple hardware (for example App Attest over the ceremony
transcript) is a separate feature.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…e key

Refactor-pass follow-up. The "Paired" summary, the setup wizard and the
ceremony's proof-failure message still described the other Mac's key as a
Secure Enclave key, which pairing cannot know. They now say the key it pairs
with (or proved it holds); this Mac's statements about its own key are
unchanged. Docs and the changelog describe only what is shown: onboarding
drops the peer lines and shows the code alone, so only `cluster pair` and
the setup wizard show the reported posture. `verifyAttestation`'s doc says
`secureEnclaveAvailable` is the other Mac's own claim.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@vercel

vercel Bot commented Nov 14, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
d-inference-landing Ready Ready Preview Nov 14, 2026 4:56am UTC
darkbloom-status Ready Ready Preview Nov 14, 2026 4:56am UTC
eigen-homepages-darkbloom Ready Ready Preview Nov 14, 2026 4:56am UTC

Request Review

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…osture-is-self-reported

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…osture-is-self-reported

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
jonathan308 added a commit that referenced this pull request Nov 14, 2026
- changelog.d/gemma-tool-grammar-linear-optional-members.md: generic public text (#2111)
- changelog.d/updater-signed-version-matches-release.md: generic public text (#2117)
- changelog.d/cluster-pairing-posture-is-self-reported.md: generic public text (#2129)
- changelog.d/inbound-json-depth-and-tool-schema-budget.md: generic public text (#2130)
- changelog.d/coordinator-inbound-queue-budget.md: generic public text (#2135)
- changelog.d/toml-parse-memory.md: generic public text (#2138)
- changelog.d/cluster-link-key-keychain.md: generic public text (#2137)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@jonathan308
jonathan308 merged commit 8a206bd into dev Nov 14, 2026
26 checks passed

This branch was successfully deployed

3 active deployments
Preview – d-inference-landing — 32b8b518 Deployed Nov 14, 2026 by vercel[bot]
Preview – eigen-homepages-darkbloom — 32b8b518 Deployed Nov 14, 2026 by vercel[bot]
Preview – darkbloom-status — 32b8b518 Deployed Nov 14, 2026 by vercel[bot]
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