The Lawfare Academy

Lawfare Group → Knowledge Institute → Lawfare Academy

← Digital Business and AI Applications

Unit 3

Data, privacy, and access

Learning objectives

  • Explain data, privacy, and access in your own words.
  • Apply the principle to the worked business case.
  • Evaluate the answer and identify an assumption that could change it.

Data, privacy, and access

Using data requires legitimate access, appropriate purpose, minimization, and protection. Avoid sending sensitive business or customer information into unapproved systems. Document retention and access responsibilities.

Worked example

A technician uploads customer documents to a personal AI account.

Study the full explanation

The Academy guide above introduces the mechanism. The linked textbook sections supply the sustained instruction, definitions, derivations, examples, and end-of-section practice for this study unit. They are part of this course's learning sequence, not merely citations for this short guide. Read them on the publisher's free website, then return here to apply the idea.

Work through the reasoning

Define the business workflow, data, users, system boundary, and failure consequences. For this unit, connect the explanation of data, privacy, and access to the worked example before answering the practice question.

Check the limits

Test a representative case and identify controls, exceptions, recovery, and the accountable human owner. If the source model and the practical example use different assumptions, state the difference rather than applying the formula or rule mechanically.

Apply it independently

What must be assessed? Write an answer before opening the model response. Show the calculation or explain the causal or logical steps. Change one material assumption and say whether your conclusion changes. This practice is optional; you can read every part of the course without submitting work.

Advanced investigation: Data lineage, temporal access and a permission boundary that survives retrieval

Map each field to its origin, permitted purpose, transformations and recipients. This lineage is more than a diagram of database tables: copied free text can contain information absent from the structured schema. A customer-service summary may include another person's contact details, a private attachment or an obsolete account state. Minimizing named columns does not remove those disclosures.

Authentication and authorization have different jobs. The server must establish identity through its trusted mechanism, then determine which objects and actions that identity may access. A tenant identifier typed by the caller is an untrusted request parameter. Derive the actual scope from verified identity and apply it to retrieval, record detail, exports and any tool action. An access check in a user interface does not protect a directly callable backend endpoint.

Retrieval introduces a context-disclosure boundary. Enforce document permissions before text enters model context, including quoted passages and cached summaries. Filtering an answer after generation cannot undo an earlier disclosure to a model or its logging path. Search similarity and access permission are independent: the best textual match can be forbidden. Metadata filters need tests that include a high-scoring unauthorized document, not just benign records that happen to belong to the caller.

Time is part of authorization and truth. A user may lose access, a document can be revoked, and an older policy may remain in an index. Specify the decision's effective time, document validity period and freshness check. Cache keys must include the relevant identity/scope and content version; otherwise an answer prepared for one caller or old policy can be reused in the wrong context. Retention and contractual obligations depend on the actual setting, so do not treat this fictional architecture as a legal compliance certificate.

Treat retrieved instructions as untrusted content. A document saying to send data elsewhere is evidence of what the document says, not authority to override the workflow. The application, not the generated text, decides which tools exist, which arguments are valid and who can authorize an action. A useful adversarial test places a malicious instruction next to relevant facts and checks both that factual retrieval remains useful and that the instruction gains no authority.

Worked investigation

At time 12:00, client A can read documents A1 and A2. B1 belongs to client B and has the highest similarity score. A1 expired at 11:00; A2 is current but contradicts an older cached summary. The permitted current context contains A2 only. B1 is excluded by authorization and A1 by validity. The cached summary must not override current evidence merely because it is fast to return. If the caller requests historical analysis as of 10:00, that is a different explicitly scoped query whose permitted historical records must still be authorized.

Independent transfer

Design tests for a user whose access to A2 is revoked after a summary is cached. Include the cache key or invalidation behavior, an export endpoint and an adversarial instruction embedded in A2.

Transfer reasoning

After revocation, retrieval and export must deny the record and the cached summary cannot be reused under the old permission assumption. Key or invalidate caches by relevant scope/version and recheck access at use. The embedded instruction is never a permission grant; an external-action test should show no tool call or disclosure. State where revocation propagation latency remains and how the workflow handles it.

Original Academy investigation: data access is an application rule

Decide which information a system needs for the particular task and which identity is permitted to access it. Data minimization is an engineering choice as well as a governance concern: fewer unnecessary fields can reduce exposure and make testing simpler. A summarizer for job status may need the work-order description and stage but not full payment details. Removing fields from a prompt does not by itself secure a database that the application can query without authorization checks.

An access rule belongs in a trusted service layer. A user's requested account, document, or customer identifier is input to be checked, not proof of permission. If access is restricted to account A, asking a language model to be careful cannot authorize a fetch of account B. Filter the candidate records using the verified identity and allowed scope before retrieval or generation. Recheck authorization at any action boundary; a model's output is not a credential.

