Skip to content

Conversation

@osiastedian
Copy link
Collaborator

Implements automated encryption key rotation for 2FA secrets using a docker-compose sidecar container with cron scheduling.

Features:

  • Monthly automated key rotation (1st of month at 2 AM UTC)
  • Automatic API container restart after rotation
  • Comprehensive logging and audit trail
  • Docker socket access for container management
  • Configurable schedule via crontab

Files added:

  • docker/cron/Dockerfile: Cron container image
  • docker/cron/crontab: Monthly rotation schedule
  • docker/cron/rotate-key-cron.sh: Rotation script wrapper
  • docker/cron/docker-compose.cron.yml: Service definition
  • docker/cron/README.md: Setup and troubleshooting guide

Security:

  • Read-write access to .env.api for key updates
  • Read-only docker socket access for restarts
  • Automatic backups before rotation
  • Rotation logs persisted to host

Related to: Encryption key management implementation (CRIT-001)

Implements automated encryption key rotation for 2FA secrets using
a docker-compose sidecar container with cron scheduling.

Features:
- Monthly automated key rotation (1st of month at 2 AM UTC)
- Automatic API container restart after rotation
- Comprehensive logging and audit trail
- Docker socket access for container management
- Configurable schedule via crontab

Files added:
- docker/cron/Dockerfile: Cron container image
- docker/cron/crontab: Monthly rotation schedule
- docker/cron/rotate-key-cron.sh: Rotation script wrapper
- docker/cron/docker-compose.cron.yml: Service definition
- docker/cron/README.md: Setup and troubleshooting guide

Security:
- Read-write access to .env.api for key updates
- Read-only docker socket access for restarts
- Automatic backups before rotation
- Rotation logs persisted to host

Related to: Encryption key management implementation (CRIT-001)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant