Lately I've been considering the best access control model to use in my application. I've been reading on RBAC and the role concept is nice (especially if you have a huge amount of different permissions), however, I'm not sure how applicable it is to hierarchical user management like the following:
Every user belongs to one or more groups. Groups are organized into a tree (like a directory structure). Both groups and users can be assigned permissions (or roles, if we're talking RBAC) and there should probably be some kind of inheritance (i.e. users and groups inherit permissions of the groups they belong to) and overriding functionality. The purpose of groups themselves is not only permission management - they will have other uses in the app.
I imagine all of the above wouldn't be too problematic to design further and implement if permissions were used without roles ("roles" are collections of permissions in RBAC terminology) since permissions are very granular while roles are more monolithic. Implementing permission inheritance/overriding at the group/user level would not be too difficult. Doing the same with roles would probably be more tricky, but on the other hand, roles are more easily understandable to an average user.
Right now, I myself am leaning more towards the "permissions only" model because:
- the app probably won't have more than 30 different permissions;
- groups themselves may be used to set permissions which already provides one of the advantages of roles - ease of permission management of multiple users
- the concept seems clear and thus easy to implement
However, if I was presented with a logical and easily understandable role-based model that had an advantage over the "permissions-only" one, I would seriously take a look at it. Are there any well-defined RBAC models (papers, implementations, etc.) already available that could be applied/adapted to the requirements above (I've been searching for them for some time, but those I found were either too restrictive or didn't take hierarchical user management into accoun)? What is your overall opinion on the matter? Is RBAC worth it in this case?