SQL Recipes
A FREE cookbook for SQL queries and examples
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: 5 votes, 4.80 average.
  #81 (permalink)  
Old 07-01-2009, 05:10 AM
ben ben is offline
Administrator
 
Join Date: Mar 2007
Posts: 107
ben has disabled reputation
Default Re: Fine Grained Role Based Access Control (RBAC) system

Quote:
Originally Posted by sqlguru View Post
What is the layer of complexity that can be removed?

So far, domains, objects, actions, groups look required. I'm not sure privilege is required.
There isn't really a layer of complexity that can be removed, but rather a simpler design.

From what I gather just one table should get you out of trouble if the roles you want to assign users are well defined.
I.e. Admin can do anything
guest can only view but can't do anything else
member can view, add, edit delete etc...
etc....

Then all you need to do is check to see if a user is a member of a predefined group.
The only problem is that if a user is part of several groups then things get a bit complicated and that is were a full blown RBAC design becomes the best option.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #82 (permalink)  
Old 07-25-2009, 09:23 AM
slier81 slier81 is offline
Junior Member
 
Join Date: Jul 2009
Posts: 10
slier81 is on a distinguished road
Default Re: Fine Grained Role Based Access Control (RBAC) system

Good work Ben
Ur Rbac looks very promising
Im trying to use on my current project now

some stupid question
can u explain in simple english what is object,privillegd,domain and roles is

thanks in advance
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #83 (permalink)  
Old 07-25-2009, 09:58 AM
ben ben is offline
Administrator
 
Join Date: Mar 2007
Posts: 107
ben has disabled reputation
Default Re: Fine Grained Role Based Access Control (RBAC) system

Quote:
Originally Posted by slier81 View Post
Good work Ben
Ur Rbac looks very promising
Im trying to use on my current project now

some stupid question
can u explain in simple english what is object,privillegd,domain and roles is

thanks in advance

This isn't a stupid question at all. It is an important one.
The RBAC is based on grammar and is meant to reflect the way we speak and write.

An object is anything that can have an action applied to it. Or in other words it is always a "noun".
An action is always a "verb".

So anything that in normal grammar can be classified as a "noun" is an object.
For example: thread, page, journal, phone number, recipe, car, boat, paragraph, article, post, etc...

Most of the times "objects" on forums end up being "pages". admin pages, user pages, guest pages, moderator pages, etc....

As you can see there are literally millions of objects you can define.

-----
A domain is a collection of objects that share something in common. That "something in common" can really be anything, and it is up to you to decide what is a good domain or criteria to group objects by.

You can see that the RBAC design allows the same object to be part of many different domains, since an object may have criteria that meet different domains.

For example if you have a "car" object. This car may be made in 1986, is blue, make is Ford, and it is a diesel engine.
So it potentially can be part of 5 different domains, i.e. cars made in 1986, or cars that are blue, or all Ford cars, or all diesel engine cars.

As you can see a domain is abstract, and only makes sense after YOU define what a domain should represent.
The first thing you should do then is always start by defining your domains, then place the appropriate objects into it.

-----
A privilege table is just a collection of actions. It is similar to domains except that you use it to group actions that have something in common.

Generally (but not always) that something in common is related to what you want a "role" to be able to do.
So most of the time the privileges will be something like: admin_privileges, user_privileges, guest_privileges. etc...

Again one action can be part of many privileges. For example the admin_privileges will include 'new, edit, delete, view, etc....' whereas the guest_privileges will only have the 'view' action.

Remember an action is ALWAYS a verb.
So a privilege is defined by a collection of actions that make sense to YOU. You can define them anyway you like.

--------
A role, is directly related to 'users' of your site. You can define thousands of different roles, but most of the time a simple website will only have about 5 to 10. (For more complex websites you can define a role for each member.)

Anyway, to keep things simple, a role is generally "administrator", "member", "guest", "moderator" etc...

If you were implementing a website for a soccer team then a role would be "captain", "goal_keeper", "attacker", "defender"...

As you can see a member can have more than one role. A person could be "captain" as well as "goal_keeper".

So broadly speaking a role corresponds to a category of users that have a predefined function, or rank, or age, or whatever you want to group people into...


Hope this makes things a bit clearer.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #84 (permalink)  
Old 07-25-2009, 10:16 AM
Unregistered
 
Posts: n/a
Default Re: Fine Grained Role Based Access Control (RBAC) system

Well explain...thanks ben

I facing some problem when i run ur sql script in phpmyadmin
This is what mysql throw to me

