Code Access Security - Policy

Policy

A policy is a set of expressions that uses evidence to determine a code group membership. A code group gives a permission set for the assemblies within that group. There are four policies in .NET:

  • Enterprise - policy for a family of machines that are part of an Active Directory installation.
  • Machine - policy for the current machine.
  • User - policy for the logged on user.
  • AppDomain - policy for the executing application domain.

The first three policies are stored in XML files and are administered through the .NET Configuration Tool 1.1 (mscorcfg.msc). The final policy is administered through code for the current application domain.

Code access security will present an assembly's evidence to each policy and will then take the intersection (that is the permissions common to all the generated permission set) as the permissions granted to the assembly.

By default, the Enterprise, User, and AppDomain policies give full trust (that is they allow all assemblies to have all permissions) and the Machine policy is more restrictive. Since the intersection is taken this means that the final permission set is determined by the Machine policy.

Note that the policy system has been eliminated in .NET Framework 4.0.

Read more about this topic:  Code Access Security

Famous quotes containing the word policy:

    Mr. Wiggam, I want you to change the policy of The Clarion. I want you to write a story I should have written myself long ago. I want you to tell the people of San Francisco that no city can exist without law and order. Write a story about that flag, write about what verifies and brings a promise of life, liberty, and the pursuit of happiness. There are some people in this town who don’t seem to know that. Let The Clarion tell them.
    Ben Hecht (1893–1964)

    Make Policy Not Coffee
    Feminist political button, c. 1970. ?....

    If matrimony be really beneficial to society, the custom that ... married women alone are allowed any claim to place, is as useful a piece of policy as ever was invented.... The ridicule fixed on the appellation of old maid hath, I doubt not, frightened a very large number into the bonds of wedlock.
    Sarah Fielding (1710–1768)