Groups | Blog | Home
all groups > dotnet security > february 2006 >

dotnet security : Permissions on dynamically loaded assembly?


Dominick Baier [DevelopMentor]
2/27/2006 11:20:14 PM
Hi,

have a look at this article:
http://msdn.microsoft.com/msdnmag/issues/05/11/HostingAddIns/default.aspx

---------------------------------------
Dominick Baier - DevelopMentor
http://www.leastprivilege.com

[quoted text, click to view]

Jesper
2/27/2006 11:56:43 PM
I've created an app with a plugin structure which works if I trust the
plugin-author. Next I want to allow untrusted plugins to run under strict
access conditions.

I'm already loading the plugins into a secondary AppDomain, and I can set
code access security on this secondary appdomain to the "Execution"
Permissionset. Unfortunately, if I do this, I can no longer load anything
into this appdomain because I get a
System.Security.Permissions.FileIOPermission exception at the
Assembly.LoadFrom(...) regardless of what my plugin assembly contains. I
understand why it is happening, but is there no way around it? Is there some
way to dynamically load an assembly and execute (untrusted) code under tight
(Execution-Only) permissions?

Jesper

AddThis Social Bookmark Button