Skip to main content

Authorization Concepts

Authentication and Authorization

Authentication ensures a user's identity. Authorization determines if a user can perform a certain action on a particular resource.

For example, when you log in to Google, Authentication is the process of verifying that your username and password are correct. Authorization is the process of ensuring that you can access a given Google service or feature.

What is Fine-Grained Authorization?

Fine-Grained Authorization (FGA) implies the ability to grant specific users permission to perform certain actions in specific resources.

Well-designed FGA systems allow you to manage permissions for millions of objects and users. These permissions can change rapidly as a system continually adds objects and updates access permissions for its users.

A notable example of FGA is Google Drive: access can be granted either to documents or to folders, as well as to individual users or users as a group, and access rights regularly change as new documents are created and shared with specific users or groups.

What is Role-Based Access Control?

In Role-Based Access Control (RBAC), permissions are assigned to users based on their role in a system. For example, a user needs the editor role to edit content.

RBAC systems enable you to define users, groups, roles, and permissions, then store them in a centralized location. Applications access that information to make authorization decisions.

What is Attribute-Based Access Control?

In Attribute-Based Access Control (ABAC), permissions are granted based on a set of attributes that a user or resource possesses. For example, a user assigned both marketing and manager attributes is entitled to publish and delete posts that have a marketing attribute.

Applications implementing ABAC need to retrieve information stored in multiple data sources - like RBAC services, user directories, and application-specific data sources - to make authorization decisions.

What is Policy-Based Access Control?

Policy-Based Access Control (PBAC) is the ability to manage authorization policies in a centralized way that’s external to the application code. Most implementations of ABAC are also PBAC.

What is Relationship-Based Access Control?

Relationship-Based Access Control (ReBAC) enables user access rules to be conditional on relations that a given user has with a given object and that object's relationship with other objects. For example, a given user can view a given document if the user has access to the document's parent folder.

ReBAC is a superset of RBAC: you can fully implement RBAC with ReBAC. ReBAC also lets you natively solve for ABAC when attributes can be expressed in the form of relationships. For example ‘a user’s manager’, ‘the parent folder’, ‘the owner of a document’, ‘the user’s department’ can be defined as relationships.

OpenFGA extends ReBAC by making it simpler to express additional ABAC scenarios using Conditions or Contextual Tuples.

ReBAC can also be considered PBAC, as authorization policies are centralized.

What is Zanzibar?

Zanzibar is Google's global authorization system across Google's product suite. It’s based on ReBAC and uses object-relation-user tuples to store relationship data, then checks those relations for a match between a user and an object. For more information, see Zanzibar Academy.

ReBAC systems based on Zanzibar store the data necessary to make authorization decisions in a centralized database. Applications only need to call an API to make authorization decisions.

OpenFGA is an example of a Zanzibar-based authorization system.

OpenFGA Concepts

Learn about the OpenFGA Concepts

Modeling: Getting Started

Learn about how to get started with modeling your permission system in OpenFGA.