---
title: "How Meta enforces purpose limitation via Privacy Aware Infrastructure at scale"
description: "Meta enforces purpose limitation (data used only for allowed purposes) with Policy Zones, an information flow control system built into HHVM, Presto, Spark and other infrastructure."
url: "https://swe.quest/articles/how-meta-enforces-purpose-limitation-via-privacy-aware-infrastructure-at-scale-4130d5b9e1cba60a"
canonical: "https://engineering.fb.com/2024/08/27/security/privacy-aware-infrastructure-purpose-limitation-meta/"
source: "Meta Engineering"
published: "2024-08-27"
difficulty: "medium"
kind: "Case study"
reading_minutes: 14
tags: ["privacy","security","data-pipelines"]
---

# How Meta enforces purpose limitation via Privacy Aware Infrastructure at scale

A post on [Meta Engineering](https://swe.quest/sources/meta.md), published 2024-08-27, 14 min read, Case study. Original: [https://engineering.fb.com/2024/08/27/security/privacy-aware-infrastructure-purpose-limitation-meta/](https://engineering.fb.com/2024/08/27/security/privacy-aware-infrastructure-purpose-limitation-meta/)

## Summary

Meta enforces purpose limitation (data used only for allowed purposes) with Policy Zones, an information flow control system built into HHVM, Presto, Spark and other infrastructure. It replaces fragile point checks and ACL-based physical data separation with runtime checks on annotated data flows. Developers label data assets and requests or functions with annotations. Zones then propagate context through function call stacks or SQL batch jobs and flag violations in logging mode before switching to blocking enforcement. Policy Zone Manager tooling, backed by data lineage and an ML classifier, guides large rollouts through four steps: identify assets, discover downstream flows, remediate each flow (annotate the sink, block it, or reclassify it), and enforce and monitor.

Written by swe.quest, not by the author.

**Difficulty:** Medium: assumes a working developer; shows how it is built or done

## Topics

- [Privacy](https://swe.quest/tags/privacy.md) (Security)
- [Security](https://swe.quest/tags/security.md) (Security)
- [Data pipelines](https://swe.quest/tags/data-pipelines.md) (Data & databases)

## Prerequisites

- access control lists
- data lineage concepts

## Keywords

Policy Zones, Privacy Aware Infrastructure, Policy Zone Manager, information flow control, HHVM, Presto, Spark

## Related posts

- [Policy Zones: How Meta enforces purpose limitation at scale in batch processing systems](https://swe.quest/articles/policy-zones-how-meta-enforces-purpose-limitation-at-scale-in-batch-processing-615adcc0c88f4c90.md): Meta Engineering · 2025-07-23 · Medium · 20 min read · Privacy, Data pipelines, Identity & auth, SQL
  Meta's Policy Zones, part of its Privacy Aware Infrastructure, applies information flow control to enforce purpose limitation across an exabyte-scale data warehouse.
- [How Meta discovers data flows via lineage at scale](https://swe.quest/articles/how-meta-discovers-data-flows-via-lineage-at-scale-8ef1c9f35e0ab6a8.md): Meta Engineering · 2025-01-23 · Medium · 13 min read · Privacy, Static analysis, Data pipelines, Observability
  Meta builds a data lineage graph across its web, data warehouse and AI systems to find where sensitive data such as Facebook Dating religion fields flows, so privacy controls like Policy Zones can be applied.
- [PrivacyLib: Privacy Controls at the Data Access Boundary](https://swe.quest/articles/privacylib-privacy-controls-at-the-data-access-boundary-f868c0b03bdc9ad2.md): Meta Engineering · 2026-10-27 · Medium · 17 min read · Privacy, System design, Identity & auth, AI agents, Performance engineering
  PrivacyLib is a common library embedded in the clients of hundreds of Meta data and processing systems that enforces and observes privacy requirements at the point of data access.
- [Scaling Privacy Infrastructure for GenAI Product Innovation](https://swe.quest/articles/scaling-privacy-infrastructure-for-genai-product-innovation-98d3311fada3a633.md): Meta Engineering · 2025-10-23 · Easy · 9 min read · Privacy, Data pipelines, LLMs, Observability
  Meta scales its Privacy Aware Infrastructure (PAI) to cover GenAI products such as its AI glasses, using cross-stack data lineage as the foundation for automated privacy enforcement.
- [How Meta understands data at scale](https://swe.quest/articles/how-meta-understands-data-at-scale-ab2f3889e09c8113.md): Meta Engineering · 2025-04-28 · Medium · 19 min read · Privacy, Data pipelines, Machine learning, System design
  Meta's Privacy Aware Infrastructure builds data understanding by schematizing every data asset in a canonical Thrift-based format (DataSchema, covering over 100 million schemas across 100+ systems) and annotating fields with a universal privacy taxonomy of semantic types.

Browse: [Latest posts](https://swe.quest/index.md) · [Topics](https://swe.quest/tags.md) · [Sources](https://swe.quest/sources.md) · [Topic map](https://swe.quest/map.md) · [Site guide (llms.txt)](https://swe.quest/llms.txt)
