We are currently designing a system of user roles and permissions in our web application (ASP.NET), and it seems that we have several cases that are not suitable in classical role-based access control (RBAC) . I will post a few questions, each of which is dedicated to a specific case. This is my second question (first question here: Non RBAC User Roles and Permissions System: checking the user's city ).
We have the following case: we need to implement the Manager role in our web application. However, the manager may belong to one or several companies (in a large group of companies for which we create this web application). Say there may be a “Manager of Companies A and B,” “Manager of Company C,” etc.
Depending on the companies to which the Manager belongs, he has access to certain operations: for example, he can communicate with clients of only those companies to which he belongs. That is, the "Manager of companies A and B" can only have contacts with customers of companies A and B, and not with companies C. He can also view the pages of customers of companies A and B, not C, etc.
This case seems to fall into RBAC. However, this is actually not the case. We will need to create a ManagerRole class that will have the Companies property. This means that it will be not just the role of the permission set (as in the classic RBAC), but the role with the properties !
This was just one example of a role with properties. There will be others: for example, the administrator role , which will also belong to several companies, as well as other custom properties.
This means that we will use hierarchy or role classes:
class Role – base class class ManagerRole : Role List Companies class AdministratorRole : Role List Companies Other properties
We investigated pure RBAC and its implementation on several systems, and did not find systems with hierarchies or roles , each of which has user-defined properties. In RBAC, roles are simply collections of permissions.
We could model our cases using permissions with properties such as ManagerPermission, AdministratorPermission, but this has many drawbacks, the main one being that we will not be able to assign such a role as the “Manager of Company A and B” to the user directly, but he will have to create a role containing ManagerPermission for companies A and B ... Moreover, the “Manager” is likely to be a “role” (position in the company), rather than a “permission” from a linguistic point of view.
I would be grateful for any ideas on this issue, as well as for any experience in this area!
Thanks.