Trust Boundary
A line in a system where data or control passes between parts that have different levels of trust. It is where input has to be checked and access decided.
Also known as: Trust Boundaries, Security Boundary, Trust Zone, Privilege Boundary
Category: Software Development
Tags: security, cybersecurity, software-architecture, threat-modeling, access-control, trust
Explanation
Not every part of a system deserves the same trust. Your own server code is under your control. A browser, a mobile app, a partner API, an uploaded file or the output of an AI model is not. A trust boundary is the line between two such zones. Whenever data crosses it towards the more trusted side, somebody has to check it.
**Typical trust boundaries**:
- Between the internet and your network
- Between the client (browser, mobile app) and the server
- Between your service and a third-party service
- Between user space and the operating system kernel
- Between tenants in a multi-tenant system
- Between a normal user and an administrator
- Between an AI model and the tools it can call
**What happens at a boundary**:
- **Authentication**: Who's on the other side?
- **Authorization**: Are they allowed to do this?
- **Input validation**: Is this data well-formed and acceptable?
- **Output filtering**: What is allowed to leave?
- **Logging**: A record of what crossed
**In threat modeling**:
You draw the system as a data flow diagram and mark the trust boundaries. Every arrow that crosses a boundary is a place to ask what could go wrong. Most threats sit on those arrows.
**Common mistakes**:
- **Trusting the internal network**: "It's behind the firewall" isn't a trust level. Zero trust treats every call as a boundary crossing
- **Checking on the wrong side**: Validation in the browser protects nothing
- **Trusting stored data**: Data in your own database that a user typed in earlier is still untrusted when you use it later
- **Missing boundaries**: A plugin, a dependency or a build script runs with your privileges. That's a boundary people rarely draw
- **Mixing instructions and data**: An AI model reads trusted instructions and untrusted content in the same channel. Prompt injection is the result of that missing boundary
**Design advice**:
- Have few boundaries and make them explicit
- Do all the checks at the boundary, once, and turn the input into typed values (see Parse, Don't Validate)
- Inside a zone, code can rely on what the boundary enforced. Across zones, it can't
Related Concepts
← Back to all concepts