RBAC vs ABAC: Comparing and Combining Access Control Strategies

July 12, 2023 · 9 min read RBACABAC
Feature Image

Access control strategies are pivotal in protecting the integrity of an organization’s data. Two widely used models are Role-Based Access Control (RBAC) and Attribute-Based Access Control (ABAC), with each model offering unique strengths and potential limitations.

This article aims to offer a comprehensive comparison between RBAC and ABAC, including potential approaches for combining these strategies. The goal is to equip you with the knowledge required to choose the most suitable strategy for your needs, by dissecting these models and understanding their inherent merits and drawbacks.

RBAC vs ABAC: A High-Level Comparison

RBAC was developed as a successor to Identity-Based Access Control (IBAC), which relied heavily on Access-Control Lists (ACLs), often causing scaling issues. In RBAC, access rights are not directly assigned to individual users. Instead, they are associated with roles, and users are assigned appropriate roles. This model allows for more flexible and decoupled administration, making it easier to manage access rights as users’ roles within the organization change.

This is particularly useful in scenarios where access requirements are relatively static and tied to the user’s role within the organization. For example, in a cloud-based project management tool, access will likely only change when an employee’s position changes, such as during a promotion or offboarding.

While RBAC offers many advantages over its predecessor, it still has limitations, particularly when dealing with complex, dynamic access control requirements. Also, the list of roles can easily grow to a long list of roles, known as ‘role explosion’—which is covered more in-depth later. This led to the development of ABAC, or Attribute-Based Access Control.

Instead of relying solely on roles, ABAC considers multiple attributes, including user attributes, resource attributes, and environmental conditions, allowing for more granular and context-aware access control decisions.

Everything that can be implemented in RBAC can also be implemented in ABAC, but with more flexibility. However, this flexibility comes with increased complexity, particularly when it comes to administration. For instance, a proper ABAC implementation relies heavily on a well-managed and maintained Human Resources Information System (HRIS), which serves as a single source of truth. This is why, despite its benefits, many companies with less complex access criteria still opt for RBAC.

ABAC is commonly used in scenarios where access control requirements are highly dynamic. For example, a multinational company using a file-sharing service might use ABAC to control access to sensitive files based on the user’s role, location, time of access, and other factors.

RBAC vs ABAC: Comparing and Combining Access Control Strategies

Choosing between RBAC and ABAC depends largely on your organization’s specific needs. If your access control requirements are relatively static and can be tied to specific roles, RBAC might be the best choice. It’s simpler to implement and manage, making it a good fit for many organizations.

On the other hand, if your organization has complex, dynamic access control requirements, ABAC might be a better fit. While it’s more complex to implement and manage, it offers greater flexibility and granularity, making it a powerful tool for managing access in complex environments. That being said, it’s not always a matter of choosing, as you’ll see next.

Access Control in SaaS: RBAC, ABAC, and Dynamic Roles

RBAC and ABAC each have their strengths and are suited to different scenarios, however, in some cases, a combination of both models may be the best solution. Below are 3 different ways of approaching RBAC and ABAC in the world of SaaS.

Example 1: RBAC in a SaaS Startup

Consider a SaaS startup with a small team where each member has a clearly defined role: Developer, Tester, Project Manager, and Administrator. In this scenario, RBAC is an excellent fit.

With RBAC, access permissions are based on the roles of individual users within the organization. For example, developers may have access to the codebase, testers to the testing environment, and administrators to the deployment and monitoring tools. This model is simple, easy to manage, and provides a high level of control.

However, as mentioned previously, RBAC can become complex and inflexible in rapidly changing domains or when dynamic attributes, such as time of day or location, need to be considered in determining user permissions. Despite this, for a small startup with clearly defined roles and minimal dynamic attributes, the simplicity and control offered by RBAC outweigh the benefits of the added granularity and flexibility of ABAC.

Summary: RBAC is often best suited for small to medium-sized organizations with clearly defined user roles and minimal need for dynamic access control.

Example 2: ABAC in a Global SaaS Company

Now, consider a global SaaS company with thousands of employees across different regions and time zones, serving diverse clients. In this case, ABAC is almost necessary.

For example, a sales representative in Europe might need access to client data during business hours but not beyond that. Similarly, a developer in the US might need access to the codebase but not to the client data. Being able to consider a multitude of attributes in addition to roles, such as location, time, and the type of data being accessed is the only realistic way to implement this.

Without ABAC, managing such dynamic access control requirements could lead to the “role explosion” problem mentioned previously, where thousands of separate roles are needed for different collections of permissions. ABAC, with its fine-grained access control based on multiple attributes, can handle this complexity efficiently.

Summary: ABAC is ideal for large organizations with complex access control requirements that involve multiple dynamic attributes.

Example 3: Dynamic Roles in a Growing SaaS Company

A growing SaaS company might start with a simple RBAC model but, over time, find that it needs more flexibility to manage access control as the organization and its services evolve. This is where dynamic roles, a combination of RBAC and ABAC, come into play.

Dynamic roles add attributes to the traditional RBAC model, making it more flexible and adaptable. For instance, a role could be defined not just by a user’s job function, but also by their location, the current time, or the sensitivity of the data they’re trying to access. This approach maintains the simplicity of RBAC while adding the flexibility of ABAC, providing a scalable solution for growing organizations.

The concept of dynamic roles is discussed in detail in the article “Adding Attributes to Role-Based Access Control” by Richard Kuhn, Edward Coyne, and Timothy Weil, covered in more detail in the next section.

