---
title: "Policy Zones: How Meta enforces purpose limitation at scale in batch processing systems"
description: "Meta's Policy Zones, part of its Privacy Aware Infrastructure, applies information flow control to enforce purpose limitation across an exabyte-scale data warehouse."
url: "https://swe.quest/articles/policy-zones-how-meta-enforces-purpose-limitation-at-scale-in-batch-processing-615adcc0c88f4c90"
canonical: "https://engineering.fb.com/2025/07/23/security/policy-zones-meta-purpose-limitation-batch-processing-systems/"
source: "Meta Engineering"
published: "2025-07-23"
difficulty: "medium"
kind: "Case study"
reading_minutes: 20
tags: ["privacy","data-pipelines","identity-auth","sql"]
---

# Policy Zones: How Meta enforces purpose limitation at scale in batch processing systems

A post on [Meta Engineering](https://swe.quest/sources/meta.md), published 2025-07-23, 20 min read, Case study. Original: [https://engineering.fb.com/2025/07/23/security/policy-zones-meta-purpose-limitation-batch-processing-systems/](https://engineering.fb.com/2025/07/23/security/policy-zones-meta-purpose-limitation-batch-processing-systems/)

## Summary

Meta's Policy Zones, part of its Privacy Aware Infrastructure, applies information flow control to enforce purpose limitation across an exabyte-scale data warehouse. Datasets and loggers carry Governable Data Annotations such as MESSAGING\_DATA, and downstream data must be at least as restrictive as its sources. A SQL parser (UPM) turns queries from processors like Presto into semantic trees. A Policy Evaluation Service checks each flow and issues a cryptographically signed token that the Warehouse Permission Service validates at access time. Policy Zone Manager tooling handles label creep through reclassification, letting the system run across millions of datasets, tens of millions of daily flows and trillions of consent checks per hour.

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)
- [Data pipelines](https://swe.quest/tags/data-pipelines.md) (Data & databases)
- [Identity & auth](https://swe.quest/tags/identity-auth.md) (Security)
- [SQL](https://swe.quest/tags/sql.md) (Languages)

## Prerequisites

- data warehouse batch processing ([easy posts on Analytics & OLAP](https://swe.quest/tags/analytics.md?difficulty=easy))
- SQL ([easy posts on SQL](https://swe.quest/tags/sql.md?difficulty=easy))
- access control lists

## Keywords

Policy Zones, Privacy Aware Infrastructure, Information Flow Control, Presto, Dataswarm, Scribe, Governable Data Annotations, Unified Programming Model

## Related posts

- [How Meta enforces purpose limitation via Privacy Aware Infrastructure at scale](https://swe.quest/articles/how-meta-enforces-purpose-limitation-via-privacy-aware-infrastructure-at-scale-4130d5b9e1cba60a.md): Meta Engineering · 2024-08-27 · Medium · 14 min read · Privacy, Security, Data pipelines
  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.
- [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.
- [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.
- [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.

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)
