
RBAC is a helpful control model used by organizations to establish and police access to their digital resources. RBAC is widely accepted as an effective method of access control, particularly for organizations with an IT infrastructure and requirements that span a multitude of systems and applications. With RBAC roles and privileges can be easily assigned to users effectively regulating their activity within the system, reducing the threat of unauthorized access to sensitive information and ensuring the integrity of data that is vital to the smooth operation of the enterprise.
apiVersion: api.cerbos.dev/v1
resourcePolicy:
version: default
resource: rbacExample
rules:
# If the principal's role is ADMIN then all the actions are allowed.
- actions:
- "*"
effect: EFFECT_ALLOW
roles:
- ADMIN
# If the principal's role is USER or MANAGER then creating and reading is allowed.
- actions:
- create
- read
effect: EFFECT_ALLOW
roles:
- USER
- MANAGER
# If the principal's role is MANAGER then they can also update
- actions:
- update
effect: EFFECT_ALLOW
roles:
- MANAGER
In this policy for a purchase order a user is granted permission to do defined actions based on their role. Admins can do all actions, users can create and read, and managers can also update a PO.
Try out this pre-built policy in the Cerbos Playground
The following represent the key characteristics of a role-based access control system and are common to all such systems regardless of the size of the organization or the complexity of its digital infrastructure.
Roles: For the purposes of access to digital assets roles are typically assigned based on job functions, responsibilities and other attributes. For instance, within a given organization roles may include admin, manager and employee. Each role is then assigned a variety of permissions based on the person’s job description. Some will have extremely limited access while others will have carte blanche.
Permissions: RBAC relies on permissions being assigned to various roles. These permissions specify which digital assets a user will have access to along with the specific actions they will be able to perform in relation to those assets. For example, both an employee and a manager may be able to view a certain file but only the manager will have permission to alter its content or delete it.
Users: Without users, there is no need for role-based access controls. Users are those individuals, processes or applications that need to interact with the system. Each user is assigned a role based on their responsibilities. In some cases, a user may be assigned more than one role.
Resources: Resources - also referred to as “objects” - are those digital assets users will need to access, manipulate or perhaps execute. Resources include files, databases, servers, scripts and other components of the computer infrastructure.
RBAC establishes both roles and permissions and then combines them in a way that ensures the integrity of an organization’s digital resources. Basic RBAC principles include:
Role-based access control offers a variety of benefits including scalability, simple administration and robust accountability via a clear audit trail. Organization-wide changes can be automatically implemented by simply modifying a given permission or role. This makes RBAC one of the most cost-effective methods of access control for large organizations.
Fit Cerbos seamlessly into your tech stack
Prototype policies in your browser right now
Implement roles & permissions in your app
Book an intro call and learn more
Join thousands of developers | Features and updates | 1x per month | No spam, just goodies.
What is Cerbos?
Cerbos is an end-to-end enterprise authorization software for Zero Trust environments and AI-powered systems. It enforces fine-grained, contextual, and continuous authorization across apps, APIs, AI agents, MCP servers, services, and workloads.
Cerbos consists of an open-source Policy Decision Point, Enforcement Point integrations, and a centrally managed Policy Administration Plane (Cerbos Hub) that coordinates unified policy-based authorization across your architecture. Enforce least privilege & maintain full visibility into access decisions with Cerbos authorization.