> What you're proposing to do is actually rather dangerous. Since you don't
> know the origin of the plug-in assemblies, why are you so prepared to
[quoted text clipped - 51 lines]
>>
>> - Scott
> It's not a question of the trustworthiness of the job plug-in's - it's the
> trustworthiness of my job engine code. The design I'm working on uses
[quoted text clipped - 3 lines]
> but I don't want to change the default "LocalIntranet" settings - I only
> want to allow it for my application.
Your first message in this thread seemed to indicate that you know how to
grant these additional permissions for your own assemblies (i.e.: add a code
group based on your assemblies' evidence to the LocalIntranet group in the
client machine CAS policy). Is there some specific help you would like with
this approach?
> The trustworthiness of the job plug-in's is being handled through a
> different process...
Then why are you concerned that the plug-in assemblies wouldn't be granted
additional permissions under a code group that uses your assemblies'
evidence for its membership condition? (Or have I missed the point, and
you're not actually worried about this at all?)
>> What you're proposing to do is actually rather dangerous. Since you
>> don't know the origin of the plug-in assemblies, why are you so prepared
[quoted text clipped - 51 lines]
>>>
>>> - Scott
Scott McChesney - 29 Aug 2005 14:19 GMT
>> It's not a question of the trustworthiness of the job plug-in's - it's
>> the trustworthiness of my job engine code. The design I'm working on
[quoted text clipped - 9 lines]
> in the client machine CAS policy). Is there some specific help you would
> like with this approach?
Yes - this is what I need the help with. What I'd prefer to do is create a
custom code group of "LocalIntranet" using the "Application Directory"
setup. Then, I can provide the appropriate reflection/AppDomain privileges
to that group only. My problem is that I don't know how to associate my
application with the custom code group...
- Scott
Nicole Calinoiu - 30 Aug 2005 14:02 GMT
In order to minimize the risk of inappropriate elevation of privilege via
your new code group, it would probably be best to be as specific as possible
in its membership condition. You've already mentioned three candidate
criteria for membership:
1. Running from the intranet zone,
2. Running from a particular folder on the network, and
3. Signed with your strong naming key.
I would suggest that you structure your code group additions to only elevate
the permissions of code that meets all three of the above conditions. Here
are the steps for manually applying the simplest-case policy modifications
on a machine that needs to run your application:
1. Launch mscorcfg.msc as an admin user. (It may be listed as "Microsoft
.NET Framework <version> Configuration" under the "Administrative Tools"
listing on your start menu.)
2. Expand the Runtime Security Policy\Machine node. (All nodes touched in
subsequent steps will be children of this nods.)
3. Expand the Permission Sets node.
4. Add a new permission set that includes the additional permissions that
your application needs when running from the intranet zone.
5. Expand the Code Groups\All_Code\LocalIntranet_Zone node.
6. Add a new code group to the LocalIntranet_Zone group with the following
configuration:
a. Membership condition: URL corresponding to the shared folder path
from which your application will be run (e.g.:
file://SomeShare/SomeFolder/*).
b. Permission set: Nothing
7. Add a new code group to the group created at step 6 with the following
configuration:
a. Membership condition: Strong name match on the public key with which
your application assemblies are signed.
b. Permission set: The permission set created at step 4.
With the above configuration, any assembly that is loaded from the
application shared folder in the intranet zone and is signed with your
strong name key should receive the additional permissions. Any assembly
that does not meet all three criteria should not receive the addition
permissions. Make sense?
>>> It's not a question of the trustworthiness of the job plug-in's - it's
>>> the trustworthiness of my job engine code. The design I'm working on
[quoted text clipped - 17 lines]
>
> - Scott
Scott McChesney - 30 Aug 2005 14:31 GMT
OK... I think I understand what you're creating. Under this situation, my
job engine code (that I sign with my key) will have the appropriate
additional permissions, but job assemblies not signed by my key will not get
the additional reflection/AppDomain privileges.
Thanks a ton for your help!
- Scott
> In order to minimize the risk of inappropriate elevation of privilege via
> your new code group, it would probably be best to be as specific as
[quoted text clipped - 64 lines]
>>
>> - Scott