| Database Design Find articles on variouse database design topics |
|
||||||
![]() |
|
|
LinkBack (50) | Thread Tools | Search this Thread |
Rating:
|
|
|||
|
I had to change quite some things to make it work on my system.
What I would like to say at the moment is that the sql needed to be adjusted. rbac.sql: line 91: id INTEGER UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY, line 98 (I don't think this one is necessary): CREATE INDEX id ON rbac_roles(id); line 106/107: roles_id INTEGER UNSIGNED NULL, I might get to the other stuff I changed sometime soon. : ) |
|
|||
|
I have seen in this thread that people look for groups, and that they dont see the privileges very clear.
its posible that you call "roles" to what are really "groups"(user groups) and that you call privileges to what could be really Roles? A user belongs to groups, and a role i understand like a collection of actions, a possible behaviour. Thx ben. |
|
|||
|
Quote:
If it makes more sense then feel free to make a new table called "groups" (but you can't rename the roles table as group as they are different concepts). Also if you area looking at a "user group" solution this rbac implementation might be too complex. If all you want to to know is whether a user is part of a group you would only need two database tables. Quote:
Let me try and explain with a soccer example. You can define a soccer team as a "group" of players belonging to the same club. Within that group you have different "roles". A striker, defender, captain, goal keeper. Each of these "roles" have various privileges. Some are the same others are different. For example the goal keeper has an extra privilege and that is he can pick the ball up with his hands if he is in his box. The captain also has extra privileges. So you can have users that are part of the same "group" but they can also have different "roles". Quote:
I believe the way you are looking at this is the "group" is defined, and you then just want to check wether a user belongs to a group. So the focus is now on the group an not the user. A "role" is a collection of admissible or forbidden "behaviors". It links an "action" to an "object". Again in our soccer analogy, the goal keeper is allowed to "hold" [action] the "ball" [object], whereas the other players are only allowed to "kick" [action] the "ball" [object]. Hope this makes sense.... |
|
|||
|
I've followed this thread for a while as it seems to be one of the central resources on the web for a good overview of the RBAC problem - good work Ben!
I have a question for you guys though... How would you go about fine-tuning the *type* of access to an object...? For example, say Director user Mike can override Reception user Sally's registration date. One would assume that Mike could set any date both in the past or in the future - the traditional GRANT/UPDATE/EDIT privilege. Then we have Payroll user Steve who can also modify Sally's registration date, but only for dates in the past up until (for example) one year ago. To spice things up, then we have the HR Manager user Mary who can also amend Sally's registration date, but only for dates from one month ago up until one month from now... The point of that example is to highlight that sometimes it's not enough to authorize access to an object, but that the object itself may have further access restrictions depending on the Role, which need to be flexible - what if we wanted to change the HR Manager role so that they could only change the date from now up to exactly the 12th June 2008? Does anyone have any ideas of how to map that into the object or indeed record those parameters in the database??? Thanks! |
![]() |
| Thread Tools | Search this Thread |
| Rate This Thread | |
|
|