Application trust boundaries
Trust is a design decision
A trust boundary is a point where information enters a component with different control or security assumptions. Browser data crosses a boundary when it reaches Notes. The server cannot assume a field is trustworthy simply because the application UI produced it. It must check the request against the actual policy and relevant server-side evidence.
Origins are browser boundaries
For ordinary HTTP(S) URLs, an origin consists of scheme, host and port. https://notes.example/a and https://notes.example/b have the same origin; https://help.example/a has a different host. The same-origin policy restricts many interactions across origins, but does not prohibit every cross-origin request. CORS is a mechanism for allowing certain cross-origin browser reads. Neither mechanism replaces server-side authorization.
Separate four questions
Validation: is the note identifier in the accepted format? Authentication: which user is associated with this valid session? Authorization: may that user read this particular note? Transport protection: is the connection protected against network interference under the TLS trust assumptions? Passing one question does not answer the others. For example, a correctly formatted N2 can still be outside Mina’s permissions.
A small permission policy
In the fictional Notes app, each authenticated user can read only their own note. Mina owns N1; Omid owns N2. The trusted application permits Mina reading N1 and refuses Mina reading N2. An unknown or expired session is refused. The server derives ownership from stored records, not from an owner label in the request. Hiding an unavailable button is useful interface design, not enforcement.
Practice with an allow/deny table
On paper, evaluate four requests: Mina reads N1; Mina reads N2; Omid reads N2; a signed-out user reads N1. Expected decisions: allow, deny, allow, deny. The next chapter develops identity, authentication and authorization in more depth. Keep this toy policy separate from real systems; do not send requests to the example hosts.
Check Your Understanding
Solidify your learning with the interactive assessment directly below this lesson.
Concept Quiz & Questions
Application trust boundaries — Knowledge check
Reason about fictional web application components and security decisions.
Which pair has the same ordinary HTTPS origin?
Mina has a valid session but requests Omid’s note. Which control must decide?
What can HTTPS not establish by itself?
Where should Notes obtain the record owner for its policy?
What is the role of CORS?