OpenFGA is an open-source authorization engine. Its only job is to answer one question: “Is this user allowed to do this thing?” It does not run your app. It sits beside your app and says yes or no.
Permission logic gets messy. Rules like “only the owner can edit” or “managers can approve” spread across your code and get tangled.
OpenFGA pulls all of that into one place. Your app stops asking “does this user have the right role?” and instead asks OpenFGA “can this user do this?”
It is based on a Google paper called Zanzibar, the system Google uses for Docs, Drive, and YouTube. OpenFGA is an open version of that idea.
OpenFGA uses relationship-based access control (ReBAC).
Example of relationships:
Access flows along these links.
| Part | What it is |
|---|---|
| Store | A container holding your model and data. One project. |
| Authorization model | The rules. Written in a DSL. Holds the shape, not real users. |
| Relationship tuples | The data. Small facts as (user, relation, object). |
| Check API | The question. Returns allowed: true or allowed: false. |
A tuple looks like this:
(account:123, assignee, role:manager)
This means “account 123 is an assignee of role manager”. These tuples often come from your database through CDC (Change Data Capture).
The model plus the tuples form a graph. A Check walks that graph.
Example question:
Check: can account:123 do pos_order_approve on organization:default?
The steps:
allowed: true.
If any link is missing (for example, 123 was never made a manager), the walk
fails and the answer is allowed: false.
“only under $500” or “only during work hours”.
Input → Process → Output:
true or false; your app allows or blocks it.The result: rules live in one clear place, checks are fast, and different teams can own different parts of the model.