Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

So at the assembly level to notify callers immediately if you need to have access to certain permission sets you have three flags you can use: RequestMinimum, RequestOptional, and RequestRefuse.

 

So say your assembly is a signed assembly in the GAC (or maybe it's just strongly named) with AllowedPartiallTrustedCallers. Part of what your assembly does internally requires reflection. If you put [[assembly: ReflectionPermission(SecurityAction.RequestMinimum, Unrestricted=true)] in your assembly, this means calling assemblies will have to have that permission right?

 

So what if from the sys-admin view, you give this GAC'd assembly full-trust, but you give this unassigned assembly Execute permission set; well when loading the assembly (the private untrusted assembly) you're going to get an error because of the assembly level reflection permission attribute on it's referenced assembly to the GAC'd item (heck even if it wasn't GAC'd and just signed you'd have this) - which isn't valid because the calling assembly (the private untrusted assembly) doesn't need reflection permission, just the GAC'd assembly does. So how would you do the equivelant of SecurityAction.Assert for the ReflectionPermission attribute at the assembly level to accomplish this? Or is this just not possible and callers will just have to find out at run-time 20 minutes into a workflow where they call a method that is using reflection to find this out?

 

Hope what I'm asking is making sense.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...