StrataFrame Forum
Home      Members   Calendar   Who's On
Welcome Guest ( Login | Register )
      



Row SecurityExpand / Collapse
Author
Message
Posted 01/11/2007 12:52:34 PM


StrataFrame User

StrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame User

Group: StrataFrame Users
Last Login: Today @ 12:39:55 PM
Posts: 358, Visits: 1,754

This is sort of a combination of ‘how to’ and a possible enhancement request. I have situation where I have client case files and some of those cases need to be marked as confidential. I’d like to be able to use Role Based Security at the row level to control who can view, add, modify, or delete confidential cases.  Conceptually I can see how to do this by adding a column to the table that contains a security key. Where the possible enhancement request comes in it that it would be nice to be able to define in the object properties a security column similar to the concurrency column and have the data layer filter out rows that the user is not permitted to access.  One of the reasons for the enhancement is that even if I implement my own security checking using the added column and security classes I can’t think of how I would enforce it in the BrowseDialog, unless you guys add some hooks or I build my own dialog.  This probably raises other issues that I haven’t thought about but I’d like some input on how you might handle this.  I’m thinking that you may have run into a similar requirement in your medical applications.

 

-Larry

 

 

Post #5759
Posted 01/11/2007 1:44:46 PM


StrataFrame Developer

StrataFrame Developer

Group: StrataFrame Developers
Last Login: 08/01/2008 8:53:41 AM
Posts: 2,671, Visits: 1,879
We have thought of ways to implement this functionality... easliy configurable and implementable row-level security, however, we have held off of it for right now because the although we would be able to use it within the BrowseDialog and other places where the SELECT statements are generated programmatically within the framework, you would still have to implement the same WHERE clause on each of your fill methods that calls FillDataTable.  So, since we don't have any control over what queries you run, we're holding off until the next major version of SF.  We will be implementing LINQ functionality, and with the IQueriable interface, we will be able to programmatically add conditions to the WHERE clauses of every query executed within the framework.  So, then it will be easy to implement with a few simple properties on the business objects, but right now, it's just not feasible.

The way we have implemented the row-level security is exactly like you mentioned.  We added a column to the necessary tables and stored an enumeration value within the field that tells the program which security key to check to determine whether the document can be viewed by the logged in user.


www.bungie.net
Post #5763
Posted 01/11/2007 2:58:45 PM


StrataFrame User

StrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame User

Group: StrataFrame Users
Last Login: Today @ 12:39:55 PM
Posts: 358, Visits: 1,754

Thanks for info! While the current solution is pretty much what I expected, the future addition of the IQueriable interface gives us all something to look forward to

Post #5767
Posted 01/11/2007 4:46:35 PM


StrataFrame Developer

StrataFrame Developer

Group: StrataFrame Developers
Last Login: 08/01/2008 8:53:41 AM
Posts: 2,671, Visits: 1,879
Yes, and the biggest thing to look forward to is having complile-time SQL syntax checking... because the query language becomes part of the programming language (and your C# query is then converted to an IQueriable object and run through an engine).


www.bungie.net
Post #5774
Posted 01/12/2007 6:46:05 PM
StrataFrame VIP

StrataFrame VIPStrataFrame VIPStrataFrame VIPStrataFrame VIPStrataFrame VIPStrataFrame VIPStrataFrame VIPStrataFrame VIP

Group: StrataFrame Users
Last Login: Today @ 3:26:36 PM
Posts: 1,193, Visits: 3,031
This is exciting news! When is the next major release? Maybe in the next week or so? OK, I know, silly question, but a guy can dream, can't he.

I've just built my own search form (not exactly like the browse dialog, but same idea). I've also had to deal with customizing the login, so I know the context the user will access data (in my case the user is assigned a role(s) for a specific set of rows and therefore they can have one role for X set of rows and another role for Y set of rows). I'd like you to see support for this sort of condition also, where the role is based on user/rows not just rows, then also have those permissions cascade down to FK to the rows. I.e. if the user can't see a customer, they shouldn't be able to see orders by that customer either.

And now a question. Will this LINQ thingy be available in VB projects? You mention that it uses C#.
Post #5796
Posted 01/15/2007 10:33:54 AM


StrataFrame Developer

StrataFrame Developer

Group: StrataFrame Developers
Last Login: 08/01/2008 8:53:41 AM
Posts: 2,671, Visits: 1,879
LINQ will be available in the next version of both C# and VB... I just mentioned C# because Larry uses C#, but it will be included in VB9 as well.


www.bungie.net
Post #5819
Posted 01/17/2007 11:02:53 AM
StrataFrame VIP

StrataFrame VIPStrataFrame VIPStrataFrame VIPStrataFrame VIPStrataFrame VIPStrataFrame VIPStrataFrame VIPStrataFrame VIP

Group: StrataFrame Users
Last Login: Today @ 3:26:36 PM
Posts: 1,193, Visits: 3,031
OK, thanks for the info. Any good sites to start learning about LINQ?
Post #5901
Posted 01/17/2007 12:49:50 PM


StrataFrame User

StrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame User

Group: StrataFrame Users
Last Login: Today @ 12:39:55 PM
Posts: 358, Visits: 1,754
The following link will take you to the LINQ project home page. There's a lot of info there.

http://msdn2.microsoft.com/en-us/netframework/aa904594.aspx

-Larry

Post #5905
Posted 01/17/2007 12:59:31 PM


StrataFrame Developer

StrataFrame Developer

Group: StrataFrame Developers
Last Login: Today @ 9:23:48 AM
Posts: 4,366, Visits: 4,392
The link Larry provided is good.  There are a lot of other sites on the web as well.  Don't get to entrenched with it at the moment as it will change a bit before release....it always does
Post #5908