Book Deep-Read · Fundamentals of Data Engineering · Chapter 10
Fundamentals of Data Engineering · Ch 10 · Security and Privacy · Reis & Housley · 2022
When you shop online you leave a phone number, an address, and a list of what you bought. All of it ends up in the company's data warehouse, where analysts and algorithms use it again and again. This chapter is about how the people who run that data keep it from being stolen, snooped on, or lost. The authors are blunt: security is not just the security team's job. Every config line a data engineer writes decides whether the data is safe.
Most data leaks don't involve a brilliant hacker. Someone pastes the warehouse key into code, and the code ends up public. Someone sets the "filing cabinet" that holds the data so that anyone can open it. The most common hole isn't a machine; it's a person taking a shortcut.
Good teams treat security like brushing their teeth, a daily habit, not a once-a-year spring clean: hand out fewer permissions by default, put keys in a proper safe, keep software updated, and record who looked at what. One honest cost: the tighter the permissions, the more often people have to ask before they get data, and the team has to live with that friction.
Data security isn't one big lock. It's everyone's habits: imagine the worst, don't collect what you don't need, give out only the key that's needed, and lock your own door.
Want the people–process–technology layers, security theater versus security habit, least privilege and time-boxed access, the cloud's shared responsibility, why encryption isn't a silver bullet, the four signals to monitor, and evidence from Netflix, AWS, and Log4Shell? → Switch to Deep
You'd think data security comes down to stronger technology: better encryption, a pricier firewall. In fact most breaches come from people and process: credentials committed to code, admin rights for everyone, a storage bucket set to public. The chapter builds three ideas. Security is an undercurrent of data engineering that runs through every stage of the lifecycle. Defenses come in three layers, people → process → technology, and the weakest link is usually people. And what works is a daily habit, not a compliance performance, built on least privilege, collecting less sensitive data, prompt patching, and real backups.
The first chapter of Part III, "Security, Privacy, and the Future." The first nine chapters walked the lifecycle (generation → storage → ingestion → transformation → serving), and Chapter 2 put security first among the six undercurrents. This chapter pulls that cross-cutting thread out on its own and leads into Chapter 11, "The Future of Data Engineering." In practice it maps to warehouse permission design, secret management, cloud account governance, and compliance regimes like GDPR.
Picture an e-commerce company with tens of billions in annual sales. Its warehouse holds orders, phone numbers, and delivery addresses for 200 million users. All 40 analysts and data scientists are warehouse admins, because it's easier. Airflow jobs and notebooks contain database passwords in plain text. A bucket of export files is publicly readable so partners can download it easily. Backups? "The cloud provider must have some." It all runs fine until one day:
On top of the direct damage comes regulation. The EU's GDPR caps fines for serious violations at 4% of global annual turnover or €20 million, whichever is higher. California has the CCPA, and health data falls under HIPAA. The authors' warning: data engineers handle exactly the data these laws protect, so you can't assume security is someone else's problem.
The authors organize the chapter around people, processes, and technology. The order is itself the point: no technical defense stops an employee who tells a stranger their password.
The power of negative thinking. The authors want you to rehearse failure while designing every pipeline: if this data leaked, what would happen, and who could get it? From that comes the chapter's most practical rule: the best way to protect sensitive data is not to ingest it in the first place. If a retention analysis doesn't need national ID numbers, block or mask them at ingestion rather than collecting them and figuring out how to hide them later.
Always be paranoid. When someone asks for credentials or a data export by email, phone, or chat, verify through a separate trusted channel, even if the request seems to come from an executive. Social engineering (tricking people's trust rather than exploiting system flaws) works precisely because it walks around every technical defense.
Security theater is what the authors argue against: polished documents for the compliance audit, a security pledge signed once a year, a ticked checklist, and nothing actually done differently. A security habit builds security into the everyday: check permissions in code review, check configs before release, review incidents regularly.
Active security: don't copy a static checklist. Keep researching the threats aimed at your organization: which systems you run, where your people tend to get phished, what has recently happened to similar companies. Then adjust.
The principle of least privilege: every person and every system gets only the permissions needed for the work at hand right now, and those are revoked when done. The authors call out two common violations: handing out admin roles because it's easier, and doing everyday work as root. The principle applies to data too. An analyst who can query order aggregates doesn't thereby get to see phone numbers. Grant specific columns or rows, or a masked view.
What if someone really needs sensitive data for a while? The book's answer is a break-glass process, like smashing the case to reach the fire axe: request, approval, a time limit, a full audit trail, and automatic revocation when time is up.
The shared responsibility model: the cloud provider secures the cloud itself (data centers, hardware, the virtualization layer). You secure what's in the cloud: account permissions, network rules, whether buckets are public, whether data is encrypted. The authors stress that many cloud data breaches come from customers' own misconfigurations, not from the provider being compromised.
Always back up your data. Data gets lost to accidental deletes and hardware failure, and it gets encrypted by ransomware. The authors call for regular backups and regular restore drills. A backup you've never restored from doesn't count.
The book offers a minimal policy you can adopt as is, in three parts. Protect credentials: use single sign-on (SSO) and multi-factor authentication (MFA, which asks for a second factor such as a phone code on top of the password) wherever possible. Use cloud IAM roles instead of long-lived keys. Keep secrets in a secret manager, and never embed them in code. Protect devices: central device management, remote wipe for lost laptops, automatic screen lock. Software updates: keep browsers, operating systems, and dependencies current.
Patch and update. Operating systems, databases, and open-source dependencies all ship vulnerabilities. Putting off upgrades leaves a known door open.
Encryption is not a magic bullet. Encryption at rest and in transit is now the baseline, on by default in most cloud services. But the authors point out that it only covers a stolen disk or a tapped link. It does nothing against someone who logs in with valid credentials. When an employee account is stolen, the data is decrypted for the attacker as a matter of course.
Logging, monitoring, and alerting. The authors name four kinds of signal. Access: who logged in when, from where, and what they queried. Resources: abnormal spikes in disk, CPU, or memory, which may mean cryptomining or data exfiltration. Billing: a sudden jump in the cloud bill is often the first sign of an intrusion. Excess permissions: permissions and accounts that go unused for long stretches should be reclaimed.
Network access. Don't expose databases directly to the public internet. Shrink the attack surface with IP allowlists, private networks, and firewall rules, and open admin ports like SSH only to specific sources.
Low-level security and internal research. Engineers often spot a system's weak points before the security team does. The authors encourage a culture where people report a suspicious config or a vulnerability instead of quietly working around it.
Privacy asks whether data should be used this way at all. Beyond collecting less, the book's earlier chapters add two requirements. Mask or tokenize PII (tokenization swaps the real value for a meaningless stand-in). And build in the ability to honor regulatory requests such as "delete this user's data." When copies are scattered across raw, cleaned, backup, and downstream layers, deleting everything is much harder than it sounds.
Table 1 · Security theater vs. security habit
| Dimension | Security theater | Security habit |
|---|---|---|
| Cadence | A scramble before audits, once a year | Every review, every release |
| Output | Documents, signatures, ticked boxes | Tightened permissions, fixed configs |
| Threat model | Generic template | Specific to the org, kept current |
| Cost | Looks cheap; most expensive when it fails | More time day to day, more access requests |
Table 2 · What each control stops, and what it doesn't
| Control | Stops | Doesn't stop | Cost |
|---|---|---|---|
| Don't collect / mask | The root of sensitive-data leaks | Cases that truly need plain text | Some analyses become impossible; justify up front |
| Least privilege + break-glass | Blast radius after one account falls | Theft of a highly privileged account | Approvals slow down data access |
| SSO + MFA | Phished or reused passwords | Stolen session tokens, insiders | One more login step |
| Secret manager | Credentials in code leaking with the repo | An attacker holding the runtime identity | Pipelines must change how they read secrets |
| Encryption at rest / in transit | Stolen disks, tapped links | Logins with valid credentials | Baseline; near zero cost in the cloud |
| Private network + allowlist | Internet scans, brute force | Attackers already inside | Harder remote and partner access |
| Independent backup + drills | Accidental deletes, ransomware | Leaks after data is stolen | Storage cost, drill time |
None of these is enough alone. Combined, they make defense in depth. Granularity is a trade-off too. Database-level grants are the easiest and the coarsest. Column-level, row-level, and dynamic masking fit least privilege best, at the price of a growing pile of policies that someone has to maintain. A common practice is to tier data by sensitivity (public, internal, confidential, regulated: PII, payments, health) and govern each tier more tightly than the one below.
Asked in an interview to "design a data platform that stores user behavior and PII," a strong answer lands like this. Detect and tokenize phone and ID numbers at ingestion. Partition the warehouse by sensitivity tier: analysts get masked views by default, and row-level detail goes through time-boxed elevation. Jobs run as IAM roles rather than with long-lived keys, passwords live in a secret manager, and CI scans commits so keys never land in the repo. Buckets are private by default and databases sit on private networks. Alerts watch for unusual logins, unusually large exports, and billing spikes. Backups live in a separate account and get a restore drill every quarter. Mainstream platforms have the matching features: Snowflake and BigQuery support column-level access control and dynamic masking, and AWS Lake Formation offers table-, column-, and row-level grants.
Industry / open-source evidence
① Security is an undercurrent of data engineering that runs through every lifecycle stage. It is not the security team's job alone.
② Defenses come in three layers: people, process, technology. The weakest link is usually people, so think negatively, stay paranoid, and verify credential requests through another channel.
③ The best way to protect sensitive data is not to ingest it. If you must, mask or tokenize it as early as possible.
④ Build security habits, not security theater. Actively research the threats aimed at your organization instead of copying a static checklist.
⑤ Least privilege: grant only what's needed now and revoke it afterward. Temporary access to sensitive data goes through a time-boxed, approved, audited break-glass process.
⑥ Shared responsibility: the provider secures the cloud itself; you own configs, permissions, and data. A public bucket is on you.
⑦ Credentials go in a secret manager, never in code. Use SSO + MFA, make devices remotely wipeable, and keep software updated.
⑧ Encryption is a baseline, not a silver bullet. Monitor access, resources, billing, and excess permissions. Keep databases off the public internet.
⑨ Always back up and rehearse restores. Privacy also means being able to delete one user's data completely.