Skip to main content
.NET CHAPTER 1: Code Access Security: Useful or just overcomplicated?
if u are the beginner pls read it after that u may continue below
Primary entities in the code access security architecture
The following are the entities envolved in the code access security architecture
a) Assembly : Consist of a single file or a package of file and includes a manifest that contains import metadata such as permission requirements.
b) Evidence : Refers to information about the origin of the code, such as a URL or a Zone. Such information is either in the assembly or provided by the host in which the assembly is executed.
c) Policies : define a set of rules that determine the permissions to be granted to assemblies.
d) Permissions : Objects that grant code access to resource and authority to perform tasks.
e) Principals : object that represent both the identity and roles of a user. Evry thread or process is associated with a principal. By using role-based security. Permission can be granted and denied according to the identity or the roles of the principal.
below one Need Experience Guys :
After much searching I stumbled upon this blog entry from the CLR team which not only confirms that CAS is going away in .NET 4, but also gives a great guide on what will break and how to migrate toward the new sandbox model: New Security Model: Moving to a Better Sandbox. From the article:
In versions of .Net Framework before v4, we had many ways to restrict the permissions of an assembly or even certain code path within the assembly:
Stack-walk modifiers: Deny, PermitOnly
Assembly-level requests: RequestOptional, RequestRefuse, RequestMinimum
Policy changes: caspol, and AppDomain.SetPolicyLevel
Loading an assembly with a Zone other than MyComputer
In the past, these APIs have been a source of confusion for host and application writers. In .Net Framework 4, these methods of restricting permissions are marked obsolete and we hope to remove them at a point in the future.
Most distressing is the fact that all these deprecated methods of creating a sandbox will start throwing a NotSupportedException. This is exceptionally precarious for any poor souls (like myself) that for whatever reason are required to implement CAS in their organization at this time. You have been warned.
Comments
Post a Comment