Code Access Security provides the flexibility to define what
the code could and could not perform. Configuration of security could be
performed using the four policy levels which are further split into code groups.
A union of permission set in the code groups is done and then an intersection
at the policy level is performed to calculate the actual permissions.
Permissions could be requested in order to avoid any unhandled exceptions or
surprises. Code Access Security also provides imperative and declarative
security modes to define permissions on your code.