Code Access Security - Evidence

Evidence

Evidence can be any information associated with an assembly. The default evidences that are used by .NET code access security are:

  • Application directory - The directory in which an assembly resides.
  • Publisher - The assembly's publisher's digital signature (requires the assembly to be signed via Authenticode).
  • URL - the complete URL where the assembly was launched from
  • Site - The hostname of the URL/Remote Domain/VPN.
  • Zone - the security zone where the assembly resides
  • Hash - a cryptographic hash of the assembly, which identifies a specific version.
  • Strong Name - a combination of the assembly name, version and public key of the signing key used to sign the assembly. The signing key is not an X509 certificate, but a custom key pair generated by the strong naming tool, SN.EXE or by Visual Studio.

A developer can use custom evidence (so-called assembly evidence) but this requires writing a security assembly and in version 1.1 of .NET this facility does not work.

Evidence based on a hash of the assembly is easily obtained in code. For example in C#, evidence may be obtained by the following code clause:

this.GetType.Assembly.Evidence

Read more about this topic:  Code Access Security

Famous quotes containing the word evidence:

    No further evidence is needed to show that “mental illness” is not the name of a biological condition whose nature awaits to be elucidated, but is the name of a concept whose purpose is to obscure the obvious.
    Thomas Szasz (b. 1920)

    I don’t know what it is about fecundity that so appalls. I suppose it is the teeming evidence that birth and growth, which we value, are ubiquitous and blind, that life itself is so astonishingly cheap, that nature is as careless as it is bountiful, and that with extravagance goes a crushing waste that will one day include our own cheap lives.
    Annie Dillard (b. 1945)

    In spite of the air of fable ... the public were still not at all disposed to receive it as fable. I thence concluded that the facts of my narrative would prove of such a nature as to carry with them sufficient evidence of their own authenticity.
    Edgar Allan Poe (1809–1849)