LOAD-BEARINGfree
High-level designTier 12 · unit 6 of 11 · 13 min read

Scope reduction: designing to touch less

The tier so far has been about controlling access to data. This lesson is about a strictly stronger move that architects reach for far too late: arranging the system so that most of it never touches the sensitive data at all.

Card data is the clearest example because the rules are explicit and the costs are itemised, so we will use PCI DSS as the worked case. The principle generalises to health records, government identifiers, and anything else where a regulator can ask you to prove something about every system involved.

Why scope is the cost driver

Under PCI DSS, any system that stores, processes or transmits cardholder data is in scope — and so is any system connected to one in a way that could affect its security. That second clause is the expensive one: scope is contagious. A reporting tool that can reach the payments database is in scope. The jump host that can reach the reporting tool is in scope.

And scope is priced per system, annually: vulnerability scanning, penetration testing, access reviews, logging and retention requirements, change control, segmentation evidence, and an auditor's time reading all of it. Ten systems in scope is not ten times the paperwork of one, but it is not far off — which is what makes this an architecture problem rather than a compliance one. The design decides the bill.

The two techniques that do nearly all the work

  • Never let the data touch you. Hosted fields, an iframe, or a redirect: the card number travels from the user's browser directly to the payment provider, and your page never receives it. Your server sees a token come back and nothing else. This single decision removes your web tier, application tier and database from scope, and it is by a wide margin the highest-leverage thing on this page.
  • Tokenisation. The provider stores the real number in its vault and hands you an opaque token. Your order service stores the token, your logs contain the token, your warehouse (Tier 7) contains the token. A token is worthless outside the vault, so systems holding tokens are not systems holding card data.

Together these shrink the in-scope surface from "our estate" to "the integration boundary". Lesson 5.05 listed a compliance boundary as one of the few reasons to split a service that comes with an invoice attached; this is what that invoice looks like when you read it closely.

When you genuinely must handle the data — some businesses do — the fallback is segmentation: a separate network segment with its own credentials, minimal connectivity, and firewall rules you can hand an auditor as evidence. It is expensive, but it is bounded, which is the entire objective. Without segmentation, a flat network means your whole estate is one connected system and the auditor is correct to say so.

The leak paths that quietly put you back in scope

These are where careful designs fail, and every one of them is something a well-meaning engineer added:

  • Logs. One debug line printing a request body puts the application, the log shipper, the aggregator and everyone with search access into scope. Logging is the most common single failure here.
  • Error trackers. Exception reporters capture request context by default. That default is a third party now receiving card data.
  • Analytics and session replay. Front-end tooling that records form fields, faithfully including the one you were careful never to send to your own server.
  • Backups and replicas. A copy of an in-scope database is in scope. So is the analytics replica you forgot about in 5.03.
  • Support tooling. An admin screen that displays a full number turns your customer-service estate into an audited system.

The defence is structural rather than vigilant: redact at the logging library, allow-list what may be captured rather than block-listing what may not, and test for it — a check in CI that fails when a card-shaped string reaches a log sink is worth more than a policy document.

The general principle

Strip away the specific regulation and what remains is broadly useful: for any class of data that carries obligations, the cheapest compliance strategy is to be touched by it in as few places as possible. Not to encrypt it better everywhere, not to control access to it more carefully everywhere — to arrange the architecture so that "everywhere" is three systems instead of thirty. The next lesson applies exactly this reasoning to personal data.

The trap

Storing the card number "just for convenience" — for refunds, for recurring billing, for the support team. Every one of those has a token-based answer the provider already supports and documents: refund by transaction reference, recurring charges against a stored token, support tooling that shows the last four digits. The convenience is a few hours of integration work you did not do. The price is an audit boundary drawn around your entire estate, renewed annually, forever, and enormously more expensive to remove than it would have been never to create.