SQL Recipes
A FREE cookbook for SQL queries and examples
Register FAQ Search Today's Posts Mark Forums Read

Database Design Find articles on variouse database design topics

Go Back   SQL Recipes a FREE cookbook of SQL queries and examples > Articles > Database Design

Reply
 
LinkBack (50) Thread Tools Search this Thread Rating: Thread Rating: 2 votes, 5.00 average.
  #31 (permalink)  
Old 08-03-2007, 07:48 AM
ben ben is offline
Administrator
 
Join Date: Mar 2007
Posts: 87
ben has disabled reputation
Default Re: Can this system perform the following?

Quote:
Originally Posted by doubledub View Post
Hello,

at a glance, the system you have built up seems very elegant and efficient. However, it is not clear to me if it can perform more 'item-specific' role administration. Let me try to explain what i mean.

Say you need to make a newspaper site, with dynamic categories and articles, and want be able to have both super-administrator and super-moderator role (which would be permitted to perform appropriate actions on global level), but also category administrator or category moderator, which would have same permissions as global roles, but only on local level (meaning, within a specific category). Is this rbac system designed with these capabilities, and how would they be implemented, or administered?

Thank you for the response in advance.
This is exactly what this RBAC can do. Each category is a 'domain' and each new newspaper edition is an 'object'.

What you would do is create a domain for each category you want and then when new editions of a newspaper come out you simply insert them into one (or many) categories.

The administrator and moderator would then have different privileges assigned to them. You could create a role for each category if you wanted to. Each role then has actions (or privileges) associated with it.

You may want to define a simple role that allows a user to 'read' each category. In other words you may have a subscription website in which you only want users to read categories they are subscribed to. A user can be subscribed to multiple categories, in which case the user will have multiple roles.

Hope this helps.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #32 (permalink)  
Old 08-03-2007, 06:50 PM
doubledub doubledub is offline
Junior Member
 
Join Date: Aug 2007
Posts: 2
doubledub is on a distinguished road
Default Re: Fine Grained Role Based Access Control (RBAC) system

Thanks - it helped a lot

Best wishes for further development
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #33 (permalink)  
Old 08-31-2007, 03:43 AM
ruan
 
Posts: n/a
Default Re: Fine Grained Role Based Access Control (RBAC) system

I have a question want to ask.what the function of the domin 'importance' ?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Edit/Delete Message Reply With Quote
  #34 (permalink)  
Old 08-31-2007, 04:45 AM
ruan
 
Posts: n/a
Default Re: Fine Grained Role Based Access Control (RBAC) system

I have a question want to ask.what the function of the domin 'importance' ?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Edit/Delete Message Reply With Quote
  #35 (permalink)  
Old 09-21-2007, 04:25 PM
hshot_rooke hshot_rooke is offline
Junior Member
 
Join Date: Sep 2007
Posts: 1
hshot_rooke is on a distinguished road
Default Re: Fine Grained Role Based Access Control (RBAC) system

Hi Ben,

Really enjoyed reading your RBAC system, but I was taking a look and trying to apply it to a system I am designing.

If I say have a field let's say "rating" on a certain forum page that I would like to control access to, would the field be considered an "object" in your model?

I'm assuming the "forum page" would be created into the domains table.
The "rating" would be created in "objects".

How would I control access to that specific object?

Or would it be that the "rating" field would be created as a "singular domain" in which case I would use that "singular domains" access priveleges?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #36 (permalink)  
Old 09-21-2007, 10:34 PM
ben ben is offline
Administrator
 
Join Date: Mar 2007
Posts: 87
ben has disabled reputation
Default Re: Fine Grained Role Based Access Control (RBAC) system

Quote:

If I say have a field let's say "rating" on a certain forum page that I would like to control access to, would the field be considered an "object" in your model?
Yes.

Quote:
I'm assuming the "forum page" would be created into the domains table.
The "rating" would be created in "objects".
Yes. I am not 100% sure of what you want to achieve but this makes sense. You could create a domain called 'forum page', and 'rating' could be an object belonging to that domain.

Quote:
How would I control access to that specific object?
Depending on how fine grained you want control your forum page you can either:
1) find out if a user is allowed to perform a certain action on the domain. (in this case it will be 'forum page')
2) or you could find out if a user is allowed to perform a certain action on the object itself (in this case rating.)

It really comes back to how you define your roles. The system is very flexible so it is up to you to think things through and build your roles accordingly.

