Key Rotation and Compromise Response Runbook¶
Purpose: - Standardize rotation and emergency response for JWT/JWKS, terminal token signing, and provisioning control-key material.
Scope¶
- Keycloak/JWKS signing keys
- Terminal token signing/encryption material
- Provisioning control keys (KMS/env/file sources)
- Envelope encryption keys (
ENVELOPE_KEY_ID/ENVELOPE_KEY_B64)
Rotation Cadence (Baseline)¶
- JWKS signing keys: every 90 days or provider policy, whichever is stricter.
- Terminal token/envelope keys: every 90 days.
- Provisioning control keys: every 60-90 days with overlap window.
Planned Rotation Procedure¶
- Prepare new key material and register with provider/secret manager.
- Deploy overlap configuration:
- keep old + new keys active.
- set preferred key id to new value.
- Validate:
- auth/token verification succeeds on new key.
- terminal token mint/consume works.
- provisioning SSH paths work with new control key id.
- Remove old key after stable window and verification checks.
- Record execution evidence in
doc/operations/evidence/secrets_key_ops.md.
Emergency Compromise Response¶
- Declare incident severity (
SEV-1for active compromise risk). - Rotate compromised key immediately and revoke impacted sessions/tokens.
- Execute JWKS force refresh endpoint per break-glass runbook:
POST /internal/auth/jwks/refresh- Confirm deny-list and revocation paths are active for admin tokens.
- Validate service health and auth/provisioning/terminal flows.
- Publish stakeholder update + timeline and complete post-incident actions.
Verification Checklist¶
- All API instances refreshed/rotated and healthy
- Auth rejects compromised/retired key material
- Terminal and provisioning key paths operational after rotation
- Evidence captured with timestamps and owners
References:
- doc/operations/runbooks/JWKS_Compromise_Breakglass_Runbook.md
- doc/operations/KMS_Control_Key_Source_Guardrails.md
- doc/operations/evidence/secrets_key_ops.md