The customer portal: A reference build for modernized business apps, run in production and audited in public.
- The problem
- What existed
- What we did
- What changed
- What we would repeat
Every product we ship needs support, beta distribution and billing records, and customers should not have to learn a different place for each. Staff needed one queue. The whole thing had to be cheap to run, safe by default, and small enough for one team to own. This is the write-up, in the same five sections every case study uses.
The problem
Email threads, a spreadsheet of testers and store dashboards, with no record a customer could see. Each new title made it worse. We needed one account for support across everything we make, test builds on hand, invoices in one place, and a staff view of the same data.
What existed
Nothing shared. Which is the honest position of many of the systems we are asked to modernize, where the "system" is a mailbox and a workbook that one person understands.
What we did
A static front end with no secrets in it. An isolated .NET 10 API behind the same host, with an origin allowlist that client headers cannot extend, byte limits enforced before any parser allocates, and authorization checked inside every handler rather than once at the door. Attachments count against a per-request cap with a transactional counter, so concurrent uploads cannot slip past it. Customer views are derived only from what customers may see, so internal notes can never leak through counts or timestamps.
Then we audited it as a stranger would. Anonymous and read-only against production; authenticated attack scenarios against an isolated copy with synthetic accounts. Six findings, all fixed. Five are now guarded by tests that run before every release; the sixth was a developer-machine setting. The full write-up is in How we audit our own stack.
What changed
| Measure | Before the audit | After |
|---|---|---|
| Confirmed critical or high vulnerabilities in scope | 0 | 0 |
| Findings fixed | — | 6 of 6 |
| Fixes guarded by a test before every release | — | 5 of 6 |
| API security and smoke checks at the review, now run before every deploy | — | 177 passing |
| Authorization checks across protected handlers, in the review | — | 257 across 58 |
| Known npm and NuGet advisories | 0 | 0 at the review |
| Request body limits before parsing | None | 32 KiB contact · 4 KiB signup |
What we would do the same for you
Keep the front end static and secret-free. Put every rule in the API and test it from the outside. Make the audit a build step rather than an event. Derive what a user sees from what they are allowed to see, not from what exists. Publish the method so the next engineer, yours or ours, can repeat it.