3

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.

3 Answers 3

1

I, too, am surprised at the lack of security frameworks.

There is Rhino Security. Ayende has a handful of blog posts about it.

Another blog has a couple of articles on it, too.

It is possible to use it with S#arp Architecture as well.

Can't say I've implemented it in a project, just read up on it a while back. It was the only implementation of its sort that I could find.

1
  • The Axiomatics Data Access Filter achieves row-level security (filtering) and cell-level (masking). It is is database-neutral meaning that it can work for a variety of databases by introducing a proxy in front. axiomatics.com/solutions/products/… Jun 5, 2015 at 14:38
1

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.

1
  • 1
    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 (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
    Aug 16, 2010 at 15:09
1

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.

1
  • 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
    Aug 23, 2010 at 7:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.