Assembly (CLI) - Assemblies and CLI Security

Assemblies and CLI Security

CLI Code Access Security is based on assemblies and evidence. Evidence can be anything deduced from the assembly, but typically it is created from the source of the assembly — whether the assembly was downloaded from the Internet, an intranet, or installed on the local machine (if the assembly is downloaded from another machine it will be stored in a sandboxed location within the GAC and hence is not treated as being installed locally). Permissions are applied to entire assemblies, and an assembly can specify the minimum permissions it requires through custom attributes (see CLI metadata). When the assembly is loaded the CLR will use the evidence for the assembly to create a permission set of one or more code access permissions. The CLR will then check to make sure that this permission set contains the required permissions specified by the assembly.

CLI code can perform a code access security demand. This means that the code will perform some privileged action only if all of the assemblies of all of the methods in the call stack have the specified permission. If one assembly does not have the permission a security exception is thrown.

The CLI code can also perform Linked Demand for getting the permission from the call stack. In this case the CLR will look at only one method in the call stack in the TOP position for the specified permission. Here the stack walk-through is bound to one method in the call stack by which the CLR assumes that all the other methods in the CALL STACK have the specified permission. The Assembly is a combination of METADATA and MSIL file.

Read more about this topic:  Assembly (CLI)

Famous quotes containing the words assemblies and, assemblies and/or security:

    Whenever you pray, make sure you do it at school assemblies and football games, like the demonstrative creatures who pray before large television audiences. That is the real goal of the thing. But do not, I urge you, pray all alone in your home where no one can see. That does not get you ratings.
    Garry Wills (b. 1934)

    Whenever you pray, make sure you do it at school assemblies and football games, like the demonstrative creatures who pray before large television audiences. That is the real goal of the thing. But do not, I urge you, pray all alone in your home where no one can see. That does not get you ratings.
    Garry Wills (b. 1934)

    I feel a sincere wish indeed to see our government brought back to it’s republican principles, to see that kind of government firmly fixed, to which my whole life has been devoted. I hope we shall now see it so established, as that when I retire, it may be under full security that we are to continue free and happy.
    Thomas Jefferson (1743–1826)