Skip to content

feat: support update-signing key rotation - #201

Merged
nextestudios merged 1 commit into
mainfrom
feature/86-update-key-rotation
Sep 27, 2026
Merged

nextestudios merged 1 commit into
mainfrom
feature/86-update-key-rotation

Conversation

@nextestudios

Copy link
Copy Markdown
Owner

Summary

The update-signing key can now be rotated without breaking automatic updates (#86).

  • UpdateTrust holds a set of public keys (PublicKeysPem, max 4). Today it contains only the existing key (fingerprint 8b841b19…c64f3e8), so current behavior is unchanged.
  • ManifestVerifier accepts a manifest if any trusted key verifies the signature; keys that aren't ECDSA P-256 (curve OID check) or fail to import are never used; empty/oversized key sets, and signatures that aren't 64 bytes, are refused.
  • GitHubReleaseUpdateService: if no trusted key verifies the newest release, it checks up to 3 older releases (all still newer than the installed version) and offers the newest one it can verify — the transition release signed with the old key that already ships the new one. Only "unknown key" skips a release; tampered manifests or version mismatches still fail the whole check. Never a downgrade.
  • build/New-ReleaseManifest.ps1 verifies the CI signature against all keys in UpdateTrust.cs and prints the fingerprint that signed.
  • New docs/decisions/0006 with the maintainer procedure: generating a key (PowerShell), recommended backup key (public key pre-published, private kept offline), planned rotation (transition release → switch secret → remove old key), leaked key and lost key. 0005, security-model.md and AGENTS.md point to it. No private key is generated or committed.

Tests (CI)

  • Manifest_signed_by_either_trusted_key_is_accepted_and_any_other_key_is_refused (acceptance criterion; also P-384 key and empty set refused).
  • After_a_key_rotation_an_old_copy_takes_the_newest_release_it_can_verify_and_never_an_older_one (stepping stone + no downgrade).
  • Official_keys_are_distinct_p256_keys_and_still_include_the_one_every_installed_copy_trusts (replaces the single-key test; tripwire against dropping the original key by accident).
  • Existing update tests (tampering, other key, replay, missing signature, hosts, hash) unchanged.

Manual / maintainer

  • Optional but recommended: generate a backup key and add its public half (procedure in 0006). Not done here because the private key must be created and stored by the maintainer.
  • The CI script change runs only in the release workflow (not exercised by PR CI).

Closes #86

🤖 Generated with Claude Code

@nextestudios
nextestudios force-pushed the feature/86-update-key-rotation branch from 1f5480a to d5184f4 Compare September 27, 2026 22:18
@nextestudios
nextestudios merged commit 8b1e02f into main Sep 27, 2026
1 check passed
@nextestudios
nextestudios deleted the feature/86-update-key-rotation branch September 27, 2026 22:21
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.

security: support update-signing key rotation

1 participant