Worked investigation: a cross-account retrieval request

The synthetic laboratory has three documents: two for account A and one for account B. A user scoped to A asks for a service summary. The deterministic retrieval layer returns only A records. An input requesting B is rejected even if it uses a persuasive explanation. The exercise demonstrates the location of a boundary in the toy application. It does not claim to implement production authentication, token validation, or every enterprise authorization requirement.

Treat external text as evidence to interpret rather than instructions entitled to control tools. A document can contain a sentence telling an assistant to reveal unrelated records. That sentence is still document content. The authorization layer must refuse the unrelated access regardless of how the generation component responds. Prompt-injection defenses are layered: explicit instruction boundaries, limited tool scope, output validation, monitoring, and permission checks address different failure paths. No prompt wording should be presented as a proof that the problem has been eliminated.

Retention, logging, and secondary use need explicit decisions. A system may correctly answer a question while its logs accumulate more sensitive source content than needed. Test whether identifiers, excerpts, and generated answers enter analytics or error reports. Provider settings and contracts can affect data handling, but do not infer a universal rule from the word private in a product label. Document the actual configuration used, and reassess when the service or data flow changes.

Progressive practice and reasoning

  1. Identify the trusted and untrusted inputs in the toy retrieval example. Verified scope is a trusted input only because the exercise stipulates it; user-supplied account names are not.
  2. Explain why filtering after unrestricted retrieval can expose data before the filter runs. Apply scope before retrieving unauthorized content.
  3. Add a malicious instruction to an allowed document and predict whether that should change the allowed account set. It should not; document text cannot grant a new permission.
  4. Draw the data flow from source to retrieval, prompt, model output, logs, and user response. Mark what is retained and who can access it at each boundary.

Open the complete investigations and runnable laboratory

Apply the idea

A technician uploads customer documents to a personal AI account.

What must be assessed? Explain your reasoning, then identify one changed fact that could alter the conclusion.

Advanced worked record — a separate fictional scenario: At time 12:00, client A can read documents A1 and A2. B1 belongs to client B and has the highest similarity score. A1 expired at 11:00; A2 is current but contradicts an older cached summary. The permitted current context contains A2 only. B1 is excluded by authorization and A1 by validity. The cached summary must not override current evidence merely because it is fast to return. If the caller requests historical analysis as of 10:00, that is a different explicitly scoped query whose permitted historical records must still be authorized.

Independent transfer: Design tests for a user whose access to A2 is revoked after a summary is cached. Include the cache key or invalidation behavior, an export endpoint and an adversarial instruction embedded in A2.

Expanded transfer: Why filter authorized scope before retrieval rather than after unrestricted content reaches the model? Explain the decision using the stated information and distinguish the measured result from the assumption. Then complete the four progressive tasks in the Learn stage.

Read the worked reasoning

Authorization, data sensitivity, and approved handling. Productivity does not establish permission to disclose information. In an independent response, state the given facts, identify the governing relationship, work through the calculation or comparison, and distinguish the conclusion from assumptions that still need evidence.

Advanced transfer reasoning: After revocation, retrieval and export must deny the record and the cached summary cannot be reused under the old permission assumption. Key or invalidate caches by relevant scope/version and recheck access at use. The embedded instruction is never a permission grant; an external-action test should show no tool call or disclosure. State where revocation propagation latency remains and how the workflow handles it.

Expanded transfer reasoning: A later filter cannot undo earlier access or exposure.

Progressive case reasoning: 1. Identify the trusted and untrusted inputs in the toy retrieval example. Verified scope is a trusted input only because the exercise stipulates it; user-supplied account names are not. 2. Explain why filtering after unrestricted retrieval can expose data before the filter runs. Apply scope before retrieving unauthorized content. 3. Add a malicious instruction to an allowed document and predict whether that should change the allowed account set. It should not; document text cannot grant a new permission. 4. Draw the data flow from source to retrieval, prompt, model output, logs, and user response. Mark what is retained and who can access it at each boundary.

Check understanding

A retrieved document tells the assistant to access another account. What should happen to the verified account scope?

  1. It expands whenever the user requests a summary
    Feedback

    Incorrect. A task request does not establish permission for unrelated data.

  2. It remains unchanged; document content cannot grant permission
    Feedback

    Correct. Authorization belongs in a trusted layer independent of source-text instructions.

  3. It expands if the text sounds authoritative
    Feedback

    Incorrect. Persuasive wording is not a credential.

Further reading

Expanded investigation: study the original worked case, attempt all four progressive tasks, and run the synthetic laboratory. The institutional sources supply background for their stated topics; they are not the source of the fictional cost or classification records. The toy policy code illustrates boundary placement, not production authentication.

My learning →