Quote:
Or would it be that the "rating" field would be created as a "singular domain" in which case I would use that "singular domains" access priveleges?
Yes, and no. When ever you add an object to a domain, the system automatically creates an entry in the object table, which in essence is a 'singular domain'. It all comes down to how you query the database. You can either find out if a user can perform an action on a domain or an object. An object is always stronger than a domain (if ever there is a conflict.)
Having said this it really is up to you to define your roles appropriately. Give me more info on what you want to achieve and I can help you out more.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #37 (permalink)  
Old 10-02-2007, 12:17 PM
mithras mithras is offline
Junior Member
 
Join Date: Sep 2007
Posts: 3
mithras is on a distinguished road
Default Re: Fine Grained Role Based Access Control (RBAC) system

Hi Ben,
I found your website with this excelent RBAC system. I'd like to implement it, but asking you if you could give a little help with the implamentation.

I'd like to have groups instead of users. This is not quite hard, but I'd also like to have a group parent-child relation. E.g. you have a company, and a group "workers". Then a group "section-a" is a child of "workers", and a group "room 1234" is a child of "section-a". A more specialized group has always priority for global group.

If "workers" may view a single object in a domain, and only room 1234 may edit that object, this room group has a higher priority. I thought about this database design:

rbac_group_has_roles (like your rbac_user_has_roles)

group
id (integer)
name (string)
parent_id (integer, pointing at another group id)


user_in_group
user_id (integer, pointing at a user id)
group_id (integer, pointing at a group_id)


But how can I check the influence of "higher" groups? I know something about database design and normalisation, but i'm absolutely bad in mentioning queries to fetch the right information out of the database. Is this possible with (my)SQL, or should I sending queries with php. E.g. you know a user is a member of a subgroup, do I need to send seperate queries for both groups and filter it with php?

Thanks for your help!!!

PS. I'll implement this (if the group-thing works) into my own content managment system: Damnsmall cms (currently only available in Dutch).

Last edited by mithras : 10-02-2007 at 12:23 PM. Reason: Email notification added
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #38 (permalink)  
Old 10-02-2007, 01:50 PM
ben ben is offline
Administrator
 
Join Date: Mar 2007
Posts: 87
ben has disabled reputation
Default Re: Fine Grained Role Based Access Control (RBAC) system

Hi Mithras,

Give me a day or two to think about this, and I will get back to you.

(It is easy to create a group of users but it looks like you want to have multiple nestings, which may complicate things.)

Cheers,

Ben
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #39 (permalink)  
Old 10-02-2007, 03:42 PM
mithras mithras is offline
Junior Member
 
Join Date: Sep 2007
Posts: 3
mithras is on a distinguished road
Default Re: Fine Grained Role Based Access Control (RBAC) system

Quote:
Originally Posted by ben View Post
Hi Mithras,

Give me a day or two to think about this, and I will get back to you.

(It is easy to create a group of users but it looks like you want to have multiple nestings, which may complicate things.)

Cheers,

Ben
That is exactly my problem :P Groups instead of users is not my problem.

I'm a member of the board of a student music corporation from the Technical University Delft (from The Netherlands). We have members (a group ;-) ), an orchestra (subgroup of members), a choir (subgroup of members), wings (subgroup of orchestra), strings (subgroup of orchestra), wood wings (subgroup of wings). And so on...

So I would be very happy if you know a solution for my problem. Thanks in advance, I'll wait patiencely :-)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #40 (permalink)  
Old 10-04-2007, 11:50 AM
ben ben is offline
Administrator
 
Join Date: Mar 2007
Posts: 87
ben has disabled reputation
Default Re: Fine Grained Role Based Access Control (RBAC) system

Quote:
Originally Posted by mithras View Post
That is exactly my problem :P Groups instead of users is not my problem.

I'm a member of the board of a student music corporation from the Technical University Delft (from The Netherlands). We have members (a group ;-) ), an orchestra (subgroup of members), a choir (subgroup of members), wings (subgroup of orchestra), strings (subgroup of orchestra), wood wings (subgroup of wings). And so on...

So I would be very happy if you know a solution for my problem. Thanks in advance, I'll wait patiencely :-)

A few days later.... I think we have to look at the problem a little differently.
Rather than trying to nest groups of people I would create relevant roles.

A user can have multiple roles. And a role can have multiple privileges.

So create as many roles as you like and assign users to those roles.

I know this is not 'ideal' but it would be simple and fast, even though some data would be repeated several time.
MySQL can deal with millions of records effortlessly this would not be a problem.

So I would create the following roles:

'General member'
'Orchestra member'
'Choir member'
etc...

So when a user signs up to your account you can assign them all three roles if you like.

Aleternatively you could create a table called group_roles which would have a one to many relationship with the roles table, so that you could define 'mega' roles and assign users to these 'mega' roles. This I believe would solve all your problems, but may not be worth the extra work...