/************ Foreign Key: fk_users_has_roles_roles ***************/ ALTER TABLE rbac_users_has_roles ADD CONSTRAINT fk_users_has_roles_roles FOREIGN KEY ( roles_id ) REFERENCES rbac_roles( id ) ;

MySQL said:
#1005 - Can't create table 'rbac.#sql-908_29' (errno: 150)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Edit/Delete Message Reply With Quote
  #85 (permalink)  
Old 07-26-2009, 07:21 PM
slier81 slier81 is offline
Junior Member
 
Join Date: Jul 2009
Posts: 10
slier81 is on a distinguished road
Default Re: Fine Grained Role Based Access Control (RBAC) system

still no response with the sql thinggy
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #86 (permalink)  
Old 07-27-2009, 09:00 AM
slier81 slier81 is offline
Junior Member
 
Join Date: Jul 2009
Posts: 10
slier81 is on a distinguished road
Default Re: Fine Grained Role Based Access Control (RBAC) system

edit column roles_id in table rbac_user_has_roles

set integert datatype value to 11 and set the attribute to none (from unsignned to nothing)

Last edited by slier81 : 07-27-2009 at 09:02 AM.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #87 (permalink)  
Old 07-28-2009, 10:09 AM
ben ben is offline
Administrator
 
Join Date: Mar 2007
Posts: 107
ben has disabled reputation
Default Re: Fine Grained Role Based Access Control (RBAC) system

Quote:
Originally Posted by slier81 View Post
edit column roles_id in table rbac_user_has_roles

set integert datatype value to 11 and set the attribute to none (from unsignned to nothing)
Just got to this. Looks like you have worked it out :-) The answer is also at the start of the thread. I have to update the files on the server.
Cheers,

Ben
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #88 (permalink)  
Old 07-28-2009, 04:15 PM
slier81 slier81 is offline
Junior Member
 
Join Date: Jul 2009
Posts: 10
slier81 is on a distinguished road
Default Re: Fine Grained Role Based Access Control (RBAC) system

actually ben i want to know what is the core file for ur rbac

is it class.rbac_bv.php or class.rbacAdmin_bv.php or need both off this file in order to work properly?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #89 (permalink)  
Old 07-28-2009, 08:48 PM
ben ben is offline
Administrator
 
Join Date: Mar 2007
Posts: 107
ben has disabled reputation
Default Re: Fine Grained Role Based Access Control (RBAC) system

Quote:
Originally Posted by slier81 View Post
actually ben i want to know what is the core file for ur rbac

is it class.rbac_bv.php or class.rbacAdmin_bv.php or need both off this file in order to work properly?
Both these files are important. The Admin file is used to manipulate the database, and the other file is use to query the database.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #90 (permalink)  
Old 08-18-2009, 08:36 PM
slier81 slier81 is offline
Junior Member
 
Join Date: Jul 2009
Posts: 10
slier81 is on a distinguished road
Default Re: Fine Grained Role Based Access Control (RBAC) system

i have hard time to implement the rbac eith admin gui

it give an error something like this:

Fatal error: require_once() [function.require]:
Failed opening required 'PEAR/Config.php' (include_path='.;C:\wamp\bin\php\php5.2.9-2\PEAR') in C:\wamp\bin\php\php5.2.9-2\PEAR\Common.php on line 865

any help 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 10-21-2007 09:23 AM
Rechtensysteem voor website - Software Engineering & Architecture - GoT - Powered by React This thread Refback 10-19-2007 01:26 PM
Rechtensysteem voor website - Software Engineering & Architecture - GoT - Powered by React This thread Refback 10-18-2007 08:38 PM
Rechtensysteem voor website - Software Engineering & Architecture - GoT - Powered by React This thread Refback 10-18-2007 08:36 PM
mithras86's bookmarks tagged with This thread Refback 09-28-2007 09:06 PM
mithras86's bookmarks on del.icio.us This thread Refback 09-24-2007 01:22 PM
heberm's bookmarks on del.icio.us This thread Refback 08-30-2007 12:46 PM
onisemus' bookmarks tagged with This thread Refback 08-14-2007 09:15 PM
onisemus' bookmarks on del.icio.us This thread Refback 08-02-2007 02:40 PM
Scaffolding | CodeIgniter Forums This thread Refback 07-06-2007 09:41 AM
konvergal's bookmarks on del.icio.us This thread Refback 06-29-2007 10:06 PM
dynasync's bookmarks tagged with This thread Refback 06-26-2007 01:39 AM


All times are GMT. The time now is 02:52 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.0.0
Copyright (c) 2006-2008 SQL Recipes

1 2 3 4 5 6 7 8