I am currently attempting to design an Authorization Model that has the following components:
Privileges - an action that can either be granted or denied to a user/group
Roles - a collection of privileges; roles can be associated with a user or group
Security Objects - the entity to which security is applied
Object Owners - the owner of a security object
Statuses - an attribute that represents the state of a security object
Users - standard consumer of the service; can be denied or granted access to do things
Groups - a collection of users sharing a common thing; roles can be assigned to groups; privileges can be assigned to groups
My questions is as follows: Is there a way to properly model the context of a role with the current components that I presented above?
For instance, let's say i have the current authorization statement:
Tim can see Mary's profile information because Tim is Mary's friend.
I can dissect this statement into the model components:
User: Tim
Security Object: profile information
Object Owner: Mary
Privilege: view
Role: friend
Group: N/A?
Status: N/A
One thing that this dissection does not attribute is that Tim is a friend of Mary
Is there a component that I can add to this model that will capture this context ("of Mary"), or is there a way I can re-represent the privilege statement using my pre-existing auth model components? What is the best practice?