Privacy engineering

Draw a Data Flow Map Before Choosing Privacy Controls

Map the information a feature collects, copies and shares so privacy controls address real data flows rather than an assumed architecture.

A useful data flow map follows a piece of information through a real task. It shows where the information enters, which components receive it, what each component does with it and where copies remain. Start with one feature that a reader of the map can recognize, such as uploading a document or requesting an account export. A small map with verified boundaries is more useful than a comprehensive diagram whose arrows are guesses.

The NIST Privacy Framework is a voluntary resource for identifying and managing privacy risk. It provides a useful context for this work, rather than a certification that a particular application is compliant. The practical mapping exercise below is an editorial approach to making a software feature inspectable. It does not determine legal obligations or prescribe a universal set of controls.

Choose a task with a beginning and an end

Imagine a scheduling application that lets a customer attach a note to an appointment. The immediate task appears simple: a browser sends the note to an application, which stores it in a database. That description leaves several questions unanswered. Does a notification include the note? Does an analytics event contain the request body? Can support staff export appointments? Does a background worker make a search index from the text?

Define the map’s boundary in a sentence: “From a customer submitting an appointment note to the note being displayed to an authorized staff member.” Then list what is outside the first review, such as payment processing or an unrelated marketing site. Exclusions are useful only when they are visible. They should not make a shared logging service disappear from the map merely because another team operates it.

Pick a concrete test record made of invented information. Do not copy a real customer’s note into a planning document. A distinctive synthetic marker can help a developer follow the record through a nonproduction environment without introducing another sensitive copy.

Name the information before drawing the boxes

A label such as “customer data” is too broad to support a design decision. Break the request into meaningful categories: account identifier, appointment time, optional note and attachment reference. Describe the purpose of each field and whether the task still works without it. This often reveals a collection question before an encryption question becomes relevant.

Record the difference between information supplied by the user and information generated by the application. A browser may supply a note, while the service adds a record identifier, timestamp and account relationship. These derived fields matter because they can connect otherwise separate events. They may also travel farther than the note itself.

Avoid filling the map with actual field values. A map should describe a data category, not become a sample customer database. If an example is essential, make it synthetic and label it as such. Keep supporting screenshots free of live identifiers and credentials.

Follow the copies, including temporary ones

Draw the obvious application path first, then add the side paths that make the feature operate. A queue, cache, search index, delivery provider and support export can each receive a different representation of the same information. A temporary copy deserves attention when it has a different audience, retention behavior or failure mode.

For the appointment example, the main database might contain the full note. A search index might contain searchable text and an account identifier. An email notification might contain only the appointment time. Those are three different flows, even if a developer informally describes them all as “saving the appointment.” A control that protects one copy does not establish what happens to the others.

Use a simple evidence label on every arrow. “Observed in test” can point to a sanitized test result. “Confirmed in configuration” can identify a configuration file and revision. “Assumed” is a legitimate temporary label, provided it creates a follow-up task rather than quietly becoming a fact.

Describe the boundaries that change trust

A network line is not the only useful boundary. Consider where control over identity, configuration, storage or access changes. A third-party notification service may be outside the application’s operational control. An internal support tool may share the hosting environment but give a different group access to records. A browser is operated by the reader and should not be treated as a trusted extension of the server.

For each crossing, record who initiates it, how the destination is identified and what the destination is allowed to receive. Keep these statements separate from the claim that a connection is encrypted. Transport protection addresses one part of the flow; it does not decide whether the recipient needs the information or how long the recipient keeps it.

A useful review question is: “If this destination received an extra field tomorrow, which check would notice?” The answer may be a schema test, a reviewed serializer or a contract with an external service. If the answer is “nothing,” the map has revealed a concrete design task.

Turn the diagram into a small flow register

The picture helps people orient themselves. A compact register holds details that would make the picture unreadable. Give each flow a stable name so discussion can refer to “appointment notification” rather than “the arrow on the right.”

Flow Minimum contents Evidence to record Open question
Browser submission Appointment fields needed for the task Sanitized request schema Is the note optional?
Database write Stored fields and account relationship Model and write-path revision Which fields are searchable?
Notification event Recipient reference and event summary Serializer and delivery configuration Is any free text included?
Support export Explicitly selected record fields Export permission and output test Where does the file remain?

This example is a starting structure, not a required format. Add a field only if someone will use it to make or verify a decision. A giant inventory with no owner tends to become less trustworthy as the application changes.

Test one complete journey against the map

Run the synthetic task in an environment where you are authorized to inspect the relevant components. Compare the observed destinations with the diagram. A request log or trace may help locate a flow, but it should not become an excuse to enable indiscriminate capture of request bodies. Use the smallest evidence that answers the question.

Check both the successful path and one ordinary failure. For example, what happens when the notification provider is unavailable? A retry queue might retain the event longer than the normal processing path. What happens when an attachment upload is abandoned? A file may exist even though no appointment record was completed.

Write down the environment and revision used for the check. A staging observation supports a statement about that configuration, not an automatic claim about every production instance. If production uses additional integrations, record that difference and assign a separate verification step.

Choose controls from the unanswered questions

Once the map is credible, controls can be tied to specific flows. If a notification receives unnecessary free text, reducing the payload may be a better first change than adding another monitoring dashboard. If an export has no clear owner, define access and storage behavior before making it easier to generate. If a queue retains abandoned records, establish a lifecycle rule and a way to check that it runs.

Separate proposed improvements from controls already present. A different line style or a status column is enough. The important point is that the diagram must not imply protection merely because a reviewer suggested it. Record an acceptance check beside each change: the unwanted field is absent, the unauthorized role is denied, or the expired record no longer appears in the designated store.

Our guide to engineering a retention schedule develops the lifecycle question. The guide to safe application logging addresses a common side path that maps overlook.

Keep the map close to changes

Choose an owner who can route corrections, even when several teams contribute. Store the map and register where a feature change can reference them. Ask whether a proposed change adds a field, a destination, an audience or a longer-lived copy. These are clearer review prompts than asking whether the change “affects privacy” without context.

Do not schedule updates solely by the calendar. A new integration, export feature or support workflow can make yesterday’s map incomplete. Conversely, a dated review with no relevant changes can be short: identify the version checked, the evidence considered and why the existing description still holds.

The deliverable is a map someone can challenge. Another engineer should be able to select one arrow, find its supporting evidence and explain what remains uncertain. That is the point at which a diagram begins to support reliable decisions rather than simply decorate an architecture document.