Summary: Dynamic roles are a scalable solution for growing organizations that start with simple access control needs but require more flexibility as they evolve.

The Challenge of Traditional Access Control Strategies: Role Engineering

As we delve into these approaches, it’s important to note that implementing RBAC, especially in larger organizations like DevCo, often leads to what is known as ‘role engineering’. Role engineering is the process of developing an RBAC structure for an organization. Although any access control implementation requires thoroughness and sensible structure, the development of a concept like role engineering says a lot about how much work an RBAC approach can require.

As your business grows and more dynamic scenarios arise, the number of roles can quickly explode—which is exactly why many businesses are opting for a combination of RBAC and ABAC, rather than choosing one over the other.

A Modern Approach: Combining RBAC and ABAC

Graphic visualizing Alice’s access based on attributes

As organizations grow and their needs evolve, it becomes increasingly clear that a one-size-fits-all approach to access control may not be sufficient. This is where the combination of RBAC and ABAC comes into play. The National Institute of Standards and Technology (NIST) and the IEEE Computer magazine suggest three possible approaches for combining RBAC and ABAC—dynamic roles, attribute-centric, and role-centric methods. Each of these approaches aims to balance the benefits of both models while managing their complexity.

Consider the scenario of Alice, a developer at an imaginary company “DevCo”. Alice is part of the “Mobile App” team and is currently located in the New York office. Her title as a Developer grants her access to view the codebase at all times. However, DevCo has a policy preventing anyone from interacting with the codebase (like pushing code or approving new code) unless they’re in the office. Let’s look at how these three RBAC/ABAC combination approaches might help DevCo implement these access requirements.

1. Dynamic Roles

In our previous example of a growing SaaS company, we actually implemented dynamic roles. This approach combines the administrative benefits of RBAC by defining roles up-front and assigning them, as well as the dynamic access based on changing attributes from ABAC.

Suppose DevCo has four static attributes (like role, department, seniority, etc.) and six dynamic attributes (like location, time, device, etc.). If we were to create a role or rule for every possible combination of these attributes using a single model like RBAC or ABAC, we would end up with 2^10 (or 1024) roles or rules. This is because each attribute can have two states (e.g., for location: in-office or not-in-office), and we have ten attributes in total.

However, by using dynamic roles, we can significantly reduce this number. We can create roles based on the four static attributes, resulting in 2^4 (or 16) roles. Then, we can create rules based on the six dynamic attributes, resulting in 2^6 (or 64) rules. Graphic visualizing the difference between RBAC/ABAC vs RBAC + ABAC

So, instead of having to manage 1024 roles or rules, DevCo only needs to manage 16 roles and 64 rules. This is a significant reduction and illustrates the efficiency of combining RBAC and ABAC using the dynamic roles approach.

Plus, a pure-RBAC solution would require additional software to control the dynamic granting and removal of roles when moving location, which is semi-automatically solved with ABAC—you’ll still need software to dynamically grant and remove access, however, ABAC-specific implementations exist.

2. Attribute-Centric

The attribute-centric approach takes the flexibility of ABAC a step further by treating the role as just another attribute. This means that instead of a role being a collection of permissions, it’s simply an attribute named “role”.

In the case of DevCo, Alice’s access to the codebase could be controlled based on attributes like her role as a “developer” and her location. In an attribute-centric approach, her role covers all static access (like viewing the codebase), using attributes to cover all dynamic access (like interacting with the codebase only when in the office).

Functionally, this is very similar to what’s just been described as “dynamic roles”, as the major difference lies in the mentality of the implementation. An attribute-centric approach will prioritize attributes, only utilizing roles when the simplicity of RBAC clearly outweighs the complexity of ABAC.

3. Role-Centric

The role-centric approach incorporates attributes into RBAC to refine it further. These additional attributes serve to restrict permissions, not expand them. This approach retains RBAC’s core capability of setting a maximum limit on permissions while adding a layer of flexibility from ABAC.

In the context of DevCo, a role-centric approach would mean that Alice’s access to the codebase could be further restricted based on additional attributes. For instance, access could be limited to certain parts of the codebase based on Alice’s project or team. However, should the ABAC system fail, Alice will still only have access to the codebase, as opposed to all access controls failing.

This approach is different from dynamic roles, where attributes can be set on any individual or group, regardless of their roles. In a role-centric approach, the attributes are tied to the roles, providing a balance between the simplicity of RBAC and the flexibility of ABAC.

All in all, these approaches vary little in terms of technical implementation, with all three requiring both an RBAC and ABAC implementation. Instead, these three approaches highlight the difference between how you go about your implementation. In other words, it’s more about administration than technical implementation.

RBAC with ABAC: The Optimal Solution?

In evaluating access control strategies, we’ve examined the Role-Based Access Control (RBAC) and Attribute-Based Access Control (ABAC) models. Both provide distinct advantages: RBAC offers simplicity and easy administration, ideal for straightforward environments, while ABAC presents adaptability and detailed control, useful in complex scenarios.

However, it’s not always a matter of choosing one over the other. Sometimes, the most effective solution lies in a hybrid approach, blending the administrative ease of RBAC with the dynamic control of ABAC. As always, the optimal choice hinges on understanding your unique needs. The next steps could be to explore further into these hybrid models, examine more detailed control mechanisms, or review real-world case studies. Whichever path you choose, a deeper grasp of these strategies strengthens your approach to information security.