{"slug": "incrementally-computing-7b-permission-checks", "title": "Incrementally Computing 7B Permission Checks", "summary": "Auth0 Fine-Grained Authorization (FGA) expanded its offerings with the FGA Permissions Index, a precomputed authorization index that turns frequent permission checks into simple indexed lookups, and Auth0 FGA chose Feldera to accelerate development of the index. The Permissions Index incrementally computes all access grants implied by a permission when a relationship changes, so the cost of a permission change depends only on the portion of the graph that changes rather than the graph's total size. The optimization targets RAG-based AI agent workflows, where a single agent question can require thousands of permission checks against large, interconnected permission graphs.", "body_md": "Ask an AI agent one question and it might need thousands of permission checks before it answers correctly! In Retrieval-Augmented-Generation (RAG)-based workflows, an agent wants to retrieve all relevant objects from a database, but before any of those objects can be sent to the agent, they must be checked against the current authorization policy, which determines what the user (and thus the agent) is allowed to see. While evaluating the policy one object at a time is possible, it can quickly become a bottleneck for large, interconnected permission graphs.\n\nTo address this scaling expectation, Auth0 Fine-Grained Authorization (FGA) recently expanded its offerings to include the **FGA Permissions Index**. The FGA Permissions Index precomputes important authorization decisions, turning frequent authorization checks into simple indexed lookups.\n\n## What is Auth0 FGA?\n\nA relationship-based access control (ReBAC) system, like Auth0 FGA, works by remembering relationships - who has access to what, and why. For example, consider a question like “Which Google Drive folders does Alice’s agent have access to?” As you add more users, objects, and relationships between them, FGA builds a large graph of interconnected relationships. Checking whether a user has access to an object means finding one path through that graph that connects the two. If you want to find all the objects a user (or agent) has access to, you have to traverse every path and remember all the routes that exist. This is often an expensive set of operations for large, interconnected permission graphs.\n\nThe key innovation behind the FGA Permissions Index is it flips the work of an authorization check upside down: “What if you could do the expensive work **before** when permissions change, not after when someone checks access?” The Permissions Index cleverly calculates all these possible relationships in advance. When a new relationship is added to FGA, the Permissions Index quickly incrementally computes all access grants implied by the permission and saves them as direct paths. The result is that access lookups become constant.\n\n## FGA and Incremental View Maintenance\n\nPrecomputed indexes are not new. The database concept called *Incremental View Maintenance (IVM)* makes this possible by continuously updating an index as users join and leave groups, objects change owners, and relationships are added, removed, or modified. The key architectural challenge within the FGA Permissions Index is maintaining real-time freshness for deeply nested, fine-grained authorization graphs that change every millisecond!\n\n**That is why Auth0 FGA chose Feldera to accelerate development of the Permissions Index.** Feldera is backed by the mathematical promises of [DBSP](https://www.feldera.com/blog/best-research-paper-vldb-2023), which enables it to evaluate complex, recursive access schemas over massive datasets efficiently and with a finite amount of state. *With Feldera, the cost to compute a permission change depends only on the portion of the graph that changes, not on the graph’s total size!*\n\nThe result is a new authorization optimization that combines fast query-time lookups with continuously updated permissions—exactly what modern AI and search workloads expect.\n\n## An example Auth0 FGA Policy\n\nConsider an example Auth0 FGA policy that governs a simple file system with users, groups, and objects:\n\n- Users can be members of groups\n- Groups can own objects\n- Objects can be nested inside parent entities\n- Members of a group have write access (`can_view` ) to objects owned by the group and all recursive subobjects\n\n```\nmodel\n  schema 1.1\n\ntype user\ntype agent\n\ntype group\n  relations\n    define member: [user, agent]\n\ntype object\n  relations\n    define owner: [group]\n    define parent: [object]\n    define can_view: member from owner or can_view from parent\n```\n\n## With great power comes great computational complexity\n\nCentralized authorization policies are powerful, yet computationally demanding. To answer an authorization request, FGA traverses the entire permissions graph to find a chain of relationships that determines whether the requested operation is allowed.\n\nThe next figure shows an example authorization graph for the above policy. The `pink` path shows the relationship chain the engine traverses to determine that user `alice` has view access to the `secrets` object.\n\nThe Auth0 FGA engine can evaluate even complex authorization policies in milliseconds. However, modern search and AI workloads increasingly issue authorization checks in bulk at extremely high rates, pushing any request-by-request evaluation model to its limits.\n\nOne example is [Search With Permissions](https://docs.fga.dev/integration/advanced/search-with-permissions). Consider a query over a large corpus of data that returns the top 20 results. Before any result can be shown, filtered, or sorted, it must first be checked against the authorization policy to determine if the user has access. If most or all of those results are filtered out, the system must either return fewer relevant results or fetch and evaluate another batch. The first option degrades result quality; the second increases latency and places additional load on the search engine.\n\nThe challenge becomes even greater with AI agents *performing RAG-style retrieval* over private datasets. Agents acting on behalf of a user must only observe data that the user is authorized to access. At scale, agentic workloads can generate thousands of authorization checks per second. Good algorithm design can make each graph traversal faster, but it cannot eliminate it altogether.\n\nTo optimize throughput for these massive check-heavy workloads, Auth0 FGA built upon its core authorization engine to provide an ultra-fast, precomputed Permissions Index.\n\n## Scaling by Precomputing Every Authorization Decision\n\nThe Permissions Index is a calculated trade-off that shifts latency from query time to write time. Instead of waiting to evaluate every authorization request on demand, it precomputes authorization decisions in advance. Authorization checks then become simple index lookups instead of graph traversals. The idea is inspired by Google Zanzibar’s Leopard Index, which describes an implementation of a semi-offline, precomputed authorization decision engine.\n\nFor the graph above, the Permissions Index precomputes the following permissions:\n\n```\nuser:alice can_view object:test-root\nuser:alice can_view object:src\nuser:alice can_view object:api\nuser:alice can_view object:secrets\n\nagent:alice-agent can_view object:test-root\nagent:alice-agent can_view object:src\nagent:alice-agent can_view object:api\nagent:alice-agent can_view object:secrets\n\nuser:carol can_view object:prod-root\nuser:carol can_view object:deploy\nuser:carol can_view object:db\n```\n\nNote: The Permissions Index thus complements the existing Auth0 FGA APIs. The Permissions Index is helpful in handling initial authorization checks in “hot path” scenarios, but FGA remains the source of truth for writes and critical checks. Check the “cache” of the Permissions Index first, and fall back to FGA if the index is not fresh enough.\n\nThe combination is a more secure-by-default platform that can provide dramatically lower per-query latency, higher throughput, and significantly more predictable tail latencies under heavy load.\n\n## Keeping the index fresh at scale with Feldera\n\nThe real challenge with precomputing indexes is keeping the index up to date, which we tackle with Feldera and *incremental view maintenance*.\n\nIn a large system, the authorization graph is constantly changing: Users join and leave groups, objects are created and deleted, and permissions are granted and revoked. A single update can change many derived authorization decisions, invalidating part of the Permissions Index. When a small change happens, we only need to update the affected part of the index instead of wastefully recomputing the entire index from scratch periodically.\n\nLet’s say the user moves the `secrets` object from the `test-root` to the `prod` root directory.\n\nThe engine revokes two previously computed authorization decisions from the index and inserts a new permission instead:\n\n```\nDELETE: user:alice can_view object:secrets\nDELETE: agent:alice-agent can_view object:secrets\nINSERT: user:carol can_view object:secrets\n```\n\nFeldera is well-suited for the above logic. It takes a SQL program consisting of tables and views, and continuously and incrementally updates the views as the input data changes:\n\n**Expressive.** FGA programs can be compiled to Feldera SQL using a straightforward mechanical transformation. In addition to standard SQL, Feldera supports mutually recursive views, which makes it possible to encode recursive FGA rules, such as inherited permissions through nested objects. We show an example of this transformation below.\n\n**Fully incremental.** Feldera evaluates queries incrementally end-to-end. Intuitively, it recomputes only the records affected by an input change and never falls back to a full recomputation. This makes update latency predictable even as the authorization graph grows.\n\n**Larger than memory.** Feldera maintains its internal state in persistent storage and uses memory as a cache. This allows it to process workloads whose state is much larger than available RAM, including multi-terabyte datasets on machines with only a few GiB of memory.\n\n**Fast at scale.** Feldera is designed for programs with many nested views operating over very large datasets. It can process high update rates while maintaining low-latency derived results, making it a good fit for continuously updated authorization indexes.\n\n**Consistent.** The output of a Feldera pipeline precisely reflects all inputs processed by the pipeline. It never exposes partial or inconsistent states. For the Permissions Index, this means users can determine when a change to the authorization graph has been fully evaluated and applied to the index.\n\nThe following program shows how the FGA policy from our running example can be encoded in Feldera SQL:\n\n```\nCREATE TABLE users (\n   id BIGINT NOT NULL PRIMARY KEY);\n\nCREATE TABLE agents (\n   id BIGINT NOT NULL PRIMARY KEY);\n\nCREATE TABLE groups (\n   id BIGINT NOT NULL PRIMARY KEY);\n\n-- Object hierarchy. `parent_id` models the `parent` relation between objects.\nCREATE TABLE objects (\n   id BIGINT NOT NULL PRIMARY KEY,\n   parent_id BIGINT);\n\n-- `member(user, group)` — users and agents belonging to groups.\nCREATE TABLE members (\n   id BIGINT NOT NULL PRIMARY KEY,\n   user_id BIGINT NOT NULL,\n   group_id BIGINT NOT NULL);\n\n-- `owner(object, group)` — groups that own objects.\nCREATE TABLE object_owner (\n   object_id BIGINT NOT NULL,\n   group_id BIGINT NOT NULL);\n\nDECLARE RECURSIVE VIEW can_view (\n   user_id BIGINT NOT NULL,\n   object_id BIGINT NOT NULL);\n\nCREATE MATERIALIZED VIEW can_view AS\n-- `can_view: member from owner` — a group member can view objects owned by the group.\n(\n   SELECT\n       members.user_id,\n       object_owner.object_id\n   FROM\n       members\n       JOIN object_owner ON members.group_id = object_owner.group_id\n)\nUNION ALL\n-- `can_view: can_view from parent` — read access on a object inherits to its children.\n(\n   SELECT\n       can_view.user_id,\n       objects.id AS object_id\n   FROM\n       can_view\n       JOIN objects ON can_view.object_id = objects.parent_id\n);\n```\n\nThe following diagram shows how Feldera is used to compute the Permissions Index.\n\n**A Feldera pipeline** incrementally evaluates the authorization policy by transforming a stream of changes to the authorization graph into a stream of changes to the Permissions Index.\n\nThe pipeline definition is generated by converting the FGA model to a SQL program similar to the one above.\n\nFeldera represents both its inputs and outputs *as streams of changes.* It ingests updates to the authorization graph from FGA and outputs updates to the index. On startup, the pipeline ingests the entire contents of the authorization graph and computes the first set of updates that represent the initial Permissions Index contents. After that, the pipeline proceeds in smaller increments, converting new authorization graph changes into Permissions Index updates in real time.\n\nThe pipeline annotates permission changes with freshness markers that let users measure end-to-end update latency and determine when a specific authorization graph change has been fully processed and reflected in the Permissions Index.\n\nThe pipeline runs as a separate Kubernetes pod, providing strong isolation between workloads that belong to different tenants.\n\n## Results\n\nTo get a sense of the numbers, here are some initial results. The strength of incremental computation is clear: Feldera maintains a complex index of permissions on a single node and applies updates with sub-second latency, without recomputing the index from scratch.\n\nDirectly assigned relations (tuple change)\n\n4.5B+\n\nDerived relations\n\n5.4B+\n\nPermissions index size\n\n7.1B+\n\nEnd-to-end index update latency\n\nAvg\n\n194.57ms\n\nMax\n\n5.46s\n\nFeldera pipeline resources\n\nMax used memory\n\n58GB\n\nMax used storage\n\n11.8TB\n\n## Try it!\n\nThe Auth0 FGA Permissions Index is currently in **Early Access**. For more information:\n\n- Read Auth0’s [announcement blog](https://auth0.com/blog/auth0-fga-permissions-index-early-access/)\n- View our permissions index [documentation](https://docs.fga.dev/permissions-index/fga-permissions-index)\n- Get started [here](https://docs.fga.dev/permissions-index/getting-started)\n\n## Learn More\n\nFeldera’s unique capabilities come from its foundation in DBSP, a mathematical framework for incremental computation. Just as relational algebra provides the foundation for conventional databases, DBSP provides a foundation for incremental query processing. The DBSP paper won the Best Paper Award at VLDB 2023, and the Feldera team develops an open-source implementation of DBSP as part of the Feldera project:", "url": "https://wpnews.pro/news/incrementally-computing-7b-permission-checks", "canonical_source": "https://www.feldera.com/blog/auth0-and-feldera-incrementally-computing-7-billion-permission-checks", "published_at": "2026-09-18 18:43:17+00:00", "updated_at": "2026-09-18 18:55:30.247588+00:00", "lang": "en", "topics": ["ai-agents", "ai-infrastructure", "artificial-intelligence"], "entities": ["Auth0", "Auth0 Fine-Grained Authorization", "FGA Permissions Index", "Feldera", "DBSP"], "alternates": {"html": "https://wpnews.pro/news/incrementally-computing-7b-permission-checks", "markdown": "https://wpnews.pro/news/incrementally-computing-7b-permission-checks.md", "text": "https://wpnews.pro/news/incrementally-computing-7b-permission-checks.txt", "jsonld": "https://wpnews.pro/news/incrementally-computing-7b-permission-checks.jsonld"}}