Skip to main content
Every daemon release ships a manifest listing the release’s version, its security floor, and the SHA-256 of each tarball and the custosd binary inside it. CI signs the manifest with an Ed25519 key. Hosts only install a release whose manifest verifies against a public key compiled into custosd, so this key, not the control plane or the release host, decides what runs as root across the fleet.

One-time setup

  1. Generate the key on a trusted machine:
    It prints CUSTOS_RELEASE_SIGNING_KEY=... (private) and public key: ....
  2. Store the private key as a secret named CUSTOS_RELEASE_SIGNING_KEY in the prod GitHub Actions environment. Do not keep other copies; if it is lost, rotate (below).
  3. Trust the public key by adding it to internal/release/keys.go:
  4. Release as usual. The workflow fails if the secret is missing or its key is not in TrustedKeys, so a release the fleet would reject is never published.
Hosts running a daemon from before signing take one unsigned update to reach the first signed release; every update after that is verified.

Security floor

SECURITY_FLOOR at the repo root holds the floor for the next release. Raise it, in the same change as the fix, when a release fixes a vulnerability that downgrades must not reintroduce:
Leave it alone for ordinary releases. A host’s floor only ever rises, and downgrades above it keep working. The floor must not exceed the version being released.

Rotating the key

  1. Generate a new key and add its public key to TrustedKeys alongside the old one.
  2. Release with the old key still in the secret, and roll it out to the fleet.
  3. Replace the secret with the new key.
  4. Once every host runs a release that trusts the new key, remove the old public key and release.

If the private key leaks

Anyone holding it can sign a release that hosts will install as root once the control plane pushes it, or that a host’s custos user stages.
  1. Generate a new key and make its public key the only entry in TrustedKeys.
  2. Raise SECURITY_FLOOR to the version of this emergency release.
  3. Release it signed with the old key, which is the only one hosts trust yet: set the prod environment variable CUSTOS_RELEASE_RETIRING_KEY=true so CI accepts a signing key that is no longer in TrustedKeys. Upgrade the fleet. Once a host installs it, old-key signatures and every older release are refused.
  4. Replace the secret with the new key and delete CUSTOS_RELEASE_RETIRING_KEY.
  5. Audit hosts for binaries installed outside your releases: custosd status, and compare /usr/local/bin/custosd with the published digests.