Skip to content

id: delayed ID-key rebind protocol — spec §4 (#3809) - #4885

Merged
dezren39 merged 1 commit into
mainfrom
queue/5815-3809-delayed-rebind
Nov 3, 2026
Merged

dezren39 merged 1 commit into
mainfrom
queue/5815-3809-delayed-rebind

Conversation

@dezren39

@dezren39 dezren39 commented Nov 3, 2026 •

Copy link
Copy Markdown
Member

Implements #2258 spec §4 (delayed ID-key rebind) in pkgs/id/src/hosted_binding.rs — slice 2 of #2852, gated by the #2046 ruling (30-day wait, CSE default ON landed in slice 1).

What lands

  • Fast path (§4.1) — rebind_with_old_key_authorization: old root key signs a rebind authorization over {binding_id, new_iroh_id, challenge_id} from a fresh §3 challenge; the new key proves possession via that challenge and countersigns the §4.4 record. Immediate on verification.
  • Delayed path (§4.2) — request_delayed_rebind: authenticated session + fresh challenge proof of the new key creates a request with effective_at = requested_at + 30 days (REBIND_WAITING_PERIOD_SECS, the id: design: ID serverless edition v1 (Cloudflare Workers) #2046 parameter — not chosen locally). The binding enters rebind_pending (service attestation regenerated); the old key keeps full control, and fresh ceremonies keep failing with the existing §3.4 RebindPending conflict for the whole wait — no bypass.
  • Notification & cancellation (§4.3) — request creation returns a RebindNotice naming the new key fingerprint, effective_at, and the cancellation method. cancel_rebind verifies the old key's signature over id-rebind-cancel/v1 || rebind_id; cancellation is final and a later request restarts the full wait. Old-key approval converts a pending request to an immediate fast-path rebind.
  • Publication (§4.4) — at effect, history is appended (old key never deleted; via = old-key-signature / delayed-rebind), the binding key is replaced and re-attested, indexes are updated, and a RebindRecord — service-signed over every field, countersigned by the new key over the transfer claim — is published and retained. Cancelled/effected requests are retained as the auditable history. verify_rebind_record checks a record offline against a pinned service key.
  • No failure path mutates registry state (new RebindError taxonomy).

Tests

cargo test --lib hosted_binding on the laptop: 21 passed (15 pre-existing + 6 new deterministic tests): delayed request/notice + pending bypass + second-request refusal; cancel restoring active and restarting the full wait; effect at effective_at with signed publication verified offline and the old key freed; fast path + forged-authorization rejection; approve-early conversion; expired-challenge rejection.

Refs #3809, #2852.


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

Fast path: old root key signs a rebind authorization over
{binding_id, new_iroh_id, challenge_id} from a fresh challenge and the
new key countersigns proof of possession — immediate on verification.
Delayed path: authenticated session + new-key challenge proof creates a
rebind request effective after the #2046-ruled 30-day wait; the binding
enters rebind_pending (re-attested) and keeps reserving the account, so
no fresh ceremony can bypass the wait. §4.3 notice artefact names the
new key fingerprint, effective_at, and the cancellation method; the old
key can cancel (id-rebind-cancel/v1 || rebind_id, final, a later request
restarts the full wait) or approve early, converting the request to the
fast path. At effect (§4.4) history is appended, the key is replaced,
the record is re-attested, and a rebind record signed by the service
and countersigned by the new key is published and retained; cancelled
and effected requests are kept as the auditable history.

Tests: 6 new deterministic tests cover the delayed request/notice and
pending bypass, cancel + full-wait restart, effect at effective_at with
offline-verifiable signed publication, the fast path and its forged-
authorization rejection, approve-early conversion, and expired-challenge
rejection. cargo test --lib hosted_binding: 21 passed on the laptop.
@dezren39
dezren39 requested a review from a team as a code owner November 3, 2026 12:24
@chatgpt-codex-connector

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 ⚠️ Failed 2026-11-03T12:24:57.143535Z
We couldn’t complete this review. Comment @codex review to try again.
957aed0 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.

@coderabbitai

coderabbitai Bot commented Nov 3, 2026

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 31 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 420d8ff4-f0d0-4bab-b714-0901987342b9
Commits

Reviewing files that changed from the base of the PR and between ceb4257 and 957aed0.

Files selected for processing: 1
  • pkgs/id/src/hosted_binding.rs
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

CodeRabbit Verify

  • Run CodeRabbit Verify to test the changes in this pull request.

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

@dezren39

dezren39 commented Nov 3, 2026

Copy link
Copy Markdown
Member Author

🤖 Agent note · merge disposition (task 5815)

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