Skip to content

Add backup encryption key rotation supportΒ #576

@Mystery-CLI

Description

@Mystery-CLI

πŸ”§ Title: Add backup encryption key rotation support

πŸ“˜ Description
backend/src/backup/manager.js encrypts backups with BACKUP_ENC_KEY. There is no mechanism to rotate this key, meaning a compromised key exposes all historical backups.

βœ… Acceptance Criteria

  • Add POST /api/backup/rotate-key endpoint (admin only)
  • Re-encrypt all existing backups with the new key
  • Store key version alongside each backup
  • Add BACKUP_ENC_KEY_PREVIOUS env var for decrypting old backups during rotation
  • Add tests for key rotation

πŸ”§ Context: backend/src/backup/manager.js; backend/src/routes/backup.js.


Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions