Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Key and secret rotation

Every credential in ZERG has an owner, a storage location, a rotation procedure, and a verification step. Rotate one class at a time and verify readiness after each.

Inventory

SecretUsed byStorageRotation impact
ZMQ CURVE server keySol ROUTER/PUB<data_dir>/curve_server.cert (auto-generated)All workers must trust the new key; coordinate a fleet window
Worker enrollment keysSol ↔ Luna READYzmq_enrollment_keys / wild provisioningPer-worker; rotate one worker at a time
Fleet secret (legacy)Sol ↔ LunaSOL_ZMQ_WORKER_SECRETOnly valid while zmq_fleet_legacy_compat is open; do not use for new fleets
Mango bridge HMACMango → Sol eventsMANGO_BRIDGE_HMAC_SECRET on both sidesRestart the bridge; replay window rejects stale frames
Mango audit chain keyMango audit rowsMANGO_AUDIT_CHAIN_SECRET (+ prior keys)Keep prior keys for verification across the boundary
Sol audit HMACSol audit JSONLaudit_hmac_secretKeep the old key available to verify historical logs
Provider keysSol provider poolEnv (api_key_env) or encrypted pool (provider_keys.bin)Add new key, drain old key, then remove
TLS certificatesOpenResty / Mango edgewild-managedReload the proxy; verify with openssl s_client
Minisign release keyRelease artifactswild /fun/secrets/minisign + ci/minisign-pub-fingerprintRelease-act change: update pin, status, expiry together

Procedure (generic)

  1. Stage the new secret without removing the old one.
  2. Restart or reload the consumer and confirm it is using the new value (log line or metric).
  3. Verify the dependent path end-to-end (worker READY, event delivered, login succeeds, artifact verifies).
  4. Remove the old secret after the verification window.
  5. Record the change in the audit log and the release notes.

Specific notes

CURVE: a worker that cannot verify the server key fails closed. Never disable CURVE to “fix” a rotation; fix trust. Enrollment keys: a key bound to a worker_id cannot register as another worker. Revoke first, then re-provision. Audit chains: verification accepts prior keys by epoch; a missing prior key produces a typed verdict, not a false pass. Provider pool: the pool file is part of the data-dir backup scope. A corrupt store fails open loudly — treat it as an incident. Minisign: rotation is a reviewed release commit; a lapsed expiry fails the release lane.

Verification checklist

[ ] zerg doctor is green. [ ] zerg zmq-workers shows the expected fleet. [ ] A task completes end-to-end. [ ] /ready passes. [ ] Audit verification passes (/api/v1/audit/verify for Sol; Audit.verify_integrity for Mango). [ ] The old secret is removed from the host and the backup scope is updated.

Next

Security model ZMQ security Audit retention Release process