views:

81

answers:

2

Hi, does anybody knows about Java/C# database independent authorization library. This library should support read, write, delete, insert actions across company organizational structure.

Something like this:
- user can see all documents
- user can enter new document assigned to his unit
- user can change all documents assigned to his unit and all subordinate units.
- user can delete documents that are assigned to him

I should also be able to create custom actions (besides read, write,...) connect them to certain class and assign that "security token" to user (e.g. document.expire). If there aren't any either free or commercial libraries, is there a book that could be useful in implementing this functionality?

Thanks.

A: 

Hi, I found one library that has functionality similar to my needs:

http://www.codeproject.com/KB/database/AFCAS.aspx

It is strange that there aren't any more of it on web since this is a problem that every serious application faces. As for documentation/example, the best I found are authorization modules of CRM systems like:
- Siebel - Siebel security guide - Chapter 10.Access Control
- Sugar CRM - http://www.sugarcrm.com/crm/products/capabilities/administration/access.html
- Microsoft CRM - http://msdn.microsoft.com/en-us/library/ms955698.aspx

That is a kind of functionality I need. I guess it will be DIY task.

Filip
The AFCAS is a good read and has some good ideas. Another really good read is a white paper from MS - Implementing Row- and Cell-Level Security in Classified Databases Using SQL Server 2005 (http://msdn.microsoft.com/en-us/library/cc966395.aspx). It's a good idea to be familiar with both and then abstract out a DIY subsystem that matches your own needs without the stuff you don't need.
CuppM
A: 

The problem with implementing your security solution in your client library is that it is only effective with the client tool. That sounds pretty DUH on it's own, but you leave open the huge security hole that is the database itself. So if a user connects directly to a database (for example using an Access ADP to SQL Server) they have full control to whatever their user role is. Which they would need full access to everything in the database, if you are doing your restrictions in the client library.

The only case where this wouldn't be as big an issue would be with web applications and web services. If your web service did the security and hid it behind the web service interface (so there was no direct access to the database), then it would be safe. This may be what you're talking about, but didn't specify in your question.

If you are using a fat client, is there a reason why wouldn't want to put the security logic in the database side? You mentioned database independent, but nothing you specified would be difficult to provide in each platform. You basically are describing pre-/post- triggers that check if a user has rights to edit a record. A full RLS would also restrict the user's rights to view and make things slightly more difficult depending on platform.

CuppM
CuppM, thanks for your answer. Here are my comments: 1. I'm working on web application. Also, when I'm working on fat client applications I use a server side process for db interaction. So, I never let users access database directly. 2. As for database independence, my whole application is database independent. So, I'm not going to break this because of security.
Filip