How Authorization Works
Frontier’s authorization system determines access based on roles assigned to users. When a request is made, the system checks whether the user has the necessary permissions through their assigned roles.RBAC Model
Frontier implements Role-Based Access Control (RBAC) with the following components:Permissions
Permissions define what actions can be performed on resources. They follow the format
service.resource.verb (e.g., app.organization.update).Roles
Roles are collections of permissions that can be assigned to users. Frontier provides predefined roles like
app_organization_owner and supports custom roles.Policies
Policies bind roles to principals (users, groups, service accounts) on specific resources, granting the role’s permissions to those principals.
SpiceDB Integration
SpiceDB is Authzed’s open-source Google Zanzibar-inspired permission system that powers Frontier’s authorization. SpiceDB answers the fundamental authorization question:How SpiceDB Works
Permissions are defined as relationships between users and resources. The system:- Defines a schema that specifies relationships between users and resources
- Stores relationships in SpiceDB’s data store
- Builds a permission graph where nodes represent users/resources and edges represent permissions
- Traverses the graph during permission checks to determine access
Frontier maintains the SpiceDB schema in
base_schema.zed and automatically syncs it with custom permissions defined at runtime.Key Concepts
Namespaces
Namespaces are logical containers that organize permissions and resources. Frontier uses:- Predefined namespaces:
app/organization,app/project,app/group,app/user - Custom namespaces: For application-specific resources like
compute/instanceorstorage/file
Permission Format
Permissions are represented in multiple formats:namespace_resource_action) used internally.
Hierarchical Permissions
Frontier supports permission inheritance:- Organization-level permissions cascade to projects, groups, and resources within that organization
- Higher-level permissions include lower-level capabilities (e.g.,
administerincludesupdate,get, anddelete)
Authorization Flow
When a user attempts an action:Identity Retrieved
Frontier extracts user credentials from session, access token, or client ID/secret
Internals: Roles and Role Bindings
Frontier models authorization using two key SpiceDB objects:app/role
Defines a collection of permissions. When created, Frontier establishes relations between the role and each permission:app/rolebinding
Binds a role to a principal on a resource:This design allows dynamic role creation/updates without schema changes, as roles are data rather than schema definitions.
Next Steps
Permissions
Learn about permission management and custom permissions
Roles
Explore predefined and custom roles
Policies
Understand policy management and role binding
Examples
See real-world authorization patterns