c# - Multi-Tenant physical isolation -


we have multi-tenant asp.net mvc 4 web application each tenant having own repository of files (a folder in file-system). took shared database, shared schema approach , identify tenants subdomain.

what best way ensure tenant can access repository folder , no other folder in file-system? check in application business logic, if make mistake...?

when running application, tenants run under same user (which defined in iis application pool).

do need serve each tenant separate user - using impersonation? need impersonate each time request made server - in order fill it?

i've heard has performance drawbacks , not prefered way, is?

we have windows service fills requests in background (for tenants), sent through msmq. service needs change identity every time gets request?

edit: in addition, need type of isolation if uploads file infected virus - affect tenant's files, , not every tenant on server. use ant-virus software, need separation in case antivirus software not identify virus.

thank you

all tenants run under same user

if each tenant has separate iis web app , identity (whether app pool or "normal" user), can use ntfs access control.

these not depend on having users having local or domain user accounts on web servers allow impersonation (and ntfs access control).

however add memory overhead on servers of course – each tenant have own worker process.

[…]msmq. service needs change identity every time gets request?

i'm not sure can impersonation based on msmq messages, expect not work (msmq messages not carry necessary identity information).

anything shared going need implemented check access: depending on nature of processing may more difficult (eg. if client requests can of order "get information file" arbitrary file: service need access checks1).


1 there win32 functions heavy lifting.


Comments

Popular posts from this blog

android - MPAndroidChart - How to add Annotations or images to the chart -

javascript - Add class to another page attribute using URL id - Jquery -

firefox - Where is 'webgl.osmesalib' parameter? -