Phase 9: migrations, account controls, frontend tests, SES bounces #24
No reviewers
Labels
No labels
bug
dependencies
documentation
feature
phase-summary
security
testing
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
vmanne-poc/Postak!24
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "phase-9"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Phase 9 (v0.9.0). Each issue is its own commit.
prisma db push --accept-data-lossis gone.0_initis the v0.8.0 baseline, and containers runscripts/migrate.sh. On first start it adopts an existing pre-v0.9.0 database: syncs it to the frozen v0.8.0 schema without allowing data loss, then marks0_initas applied and runsprisma migrate deploy. TheprismaCLI is now a real runtime dependency.POSTAK_SMTP_URL,POSTAK_MAIL_FROM,POSTAK_APP_URL). Reset links are single-use, last 1 hour, and are throttled, and the response never reveals whether an account exists.frontend-testcompose service. Getting test tooling without known advisories meant upgrading the frontend toolchain: Vite 8, plugin-react 6, React Router 7.18 (fixes an open-redirect advisory), building on Node 22.POST /api/webhooks/sesfor SNS. It verifies SNS signatures (v1/v2) with certificates fetched only from SNS hosts, accepts only topics in thePOSTAK_SES_SNS_TOPIC_ARNSallowlist, and is off when that list is empty. Hard bounces mark the contact BOUNCED and complaints mark it COMPLAINED; neither is mailed again. Soft bounces are only logged as events, and redeliveries are deduplicated. SES senders now store SES's own message ID.Migrations added:
user_account_controlsandcontact_bounce_statuses. Both are additive.Upgrading: back up the database first.
Testing
db pushdatabase, build fresh) and a schema-drift check (docker compose run --rm --build -T backend-test).docker compose run --rm --build -T frontend-test).npm audit: backend (--omit=dev) 0, frontend 0.mustChangePassword, old sessions get 401); disable (session 401, login 403); delete with project hand-over.Not verified
Closes #16
Closes #23
Closes #18
Closes #17