Course contents 30 / 35

30 / 35 · The Data System

Access and privacy

Trace one personal field through a sales pipeline and distinguish access control, data minimization and removal from retained copies.

The order source keeps an email address so the shop can send a receipt. The daily report groups amounts by store. Copying the email into every derived table would make more systems able to read it without helping the calculation.

Put a boundary at each copy#

The database grants protect a source relation or view. When an extraction job writes a file, that file has a separate access boundary. The source database no longer decides who can read it. A pipeline therefore needs a decision at each copy about who can read it and which fields the copy must contain.

Keep the raw email in the restricted source, and give the analytics load a projection with order_id, line_no, store_id, event_time and amount_cents. The daily aggregation emits only day, store and total. For store-level access, a database can also apply a row policy. PostgreSQL row-level security restricts which rows ordinary roles can see or modify. Owners normally bypass it unless forced, and superusers and roles with BYPASSRLS bypass it. Verify the policy as the consumer’s effective role. PostgreSQL 18, §5.9

Figure

Remove an unused field before copying

Remove an unused field before copyingSource orders contain email. The approved projection drops email. The published report groups by day and store.Restricted order sourceOrder lines and customer emailApproved input projectionLine keys, store, time, amountPublished daily resultDay, store, total
The sales calculation uses store, time and amount. The export omits email before it enters the analytical copy.

Check what remains inferable#

Removing direct identifiers reduces exposure. A dataset can still reveal facts when combined with other information. If a store-day cell contains exactly one sale and an observer knows the customer, the published total can reveal that customer’s amount. Replacing email with a stable token also leaves a way to link records over time. Such a token can be useful to a controlled process. Its presence does not establish that the data are anonymous. NIST’s de-identification report discusses linkage and the need to reason about the attacker and available auxiliary data. NISTIR 8053

A report can use a coarser grouping or suppress a small cell when its audience does not need the detail. The release rule needs to account for comparisons across versions. If a published total is 3200 cents and a later version is 3500, a reader who has both can compute the 300-cent difference. How much this reveals depends on what the reader already knows.

Distinguish a live row from a retained version#

Deleting a live row changes the current result. An older snapshot, exported file, log or backup can still contain the old data. In Iceberg, expiring snapshots makes data files eligible for removal when no retained snapshot references them. Retaining a snapshot for time travel can keep a file needed by that snapshot. An independent export is outside that table’s maintenance operation. Apache Iceberg, Expire snapshots

Use lineage to enumerate the known derived copies. Each copy has its own retention and removal mechanism. A backup may expire later than the live table, and a restoration process needs a rule for applying removals made after the backup. The design can reduce that burden by never placing the field in copies that do not need it.

Next#

Rules for data and access need signals that expose failures. Observing a data pipeline follows a report that was published successfully but is missing part of its input.

References#

  1. PostgreSQL Global Development Group. PostgreSQL 18, Row Security Policies. Specifies policies and which roles can bypass them.
  2. Simson L. Garfinkel. De-Identification of Personal Information. NISTIR 8053, 2015. Describes linkage and re-identification risk.
  3. Apache Iceberg. Maintenance, Expire snapshots. Describes how retained snapshots keep referenced files available.