Releases: signed checksums (SHA256SUMS, SHA256SUMS.sig) for game and launcher releases
crates/horizon-release-sign signs a release's checksums with an Ed25519 key that exists only as a secret of the `release` environment, and checks them as launchers will, against the public keys built in from release-keys.txt. Dry runs sign with a throwaway key. Until release-keys.txt lists a key, releases keep going out with SHA256SUMS alone and a warning; once it does, a missing or unknown key fails the release before anything is published. tools/ci/new_release_key.sh pipes a new key straight into the secret and prints only the public key. ring and base64 are already in the lockfile. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -153,6 +153,38 @@ runs the game: GitHub's runners have neither a GPU worth the name nor the game f
|
||||
Kira posts every published release in #releases and pings the releases role only when the notes have a
|
||||
`### New` section.
|
||||
|
||||
### Signed checksums
|
||||
|
||||
Every game and launcher release carries `SHA256SUMS` (the archives' SHA-256, `sha256sum`'s format) and
|
||||
`SHA256SUMS.sig`: one base64 Ed25519 signature per line over `horizon release <tag>\n` followed by SHA256SUMS,
|
||||
so a signed list can't be reused under another tag. The publish job signs with
|
||||
`cargo run -p horizon-release-sign -- sign` (crates/horizon-release-sign), then checks the result the way
|
||||
launchers do, against the public keys built in from `crates/horizon-release-sign/release-keys.txt`:
|
||||
|
||||
- The private key is the `RELEASE_SIGNING_KEY` secret of the repository's `release` environment, which only real
|
||||
releases from main enter (`environment:` is empty in dry runs, which sign with a throwaway key). It is in no
|
||||
file, no log and no password vault; nobody needs to read it.
|
||||
- While release-keys.txt lists no key, releases go out with SHA256SUMS alone and a warning (today's releases keep
|
||||
working). Once it lists one, a missing secret or a key it doesn't list fails the release before anything is
|
||||
published, instead of publishing something launchers would refuse.
|
||||
- Making the key: `tools/ci/new_release_key.sh` pipes a new key from `horizon-release-sign keygen` straight into
|
||||
`gh secret set RELEASE_SIGNING_KEY --env release` and prints only the public key, which then goes into
|
||||
release-keys.txt by pull request.
|
||||
|
||||
**Rotating the key** (a new key every year, or at once if the old one may have leaked). The publish job signs
|
||||
with every key the environment holds, `RELEASE_SIGNING_KEY` and `RELEASE_SIGNING_KEY_NEXT`, and the two names take
|
||||
turns:
|
||||
|
||||
1. `tools/ci/new_release_key.sh <the empty name>` makes the next key; add its public key to release-keys.txt
|
||||
beside the old one. From then on every release is signed with both keys (one line each).
|
||||
2. Wait until launchers and servers built with both keys are in use (a few weeks: launchers update themselves).
|
||||
3. Delete the old key's secret (`gh secret delete <its name> --env release`) and its line in release-keys.txt.
|
||||
The next rotation makes its new key under the name just freed.
|
||||
|
||||
If the old key may have leaked, skip the wait: remove its public key from release-keys.txt at once and delete
|
||||
its secret. Launchers built before the new key cannot check releases signed only with it: they refuse to install
|
||||
them with a clear message, and players download the launcher again from the website once.
|
||||
|
||||
### Starting one by hand
|
||||
|
||||
```sh
|
||||
|
||||
Reference in New Issue
Block a user