New Posts New Posts RSS Feed: Multi-Tenant Support?
  FAQ FAQ  Forum Search   Calendar   Register Register  Login Login

Multi-Tenant Support?

 Post Reply Post Reply
Author
ting View Drop Down
IdeaBlade
IdeaBlade
Avatar

Joined: 27-Mar-2009
Location: San Francisco
Posts: 427
Post Options Post Options   Quote ting Quote  Post ReplyReply Direct Link To This Post Topic: Multi-Tenant Support?
    Posted: 01-Jun-2011 at 3:34pm
You can enforce tenant partitioning on the server by overriding FilterQuery in the EntityServerQueryInterceptor:
You might also find this page helpful:

So, if you have a TenantID column on your tables, you can examine the IPrincipal of the user in the interceptor and apply a .Where(TenantId == userPrincipal.TenantId) clause to the query. This ensures that users only get data related to their TenantId, even if the client-side application developer forgets to apply the restriction (or is hacked to remove the restriction).

Back to Top
bap1 View Drop Down
Newbie
Newbie


Joined: 08-Mar-2011
Posts: 9
Post Options Post Options   Quote bap1 Quote  Post ReplyReply Direct Link To This Post Posted: 01-Jun-2011 at 3:05pm
Thank you!  But I don't want to target multiple databases.  We have 1000s of customers and that's way too many db's to manage.  All data is in same db partitioned by key.  I didn't see anything in your docs related to best practices on this type of implementation.  Any suggestions would be much appreciated!
Back to Top
sbelini View Drop Down
IdeaBlade
IdeaBlade
Avatar

Joined: 13-Aug-2010
Location: Oakland
Posts: 786
Post Options Post Options   Quote sbelini Quote  Post ReplyReply Direct Link To This Post Posted: 01-Jun-2011 at 10:30am
Hi bap1,
 
You will find resourceful information in the DevForce Resource Center.
You will also find the DataSourceExtensions sample usefull.
 
Silvio.
Back to Top
bap1 View Drop Down
Newbie
Newbie


Joined: 08-Mar-2011
Posts: 9
Post Options Post Options   Quote bap1 Quote  Post ReplyReply Direct Link To This Post Posted: 01-Jun-2011 at 7:10am
Would some please point me to info on Devforce's mult-tenant features? You mention this in your marketing materials, but I don't see any reference to it in your docs.
We have a large multi-tennant app we are considering moving to Devforce.  We partition the database by customerID key and need to ensure all queries use customerID on the server...based on the user context of the currently logged in user.   I assume we would implement a server side query interceptor?  Can someone provide an example on how to do this?
 
Thanks in advance.
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down