This runbook defines how to rotate and revoke policy-signing keys used by AegisBPF signed policy bundles.
- Keep private keys outside hosts (KMS/HSM or offline signer).
- Trust only root-owned public keys on hosts.
- Enforce monotonic
policy_versionto block rollback bundles. - Treat key add/remove operations as security-change events with two-person review.
- Trusted public keys are loaded from
/etc/aegisbpf/keys(orAEGIS_KEYS_DIRin tests/dev). - Policy bundles include a monotonic
policy_version. - Anti-rollback enforcement uses
/var/lib/aegisbpf/version_counter(orAEGIS_VERSION_COUNTER_PATHin tests/dev).
- Generate a new Ed25519 keypair offline and store the private key in a secure signer/HSM.
- Distribute the new public key to each host:
sudo aegisbpf keys add /path/to/new-key.pub
- Sign the next policy with the new private key.
- Apply with signature enforcement:
sudo aegisbpf policy apply /path/to/policy.signed --require-signature
- Verify the fleet accepts signed bundles with the new key.
- Remove the old public key from
/etc/aegisbpf/keys/after cutover.
- Remove compromised key files from
/etc/aegisbpf/keys/on all hosts. - Apply an emergency policy bundle signed by a non-compromised key.
- Verify anti-rollback remains monotonic:
- New bundle version must be greater than the current version counter.
- Audit recent policy apply events and key changes in SIEM.
For environments where private keys must stay inside KMS/HSM:
- Implement a signer command that reads a payload from stdin and outputs a 128-char Ed25519 signature hex string.
- Generate signed bundles via:
scripts/sign_policy_external.sh \ --policy /etc/aegisbpf/policy.conf \ --public-key /etc/aegisbpf/keys/signer.pub \ --output /tmp/policy.signed \ --sign-command 'your-kms-sign-wrapper' - Deploy with signature enforcement:
sudo aegisbpf policy apply /tmp/policy.signed --require-signature
Back up and protect:
/etc/aegisbpf/keys//var/lib/aegisbpf/version_counter/var/lib/aegisbpf/policy.applied*
After restore, run:
sudo aegisbpf health --jsonand verify signed policy apply succeeds.
- Rotate signing keys at least every 90 days.
- Run a revocation drill at least once per quarter.
- Require two-person review for key rollout/revocation changes.
Quarterly CI drill (.github/workflows/key-rotation-drill.yml) publishes:
artifacts/meta-security/key-rotation-summary.jsonartifacts/meta-security/capability-contract-report.md
Treat both artifacts as required evidence for release-impacting security reviews.