I hope this helps.

Ben
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Rate This Thread
Rate This Thread:

Posting Rules
You may post new threads
You may post replies
You may not post attachments
You may edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

LinkBacks (?)
LinkBack to this Thread: http://www.sqlrecipes.com/database_design/fine_grained_role_based_access_control_rbac_system-3/
Posted By For Type Date
RBAC - Forum PHP.pl This thread Refback 06-04-2008 02:11 PM
RBAC - Forum PHP.pl This thread Refback 05-23-2008 01:22 PM
Joomla! Community Forum • View topic - [15]Access Management in Joomla! 1.6 This thread Refback 05-05-2008 06:07 AM
Joomla! Community Forum • View topic - [15]Access Management in Joomla! 1.6 This thread Refback 05-03-2008 02:57 PM
RBAC - Forum PHP.pl This thread Refback 05-02-2008 02:46 PM
Discover From Your Favorite Topic or Web Page: rbac This thread Refback 04-18-2008 02:58 AM
[PHP/SQL] Ideale rechtensysteem - Programming - GoT This thread Refback 04-17-2008 10:12 PM
Joomla! Community Forum • View topic - [15]Access Management in Joomla! 1.6 This thread Refback 04-10-2008 07:51 PM
[PHP/SQL] Ideale rechtensysteem - Programming - GoT This thread Refback 04-07-2008 12:26 PM
[PHP/SQL] Ideale rechtensysteem - Programming - GoT This thread Refback 04-07-2008 11:34 AM
[PHP/SQL] Ideale rechtensysteem - Programming - GoT This thread Refback 04-07-2008 11:32 AM
[PHP/SQL] Ideale rechtensysteem - Programming - GoT This thread Refback 04-07-2008 11:31 AM
Joomla! Community Forum • View topic - I want better ACL This thread Refback 03-21-2008 11:00 AM
Qwait's favorite web pages, page 6 - StumbleUpon This thread Refback 03-20-2008 01:35 AM
Rechtensysteem voor website - Software Engineering & Architecture - GoT This thread Refback 03-06-2008 04:17 PM
Joomla! Community Forum • View topic - I want better ACL This thread Refback 03-01-2008 01:30 AM
Joomla! Community Forum • View topic - I want better ACL This thread Refback 02-29-2008 11:59 AM
Joomla! Community Forum • View topic - I want better ACL This thread Refback 02-29-2008 09:44 AM
Joomla! Community Forum • View topic - I want better ACL This thread Refback 02-25-2008 11:48 AM
Rechtensysteem voor website - Software Engineering & Architecture - GoT This thread Refback 02-22-2008 08:46 PM
RBAC - Forum PHP.pl This thread Refback 02-20-2008 03:37 PM
RBAC - Forum PHP.pl This thread Refback 02-20-2008 01:29 PM
RBAC - Forum PHP.pl This thread Refback 02-20-2008 01:17 PM
Rechtensysteem voor website - Software Engineering & Architecture - GoT This thread Refback 02-08-2008 03:12 PM
Rechtensysteem voor website - Software Engineering & Architecture - GoT This thread Refback 02-05-2008 08:17 AM
atakan.dogan's bookmarks tagged with This thread Refback 01-10-2008 06:16 AM
Pages tagged with This thread Refback 01-08-2008 12:01 PM
atakan.dogan's bookmarks on del.icio.us This thread Refback 01-07-2008 08:26 AM
heberm's bookmarks tagged with This thread Refback 01-06-2008 09:12 PM
Rechtensysteem voor website - Software Engineering & Architecture - GoT - Powered by React This thread Refback 01-06-2008 06:05 PM
qWikiOffice Blog » Blog Archive » Database Design This thread Refback 01-05-2008 06:03 PM
Rechtensysteem voor website - Software Engineering & Architecture - GoT - Powered by React This thread Refback 12-25-2007 09:00 AM
Rechtensysteem voor website - Software Engineering & Architecture - GoT - Powered by React This thread Refback 12-22-2007 01:39 PM
amii's bookmarks on del.icio.us This thread Refback 12-21-2007 01:02 PM
ECRM:AccessControl - FaithHighway Wiki This thread Refback 12-19-2007 09:34 PM
Which is best for ACL? | CodeIgniter Forums This thread Refback 12-02-2007 02:45 AM
Rechtensysteem voor website - Software Engineering & Architecture - GoT - Powered by React This thread Refback 11-10-2007 02:26 PM
StumbleUpon » deepakpradhan's web site reviews and blog This thread Refback 11-03-2007 11:18 PM
scorpiol's bookmarks on del.icio.us This thread Refback