Project 84 of 84
Zitadel Emails
Fleet-wide receiver behind Zitadel's HTTP email provider: verifies Zitadel-signed notifications, queues them durably in Postgres, and sends each product's auth emails (password reset, verification, invites) through Amazon SES under that product's own brand and From address, mapped by Zitadel org id.
- Status
- Shipped
- Last activity
- 2026
- Live
No public deployment.
- Stack
- TypeScript
- Node
- Hono
- PostgreSQL
- Supabase Postgres
- Amazon SES
- MJML
- Vitest
Highlights
- Designed and shipped a signed-webhook email service for a shared Zitadel identity provider in two days (built 2026-11-03, activated 2026-11-04), replacing the instance-wide SMTP provider so each product sends auth mail under its own brand and SES sender.
- Engineered no-loss delivery semantics: the receiver acknowledges only after a synchronous Postgres commit within 4 s, deduplicates retries in a 15-minute window, and a SKIP LOCKED lease worker with token fencing passed a SIGKILL-mid-send test requiring exactly one email.
- Hardened the trust boundary with HMAC-SHA256 signature verification over raw bytes (constant-time, 300 s window, 64 KiB cap before crypto), CURRENT/PREVIOUS keys for blue/green rotation, and verify-full TLS to a Supabase pooler with a private CA.
- Onboarded 11 Zitadel orgs across 9 product brands to their own auth.<product>.catesworks.dev senders over releases v0.1.2 to v0.1.5, using a gated release order (IAM policy, allowed patterns, env refresh, image, pin) so the worker never shipped a From it would reject.
- Rehearsed the cutover against a local Zitadel v4.17.3 (6 E2E scenarios) and proved the Terraform-frozen SMTP rollback provider with a five-check local test before switching production.
- Restored CI on the shared self-hosted runners by running the same pre-release gate used before tagging (typecheck, lint, unit and integration tests against a throwaway scram Postgres, build, dependency audit, gitleaks), so CI and local release checks cannot drift.
- Documented the service end to end: Docusaurus site, 10 ADRs, 7 runbooks (deploy, provider switch, key rotation, product onboarding), CODING_STANDARDS and GLOSSARY, and five session dossiers.
- Onboarded a twelfth Zitadel org (Rollkit) to its own branded sender in release v0.1.6, holding the mapping PR as a draft until the SES identity passed the three-part verification gate and a scoped IAM From-address allowance (fw-web #29) had merged, so no mail could fall back to the neutral sender.
- Coordinated a cross-session release between a product session and the receiver session: the product side provisioned SES identity Terraform and picked brand tokens, while the receiver session alone merged, tagged and staged a do-not-merge infrastructure pin that follows the drift-gated deploy order.