My application loads a lot of different plugin assemblies. Each plugin can add their own services into the IoC container and can also use all services provided by the main application.
I'm moving from a home brewn security solution to use CAS (PrincipalPermissionAttribute and an own one derived from CodeAccessSecurityAttribute).
Can I prevent the loaded assemblies from changing System.Threading.Thread.CurrentPrincipal (and in that way circumvent my security checks)?