Code Access Security Best Practices
From: Annie (itsanniehere_at_hotmail.com)
Date: 05/05/04
- Next message: Mick Badran: "Custom Uri's in Digital Signatures"
- Previous message: Mike Pearson: "RE: Exception thrown at signing a xmlFile"
- Next in thread: Hernan de Lahitte: "Re: Code Access Security Best Practices"
- Reply: Hernan de Lahitte: "Re: Code Access Security Best Practices"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Date: 5 May 2004 00:44:56 -0700
Hi,
I am trying to create some architecture guidelines for a corporate
environment. I am thinking mainly about code running on the local
computer, but that I want to protect against invasion as much as
possible if compromised.
I would like to be able to write the .NET assemblies we create with
the "principle of least privilege". I realise that there are
limitations with running some of the native .NET system Assemblies
that do not have the AllowPartiallyTrustedCallers attribute, as they
require Full Trust. Worse, all our assemblies are strong named, so I
start not being able to call between them because of the implicit
LinkDemand without Full Trust.
So, to work around this, what I was hoping to be able to do is run the
assembly as Full Trust, but remove permissions on a case by case basis
using the RequestRefuse attribute on each assembly. A code review
before the project is released can check the permissions are
appropriate. All nicely controlled. However, if any permissions are
voluntarily removed from a full trust assembly, then it becomes
partially trusted, and I am back to square one.
Given that, can anyone tell me what the accepted model of working is
with .NET Code Access Security? Do I have to give up and allow Full
Trust in practice (the equivalent to logging on using Administrator or
sa)? Can I lock all other code down, and only allow Full Trust to (for
example) the public key of our assemblies?
Is there anywhere a FULL list of actually what I can't do in the .NET
Framework if I do not have Full Trust?
Thanks,
Annie.
- Next message: Mick Badran: "Custom Uri's in Digital Signatures"
- Previous message: Mike Pearson: "RE: Exception thrown at signing a xmlFile"
- Next in thread: Hernan de Lahitte: "Re: Code Access Security Best Practices"
- Reply: Hernan de Lahitte: "Re: Code Access Security Best Practices"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Relevant Pages
|