Skip to content

Replace the maintainer release key and keep signing off the public server #186

Open

Description

@andersalm

Part of #173 (isolation plan).

The maintainer release key signs release-head.json and release.json. Through the hashes in those files it vouches for the Runtime binaries, the bundled capsules and the component downloads (Kubo, FFmpeg, llama.cpp bundles, VM image) at install and update. Installed Homes trust exactly one publisher DID (elastos/crates/elastos-server/src/update.rs:92-96), and no code path changes it during an update.

Checked 1 October: the current maintainer key was stored on the public seed, in the account that also ran the public Home and other services. There is no evidence of misuse, but a copy cannot be ruled out. Anders decided on 1 October to replace the key (clean break): existing Homes re-trust once through an explicit step. Details are in the private seed record (#83). install.sh carries the only trust anchor for new installs (the stamped DID), and the gateway serves it from the Publisher folder in the Runtime's data dir (elastos/crates/elastos-server/src/api/gateway_site.rs:150-180), where a process running as the Runtime account can rewrite it. A v* tag publishes a GitHub Release without a check that the tag is on main, and .github/workflows/ci.yml uses Actions by tag, not by commit SHA (#158 fixes both). The model catalog signer is a different key and was not found on the seed.

Done means

  • Moved to After 0.8.0: dedicated signing machine or account with a protected recovery copy (Release key custody after 0.8.0 #476; decision, Anders 19 Oct).
  • Signing never runs candidate code with the key. Today scripts/publish-release.sh:2434 runs the candidate elastos binary with the key path. A separate, pinned signing tool signs only artifact hashes built from an approved version tag on main for stable/live releases. Under the approved canary decision, canary source and the installed signing tool come from reviewed, CI-green commits already merged into develop; protected operator policy and fixed branch ancestry bind the admission. A stable-channel set built only from develop is refused. Code: scripts/release-signer.py; refused-case suite: scripts/release-signer-test.py, run by the existing CI source gate through python3 scripts/release-platform-input-test.py. Test: a candidate that tries to read the key gets nothing; a tampered artifact and a local-only commit are refused.
  • The canonical elastos publish-release supports an approved signer change (today only the shell script has --allow-signer-rotation). Test with old and new signer fixtures.
  • The Carrier delivery identity stays separate from the signer identity. A fresh Home finds the new release while the signing machine is offline. Test: a fresh Home finds the new release while the signing machine is offline.
  • One documented re-trust step for existing Homes: re-run the publisher's install.sh over the existing install (decision 5 Oct on G1 Install and update: Signed update #89; elastos update names this step when it refuses the new key). It keeps identity, accounts, channel and data. Tests: the installer re-trust and interruption tests (PR Route install.sh through the shared installation writer #244), the next update accepted, and a release signed by the old key refused afterwards.
  • The new DID is published on GitHub (README) before anyone runs the new installer . The docs explain how to compare it, which error an un-migrated Home shows, and that a Home that does not re-trust stays exposed to the old key. Proof: one fresh install and one existing-Home re-trust, both done by a person.
  • Every place that pins the old DID is updated: install.sh, scripts and tests that hard-code it (for example scripts/install-bootstrap-test.py:36, scripts/home-frontdoor-smoke.sh:13), and docs. Proof: a repository search finds the old DID only in historical signatures; model and capsule use survives a restart.
  • All old key copies are removed from the seed and its backups; the seed holds only the signed publication set. Proof: private file listing on G2 Getting connected: Seed safe and reliable #83. Removal from an SSD is not claimed as secure erasure. Proof: Replace the maintainer release key and keep signing off the public server #186 (comment)
  • The release notes of the first release signed by the new key say why the key changed and give the re-trust step (with State actual isolation in docs, manifests and release notes #170).
  • release.json carries the installer's SHA-256. The gateway serves install.sh, release-head.json, release.json and artifacts only when they match the signed publication set. Test: changing install.sh on disk makes the gateway refuse to serve it.

Community profile signing separation — Anders, 9 October 2026

Community profile signing has its own Draft PR #334 under this issue. The separate source carries the operation from commit 6e00d302238a99dcf97fac5622d9ca6b8c11747c; #309 remains the sole Chat PR. Anders owns the signing scope, and OMP integrates/releases through the protected custodian process.

The prepared operation signs initial Community profile inputs with the approved maintainer DID in the separate elastos.collaboration-network.profile.v1 domain. It reuses the pinned OpenSSL backend, protected policy and exact approved unsigned input hashes. Normal merge b6a582a74b129b40eaa6c19ff3aa7aed24a901fa, tree 53a7d46e91a9b93feff907731b18296f02688b7b, brings this source onto approved develop 792942b54a0383c1c484e22e5d076fcde33c7fc4. The branch is clean, zero behind and four ahead of develop; its three earlier commits remain intact. All four signing files are byte-identical to independently reviewed 97fb63bb. Current local verification passes 57 disposable-fixture signing tests, 102 product-data tests, product-data validation, both formatting checks and diff checks. The first signing-test invocation correctly refused an interpreter with an unprotected ancestor; the unchanged suite passes with an existing protected interpreter (eccc5104), and the false result remains retained. Runtime release-pin support remains a separately reviewed integration prerequisite. The ordinary canonical publication hook passed on this exact source with the existing protected interpreter: 2,845 Rust test executions passed, zero failed and 27 were ignored. The publication receipt is f44db23685e5e71dc3c9a4438ab20afd3113ce7010b397a3ee2cce574b25e6c4. The remote head is verified at b6a582a74b129b40eaa6c19ff3aa7aed24a901fa, and the branch is zero behind and zero ahead of its remote. PR #334 targets develop and stays Draft with review requests off; the required human review of the exact candidate remains pending. The owned hook process and shared build leases are released.

The existing custody, signer rotation and release gates above stay in force. Production bootstrap/profile/release-pin inputs and exact signing/activation approval remain with #86 and the operator. The source separation is published for review; production signing follows the approved custodian gate.

Activity

  1. added this to the 0.7.2 milestone on Oct 1, 2026
  2. andersalm commented on Oct 1, 2026

    @andersalm
    ContributorAuthor

    Checked 1 October: the identity of each key file on the seed was derived on the seed itself; no key was copied. The result is in the private seed record (#83). A rotation decision by Anders is needed before the key is moved.

  3. changed the title [-]Seed: keep the release signing key off the public server[/-] [+]Replace the maintainer release key and keep signing off the public server[/+] on Oct 1, 2026
  4. andersalm commented on Oct 2, 2026

    @andersalm
    ContributorAuthor

    #186's next code subset is coherent after #170 reaches QA; its approved PR target is develop and shared packaging edits follow #170 integration.
    The trusted offline tool will own signing; candidate artifacts remain inert, and tests use public fixtures plus a fake signer without private key material.
    Re-trust will preserve channel, ticket, gateways and installed state; signer rotation will require an explicit operator choice and validate the public DID.
    #160 still owns update.rs, install.sh and ci.yml; those edits wait for integration, and #158 already owns Action pins and tag-ancestry checks.
    The installer must be rendered before signing to avoid the head/hash cycle, then served as the exact verified signed-set bytes; Anders retains custody and person-run proofs.

  5. andersalm commented on Oct 2, 2026

    @andersalm
    ContributorAuthor

    #186 begins its independent re-trust code concern from approved develop c7cc98048e6f43bbc8382881a77c239cf95f104b (tree ffd00209).
    #170 is in QA as draft #199; the source/CLI change will preserve channel, install path, ticket, gateways and installed state on signer replacement.
    Public-DID refusal and cancellation/restart tests use isolated records; agents handle no private key material or real Home mutation.
    Signing-tool and shared publication changes follow #170 integration; update.rs, install.sh and ci.yml wait for #160, with #158 owning workflow pins/tag ancestry.
    Anders retains key custody, new-DID publication and person-run proofs; this code task preserves seed, main, tags, releases and #160's branch.

  6. andersalm commented on Oct 2, 2026

    @andersalm
    ContributorAuthor

    Re-trust source is prepared from develop c7cc980; the signing and installer concerns remain separate dependencies.
    source add keeps omitted channel, install path, ticket, gateways and delivery fields, and confirms a replacement with the exact canonical public DID.
    The first narrow run passed 10 source tests and the CLI parser test; a focused audit corrected the old-signer regression, which is now awaiting its final rerun.
    The fixture uses public verification data and proves cancellation preserves file bytes; installed restart and person-run acceptance remain open.
    Shared publication code follows #170 integration; update, installer and CI work follows #160, with #158 owning the Action pins and tag guard; Anders keeps custody and key proofs.

  7. andersalm commented on Oct 2, 2026

    @andersalm
    ContributorAuthor

    Prepared local commit 036763f (tree 0e8f246ab0dcbab106ae574cc0f457d9635998a2) from current develop; the branch is clean and one unpublished commit ahead.
    Re-trust preserves omitted source settings, confirms the exact canonical new public DID, and replaces the release signer list with one DID.
    Proof: 10 source tests, the CLI parser test, server Clippy on all targets and all four basic gates passed; focused review corrected the old-anchor refusal test.
    Tests cover file reload, valid public signature acceptance and old-anchor rejection before signature validation; an installed restart and person-run acceptance remain open for Anders.
    Next independent concern is the pinned signer boundary; shared publication follows #170, update/installer/CI follows #160, and #158 owns Action pins and the tag guard; key custody remains unchecked.

  8. andersalm commented on Oct 2, 2026

    @andersalm
    ContributorAuthor

    The next #186 code concern is a separately installed, hash-pinned signer that reads candidate artifacts as data and uses only its trusted signing backend.
    Admission uses fixed GitHub HTTPS endpoints to prove the exact remote tag, commit/tree and ancestry in main, plus an artifact-manifest digest supplied by the operator outside candidate staging.
    The tool validates and snapshots artifact bytes before signing; refused tests use injected HTTPS and a fake backend, with public signature fixtures for encoding checks.
    Render the tagged installer first with blank HEAD_CID and the existing verified gateway bootstrap; its exact SHA-256 belongs in release.json before release/head signing, avoiding a hash cycle.
    The standalone concern can proceed now; shared publishing follows #170, update/installer/CI follows #160, and #158 retains tag-job and Action-pin ownership; Anders owns keys and person-run proofs.

  9. andersalm commented on Oct 2, 2026

    @andersalm
    ContributorAuthor

    The re-trust commit 036763f remains a clean local concern; the standalone signer source is being prepared separately.
    An independent OpenSSL 3.6.3 public-key check accepted the existing release fixture over the canonical domain-separated digest and refused a changed digest.
    This check used public signature, public key and digest files only; its temporary files were removed, and it proves encoding compatibility rather than real signing or custody.
    The signer admission tests use injected HTTPS and a fake backend; trusted policy limits and streamed snapshots will preserve the signing volume's 15% free-space floor.
    Shared publishing follows #170, update/installer/CI follows #160, and #158 owns workflow pins/tag guards; Anders's key and person-run proofs stay unchecked.

  10. andersalm commented on Oct 2, 2026

    @andersalm
    ContributorAuthor

    The standalone signer draft passed 23 fake/public-only tests and the basic gates; focused audit strengthened TLS authority, descriptor-bound reads and signer-owned temporary storage.
    Compatibility review found that the existing publisher uses UnixFS dag-pb CIDs, size-bearing release descriptors, checksum/release-path component refs and a model-catalog head pin.
    The tool is being adjusted to preserve approved CID identities and verify the current signed descriptor shapes, with realistic refused-case fixtures; the raw-only draft is held from commit.
    Release/head metadata must also match the publisher's actual import CID before shared integration is accepted; this work adds no provider operation or public route.
    PR #199 remains in CI, #160 still owns update/installer/CI dependencies, and #158 owns workflow pins/tag checks; all key and person-run proofs remain with Anders.

  11. andersalm commented on Oct 2, 2026

    @andersalm
    ContributorAuthor

    Independent #186 code is now draft PR #201, candidate 1e6cb19c652b240bffa357bdc99f8c93147130b4, targeting develop.
    Explicit source re-trust preserves existing settings; the pinned custodian tool snapshots approved data and keeps candidate code outside the signer process.
    Ten re-trust/channel tests, one parser case, Clippy and basic gates pass; the existing CI release-input suite runs 32 cases plus the 29 public/fake signer regressions named above.
    A deterministic disk fixture corrected the host-space-dependent test failure; the production 15% guard and its low-disk refusal remain, and completed browser caches were removed.
    The draft waits for #170 publisher integration and #160 update/installer/workflow integration; #158 owns pins/tag guards, while all key, new-DID and person-run acceptance remains with Anders.

  12. andersalm commented on Oct 2, 2026

    @andersalm
    ContributorAuthor

    2 October: until the new key exists, no release is published through the signed installer or update channel; 0.7.2 ships as developer builds on GitHub, like 0.7.1. Where the new key is kept is decided later, before the first signed release.

  13. andersalm commented on Oct 2, 2026

    @andersalm
    ContributorAuthor

    2 October: the new maintainer key was created on Anders's Mac, not on the seed. Public DID: did:key:z6MkgwHd2BCWe1jHMXPiR6H1q1RFPcv1YzhMbK5G1kBarbfe
    Custody is temporary: the key is in a private folder on that Mac, readable only by Anders's user account; agents are told never to read it, and signing runs there only with Anders's approval per publish. A recovery copy and stronger custody remain open in this issue. It is used first for the staged install and update in #89; the live install.sh switches to it only after that passes.

  14. andersalm commented on Oct 2, 2026

    @andersalm
    ContributorAuthor

    #186/#201 now owns #89’s staged release work; draft PR201 targets develop at 55d28647b1e0dc37b920c38be98c8bd6acafbb42 (tree 95f7ca64a798a6fde2cab742ef8448b702747324), clean with remote divergence 0/0.
    Key-free Mac preparation, the separate signer, new public-DID pins and exact stdout/empty-stderr installer admission are pushed; source re-trust preserves existing settings.
    Proof: 45 release-input tests, 29 nested signer cases, 40 executable refusal combinations and focused layout checks pass; basic gates pass; CI37020330436 is active after correction of six Rust test records.
    Remaining code: signed snapshot intake, explicit public-pin rotation, CID-preserving import and transactional signed-set serving; M1/M2 keep today’s metadata paths under #89’s latest decision.
    Resume with completed CI results and that publication concern; Anders retains custody, signing, seed publication and Mac M1/M2 proofs, which stay unchecked.

  15. 3 remaining items

  16. andersalm commented on Oct 2, 2026

    @andersalm
    ContributorAuthor

    Decision by Anders (2 October, 19:35 UTC): test-channel (canary) releases may be signed from reviewed develop builds instead of tags on main. Canary builds come from commits already merged into develop (reviewed, CI green); the signing tool is installed from such a commit. The operator still signs and publishes each canary release with Anders's approval. The live channel and the live install.sh keep the strict rule: signing only from version tags on main (M3 onward). Release session: adjust #201's signer admission and the M1 handoff to allow the canary/develop case while keeping stable/main strict, with a refused-case test that a stable-channel set built from develop is not signed.

  17. andersalm commented on Oct 3, 2026

    @andersalm
    ContributorAuthor

    The operator’s V1 report adds two release-side observations; #186 stays open for its remaining custody and installed gates.

    • In the accepted source, signed import creates its scratch parent with the process umask, then correctly refuses a writable snapshot parent. The revised runbook uses umask 077; an explicit mode-0700 creation and a child-process umask-0002 regression remain the product repair.
    • The post-commit gossip path selects serve coordinates, while gateway control exposes peer ticket retrieval. Direct Carrier head discovery reads the committed Publisher receipt/files, so source inspection supports proceeding with plain pull M2; actual operator apply remains the proof. Gateway gossip selection, authorized operations and response checks remain open here.
  18. andersalm commented on Oct 3, 2026

    @andersalm
    ContributorAuthor
    • PR231 Opus PASS leaves a broader Home follow-up: lifetime is selected by Runtime command, so source Home launchers using Gateway keep Kubo running; a User-role provider sharing that root can still idle-stop it. Shared per-root ownership belongs with UP-02: Stage one complete release #108 before broader Home promotion, and the weekly release notes should record the command-based lifetime change.
  19. andersalm commented on Oct 5, 2026

    @andersalm
    ContributorAuthor

    Un-migrated Home error, seen live (Deployment QA, 5 Oct 13:48 UTC, Linux x86_64, installed published 0.1.2, sha256 f6da8ce7…):

    $ elastos update --check
    ElastOS Update v0.1.2
      Installed release: 0.1.2
      Checking for updates...
      Bootstrap: direct publisher ticket configured
      Fetching release head: QmaJpTr42WuV...
    Error: Signer DID mismatch: trusted set = ["did:key:z6MkrFPDgDi98Ek6AFHM3VT9bVJytnDf5mfHAV6gyrD5frYj"], got did:key:z6MkgwHd2BCWe1jHMXPiR6H1q1RFPcv1YzhMbK5G1kBarbfe
    

    upgrade --check gives the same, exit 1. source verify still passes against the old local metadata (0.1.2, QmVLFNQf…). The old key's release is refused, as planned. This is the text the docs item above should show, plus the re-trust step. On 2 Oct the same check worked (0.1.2 → 0.7.1). The new DID is in the develop README but not yet in main. No apply was run. Linux installer gap filed separately as #237.

  20. self-assigned this
    on Oct 6, 2026
  21. andersalm commented on Oct 7, 2026

    @andersalm
    ContributorAuthor

    Retired maintainer key did:key:z6MkrFPD… removed from the public seed (7 Oct, shredded; a search of the seed found no other copy). Anders keeps one offline copy on the operator Mac, verified to derive that DID. No current code or service used it.

  22. modified the milestones: 0.7.2, 0.8.0 on Oct 7, 2026
  23. andersalm commented on Oct 16, 2026

    @andersalm
    ContributorAuthor

    Ticked with proof (15 Oct): old DID pins removed: git grep z6MkrFPD origin/develop finds nothing; release notes: CHANGELOG [0.8.0] says releases are now signed with a new key (#186) and gives the re-trust step (run the install command once). The README box ticks when #375 merges (develop README:46 has the new DID; main does not yet); the offline-signing-machine box is proven at publication.

  24. andersalm commented on Oct 16, 2026

    @andersalm
    ContributorAuthor

    Remaining for 0.8.0 (15 Oct 22:45 COT; final candidate alpha.21 = alpha.20 + automatic Community recovery; plan #93 6207232773): the README box ticks when #375 merges; 'a fresh Home finds the release while the signing Mac is offline' is proven at publication; the custody recovery-copy proof stays private (#83).

  25. andersalm commented on Oct 17, 2026

    @andersalm
    ContributorAuthor

    Signing procedure for 0.8.0-alpha.23 and 0.8.0 (17 Oct). Anders delegated signing of qualified inputs to Codex (#93, comment 6230201539).

    ~/.local/share/elastos-ops/sign-release.sh VERSION N:

    1. Reads the approved source commit from the approval file.
    2. Checks that the release worktree is clean and at that commit.
    3. Installs scripts/release-signer.py from that commit as a read-only file, after a byte-for-byte SHA-256 check.
    4. Writes the signing policy (release-publish.sh policy).
    5. Runs the pinned signer under env -i.

    OpenSSL 3 reads the maintainer key file. The signer shows source, builder, publisher and approval, and asks for the DID. The operator (Anders or the Codex session) sees only public identity, signatures and receipts.

    Box 1 stays open. The key is a file in ~/.local/share/elastos-canary-custody/ on Anders's Mac, where AI agents run as the same user. Neither this procedure nor the delegation proves that no AI agent can read the key. A dedicated signing machine or account is still required for this box.

  26. andersalm commented on Oct 20, 2026

    @andersalm
    ContributorAuthor

    Decision (Anders, 19 Oct): keep signing simple for 0.8.0. alpha.25 and 0.8.0 are signed exactly as alpha.24 was: Anders runs sign-release.sh on his Mac, with the key file in his account.

    • Box 1 (key unreadable by AI agents, with a recovery copy and restore test) moves to after 0.8.0.
    • Known risk, accepted for now: AI agents run as the same macOS user and could read the key file. The signer's checks (approved CI-green source, pinned signer, env -i) limit what the procedure signs, but they do not stop a direct read of the file. If the key leaks, every Home has to re-trust a new key once more.
    • Direction after 0.8.0: sign through dKMS, so no single machine holds the whole key (threshold signing by the dKMS operators; see the design on After 0.8.0: Rebuild protected content on develop as a layered stack (successor of #203–#206) #388). This replaces the dedicated-signer-account plan if the design holds.
    • Irzhy: for awareness (security owner).
  27. modified the milestones: 0.8.0, 2.1.0 on Nov 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions