Back to all reviewers

Plan encryption key recovery

gravitational/teleport
Based on 3 comments
Other

Always implement recovery mechanisms and plan for key rotation when designing encryption systems. Encryption key failures, compromises, or rotation issues can lead to permanent data loss or service disruption.

Security Other

Reviewer Prompt

Always implement recovery mechanisms and plan for key rotation when designing encryption systems. Encryption key failures, compromises, or rotation issues can lead to permanent data loss or service disruption.

Key recovery strategies include:

  • Recovery keys: Implement backup keys (HSM or software-based) that can decrypt data if primary keys are lost or destroyed
  • Multiple encryption layers: Generate per-session software keys, encrypt data with them, then encrypt the software keys with HSM keys - this allows selective key revocation without re-encrypting all data
  • Consistent key access: Ensure all service replicas access the same encryption keys to prevent inconsistent encryption/decryption capabilities
  • Rotation planning: Avoid static key configurations that appear to work initially but break during automatic key rotation cycles

Example configuration showing recovery key setup:

auth_service:
  session_recording_config:
    encryption:
      enabled: yes
      recovery_key: "backup-hsm-key"
      key_rotation_policy: "automatic"

Without proper key recovery planning, a single HSM failure or incorrect key deletion can make all encrypted session recordings permanently inaccessible, creating both security and compliance risks.

3
Comments Analyzed
Other
Primary Language
Security
Category

Source Discussions