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)
“The contention that a standing army and navy is the best security of peace is about as logical as the claim that the most peaceful citizen is he who goes about heavily armed. The experience of every-day life fully proves that the armed individual is invariably anxious to try his strength. The same is historically true of governments. Really peaceful countries do not waste life and energy in war preparations, with the result that peace is maintained.”
—Emma Goldman (18691940)