liveBook · Manning

Data flow

As explained in Secure APIs

A data flow is a representation of how data moves between components, users, and external systems.

A data flow represents how data moves between application components, users, databases, and external systems. Common flows include requests, responses, database-to-application transfers, and third-party API exchanges. section 3.3

Treat every flow as untrusted. Malformed, invalid, or malicious data can create integration failures, cascading errors, or code injection. Third-party responses deserve the same validation as user requests because a compromised provider can transmit harmful data into the application. section 3.3

Use a data-flow view to ask practical security questions:

  • Where does each payload originate, and which services, databases, or users receive it? section 3.3
  • Are constraints enforced when data enters the system and again when responses arrive from other services? section 3.3
  • Can the flow be represented in a threat-modeling tool and reviewed for attacker-controlled paths? section 2.2.2

Third-party profile data

A website imports profile details from an external identity provider during registration. If an attacker stored malicious code there, the website could ingest it and execute it against its database. Validate the provider’s response before using or storing it. section 3.3

Figure 3.14 Modern applications consist of complex data flows, such as the request flow, the response flow, and the third-party API flow.
figure

Trace request, response, and third-party API paths together as one application data-flow map. section 3.3

How Secure APIs covers it

How deep it goes
Explains major flow types, validation risks, unsafe consumption, and diagram-based threat modeling without detailing implementation internals.
Examples
Uses request and response paths, database transfers, order aggregation, book-format validation, and malicious identity-provider data.
What you can do after
Apply it via Microsoft Threat Modeling Tool, OWASP Threat Dragon, or pytm to represent flows and generate threat models.
How it connects
Connects data flows with API security, input validation, third-party APIs, zero-trust APIs, and threat modeling.

Also explained in

Compare how 2 books explain data flow →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Secure APIs. The section links point to the parts of the book it draws on.