Skip to content

Add encrypted secure backup export#942

Open
alceops wants to merge 1 commit intorohitdash08:mainfrom
alceops:alceops/secure-backup-export
Open

Add encrypted secure backup export#942
alceops wants to merge 1 commit intorohitdash08:mainfrom
alceops:alceops/secure-backup-export

Conversation

@alceops
Copy link
Copy Markdown

@alceops alceops commented Apr 25, 2026

Summary

  • Adds authenticated POST /auth/me/backup/export for encrypted, user-scoped backups covering categories, expenses, recurring expenses, bills, and reminders.
  • Uses passphrase-derived Fernet authenticated encryption (random salt + PBKDF2-HMAC-SHA256) and records an encrypted_backup_exported audit event without returning/logging plaintext.
  • Adds a Redis in-memory fallback so auth/cache flows continue in local/free-tier environments when Redis is unavailable.
  • Documents the endpoint and adds regression tests for encrypted export, weak passphrase rejection, wrong-passphrase rejection, and existing auth behavior.

Verification

  • PYTHONPATH=. ../../.venv/bin/pytest tests -> 25 passed

Closes #126

@alceops alceops requested a review from rohitdash08 as a code owner April 25, 2026 00:50
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.

Secure backup & encrypted export options

1 participant