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)
“He who comes into Assemblies only to gratifie his Curiosity, and not to make a Figure, enjoys the Pleasures of Retirement in a[n] ...exquisite Degree.”
—Richard Steele (16721729)
“Thanks to recent trends in the theory of knowledge, history is now better aware of its own worth and unassailability than it formerly was. It is precisely in its inexact character, in the fact that it can never be normative and does not have to be, that its security lies.”
—Johan Huizinga (18721945)