Data flow and trust boundary modeling
Start with an asset and a flow
A data flow diagram (DFD) explains how information moves between actors, processes and stores. A trust boundary marks a change in the authority or assumptions used to protect data, not merely a network hop. In our fictional library reservation service, protect member contact details, reservation integrity and service availability. The browser sends a reservation request to an API; the API checks membership and writes to a database. The database trusts only a narrowly authorized service identity, not every request originating inside the network.
Draw the distributed service
Use the following original logical diagram. Each arrow is one direction of data transfer, not a complete protocol exchange. Responses and error paths need separate flows in a full model.
[Member browser] --reservation--> [API][Identity provider] --identity proof--> [API][API] --record--> [Database][API] --job--> [Queue][Queue] --job--> [Worker][Worker] --notice--> [Mail provider][API] --audit event--> [Audit store]Group browser and provider outside the service boundary; API, queue and worker have distinct workload identities; database and audit store have separate access policies. Label each crossing with data classification, sender identity, allowed operation and verification responsibility.
Model a new integration
A notification worker needs only a reservation ID and delivery address, not the complete member profile. If the external mail provider receives the address, it becomes a distinct privacy boundary even over TLS. Document purpose, retention, authorization, delivery failures and deletion obligations. A separate audit flow should contain identifiers and outcomes, not message content. Identify backup and administrator access as additional surfaces; this diagram does not yet cover them.
Avoid false trust
A private subnet is not an identity guarantee. Encryption in transit protects a connection but does not establish that the caller may read a particular reservation. A diagram that omits callbacks, queue consumers or support tools can hide an important trust decision. Mark uncertain flows explicitly and assign an owner to confirm them; do not mark a boundary as secure just because a firewall appears in the picture.
Practice with a return flow
Add the API response, delivery receipt and administrator maintenance flow to the diagram. For each, state the minimal data, caller, recipient, expected checks and behavior if the check fails. Compare the result with fixtures/architecture.json in the chapter lab. The next lesson maps these assets and boundaries to threat classes.
Check Your Understanding
Solidify your learning with the interactive assessment directly below this lesson.
Concept Quiz & Questions
Data flow and trust boundary modeling — knowledge check
Review trust boundaries, STRIDE requirements, failure modes and architecture decisions.
What does a trust boundary represent?
What data should the notification worker receive?
A DFD omits response flows. What follows?
Does TLS alone authorize a reservation read?
How should an unknown flow be treated?