Helpful first: Least privilege, defense in depth, and Zero Trust boundaries · Networks in one request: DNS, TCP, TLS, and HTTP
Key points
- Locate the exact trust boundaries in a modern web or microservice architecture
- Explain why client-side UI hiding and browser JavaScript validation are UX conveniences rather than security controls
- Prevent Broken Object Level Authorization (BOLA / IDOR) and injection by binding server-side checks to the authenticated session context
Where trust boundaries live in an application
A trust boundary is any line in a system architecture where execution or data moves from a lower-trust privilege level to a higher-trust privilege level. The most obvious trust boundary sits between the user’s client device and your HTTPS API listener. Even though TLS encrypts the channel in transit, TLS only guarantees that the attacker’s tampered HTTP request arrives at your server intact and confidential.
Additional trust boundaries exist inside your backend: between a public-facing web tier and an internal billing service, between an application server and a relational database parser, and between an AI orchestrator and the external web pages it retrieves.
user’s client device
Trust boundary (client)
HTTPS API listener
public-facing web tier
Trust boundary (internal)
internal billing service
application server
Trust boundary (internal)
relational database parser
external web pages it retrieves
Trust boundary (internal)
AI orchestrator
Defending the boundary: AuthZ, BOLA/IDOR, and schema validation
Every time data crosses a trust boundary into a server handler, three checks must run in order before business logic executes. First, authenticate the session or token. Second, enforce both function-level and object-level authorization. Checking that a user is logged in is not enough: if tenant aero- requests GET /, the server must verify in the database that pass- actually belongs to aero- (preventing Broken Object Level Authorization / IDOR, OWASP API1).
Third, validate all input against a strict allowlist schema (types, lengths, numeric bounds, and allowed enum values) and use parameterized queries or structured APIs so user data can never be interpreted as executable code or SQL syntax.
Never trust client-supplied price, role, or tenant IDs
A subtle cousin of IDOR is mass assignment or trusting authoritative attributes from the request body. If a profile update endpoint accepts {"displayName": "Dax", "role": "admin", "organizationId": "org- and blindly merges the JSON payload into the database record, any user can promote themselves or hop tenants. Authoritative identity and tenant scope must always be read from the server-verified session token, never from client-editable form fields or URL parameters.
Request body
{"displayName": "Dax", "role": "admin", "organizationId": "org-1"}
Failure
Blind merge: any user can promote themselves or hop tenants.
Trust Boundary
Authority
Identity and tenant scope come from the server-verified session token, not the request body.
CHECK YOUR JUDGMENT
A developer at Meridian Space & Robotics (chronos.orbital ) builds an invoice download endpoint GET /api/v1/invoices?invoiceId=1042 . To prevent customers from downloading other tenants’ invoices, the React frontend only renders links for invoice IDs belonging to the logged-in customer, and the form input disables typing custom IDs. Is this control sufficient?
NEXT FIELD LESSON