Skip to main content

Trust Boundaries

How to think about security by asking who can trust whom instead of turning everything into a memorized checklist.

Andrews Ribeiro

Andrews Ribeiro

Founder & Engineer

The problem

Many serious security failures do not start with exotic cryptography problems or zero-day exploits.

They start with a simpler mistake:

the architecture trusted something too early.

It might be raw user input, a poorly validated token, client-provided data, or a response from another internal service.

Mental model

Security gets much more concrete when you think in trust boundaries.

A trust boundary is the point where data leaves an untrusted environment and enters a place where it can cause real damage.

The central question is:

what data am I treating as truth right now, and why do I believe it?

That question sounds simple.

But it breaks a lot of lazy trust inside an architecture.

Breaking it down

A mature way to map trust boundaries is:

  1. find the real origin of the data
  2. identify who could have changed it before it got here
  3. map what the system is about to do with it
  4. validate, sanitize, or limit permissions right before the point of impact

That moves security out of the abstract and back into the actual flow of the system.

Simple example

Imagine the client sends this:

{
  "userId": "123",
  "role": "admin"
}

If the backend accepts role as truth without checking it against a trusted source, the trust boundary has already been crossed in the wrong way.

The problem is not receiving JSON.

The problem is treating client-provided data like it has authority over permissions.

Common mistakes

  • trusting raw client data too early
  • assuming an internal service on the same network is automatically safe
  • mixing identity with permission
  • treating security like a last-minute checklist
  • assuming the presence of a token proves everything the system needs to know

How a senior thinks

More experienced engineers do not start with security tools.

They start by interrogating the data flow.

The reasoning usually sounds like this:

Before writing a rule, I want to map where this system accepts untrusted data and where that data could cause damage.

That shift alone clarifies a lot:

  • where validation belongs
  • where authorization belongs
  • which assumptions are still too weak

What the interviewer wants to see

In backend or system design interviews, this topic shows depth quickly.

The interviewer wants to see whether you:

  • understand that security starts with trust modeling
  • know where validation belongs in the flow
  • think about worst-case impact instead of cosmetic fixes

A strong answer often sounds like this:

I would map where the system crosses from untrusted data into trusted execution. From there I would decide where to validate, where to limit permissions, and where a weak assumption could turn into a dangerous action.

Security starts when you stop trusting things just because it is convenient.

Quick summary

What to keep in your head

Practice checklist

Use this when you answer

You finished this article

Next article Authentication vs Authorization Previous article Core Web Vitals: What They Are and What Actually Affects the Score

Keep exploring

Related articles