Introduction to Authorization and OpenFGA
What Is OpenFGA?
Authentication vs Authorization
For example, when logging in to Twitter, the process in which Twitter verifies the user's username and password are correct is Authentication. The process of checking if that user can view or reply to a certain Tweet is Authorization.
What Is Fine-Grained Authorization (FGA)?
Fine-Grained Authorization is being able to grant individual users access to specific objects or resources in a system. FGA at scale means being able to do so in a system that can have millions of objects, users and relations, and has a high change rate - objects are regularly added and access permissions are constantly being updated. A good example of this is Google Drive, where access can be granted either to documents, or folders; it can be granted to users individually or as a group. Access regularly changes as new documents are created and shared with specific users, whether inside the same company or outside.
What Are Role-Based Access Control (RBAC) And Attribute-Based Access Control (ABAC)?
In Role-Based Access Control, permissions are assigned to users based on their role in a system (e.g. a user would need an
editor role to edit posts).
In Attribute-Based Access Control, instead of permissions being granted based on roles, they are granted based on a set of attributes on a user or resource (e.g. if a user has both
manager attributes they can publish and delete posts that have a
marketing attribute, but not others).
What Is Relationship Based Access Control (ReBAC)?
ReBAC allows expressing rules based on relations that users have with objects and that objects have with other objects. For example, a user can view a document if they can view its parent folder.
What Is Zanzibar?
Zanzibar is "Google's Consistent, Global Authorization System" for "determining whether online users are authorized to access digital objects" across their products (Google Drive, YouTube, Google Photos, etc..). It uses (object, relation, user) tuples to store relation data and traverses those relations to check if there is a relation between a user and an object.
Learn more about Zanzibar at the Zanzibar Academy.