feat: add encrypted export with password-protected ZIP (Closes #48) #97

Merged
shahondin1624 merged 1 commits from feature/issue-48-encrypted-export-password-protected-zip into main 2026-04-07 14:55:26 +02:00
Owner

Summary

  • Add EncryptedExportService that wraps CSV exports in AES-256 password-protected ZIP archives using PHP's ZipArchive
  • New POST endpoints for encrypted exports: members, fees, birthdays, and banking data
  • Banking data export (/export/banking/encrypted) requires canSeeBanking permission, exports decrypted IBAN/Kontoinhaber
  • Add exportBankingList() to CsvExportService with family banking data and member associations
  • Password validation (min 8 chars), fallback to PKWARE encryption if AES-256 unavailable
  • All encrypted exports are audit-logged (who exported what, when)
  • Unit tests for EncryptedExportService

Closes #48

Files Changed

  • lib/Service/EncryptedExportService.php (new)
  • lib/Service/CsvExportService.php (added banking export, new dependencies)
  • lib/Controller/ExportController.php (added 4 encrypted export endpoints)
  • appinfo/routes.php (added 4 new POST routes)
  • tests/Unit/EncryptedExportServiceTest.php (new)

Test Plan

  • Verify encrypted export produces valid ZIP with AES-256 encryption
  • Verify banking export requires canSeeBanking permission
  • Verify short passwords (< 8 chars) are rejected
  • Verify audit log entry is created for each encrypted export
  • Verify POST method is used (password not in URL)
## Summary - Add `EncryptedExportService` that wraps CSV exports in AES-256 password-protected ZIP archives using PHP's `ZipArchive` - New POST endpoints for encrypted exports: members, fees, birthdays, and banking data - Banking data export (`/export/banking/encrypted`) requires `canSeeBanking` permission, exports decrypted IBAN/Kontoinhaber - Add `exportBankingList()` to `CsvExportService` with family banking data and member associations - Password validation (min 8 chars), fallback to PKWARE encryption if AES-256 unavailable - All encrypted exports are audit-logged (who exported what, when) - Unit tests for `EncryptedExportService` Closes #48 ## Files Changed - `lib/Service/EncryptedExportService.php` (new) - `lib/Service/CsvExportService.php` (added banking export, new dependencies) - `lib/Controller/ExportController.php` (added 4 encrypted export endpoints) - `appinfo/routes.php` (added 4 new POST routes) - `tests/Unit/EncryptedExportServiceTest.php` (new) ## Test Plan - [ ] Verify encrypted export produces valid ZIP with AES-256 encryption - [ ] Verify banking export requires `canSeeBanking` permission - [ ] Verify short passwords (< 8 chars) are rejected - [ ] Verify audit log entry is created for each encrypted export - [ ] Verify POST method is used (password not in URL)
shahondin1624 added 1 commit 2026-04-07 14:55:21 +02:00
Add EncryptedExportService that wraps CSV exports in AES-256
password-protected ZIP archives. Banking data export requires
canSeeBanking permission. All encrypted exports are audit-logged.

- New POST endpoints: /export/{members,fees,birthdays}/encrypted
- New POST endpoint: /export/banking/encrypted (banking perm required)
- Add exportBankingList() to CsvExportService (decrypted IBAN/Kontoinhaber)
- Password validation (min 8 chars), fallback to PKWARE if AES unavailable
- Unit tests for EncryptedExportService

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
shahondin1624 merged commit a1dce160c4 into main 2026-04-07 14:55:26 +02:00
shahondin1624 deleted branch feature/issue-48-encrypted-export-password-protected-zip 2026-04-07 14:55:26 +02:00
Sign in to join this conversation.