Code Access Security and No-Touch Deployment
Rob Windsor, G6 Consulting
www.g6consulting.com
Before .NET, any code that ran on a user's machine, regardless of the
origin of the code, ran with the same rights as the user. In far too
many cases Windows users run with Administrator privileges meaning that
the code they run can do just about anything it wanted to.
The .NET Framework introduces a new mechanism called code access security
which helps protect computer systems from malicious mobile code, allow code
from unknown origins to run safely, and protects trusted code from
intentionally or accidentally compromising security. When code is run within
the Common Language Runtime (CLR) it is granted or denied permissions to system
resources based on evidence, for example the origin of the assembly (local hard
drive, network, internet), the assembly publisher, or a digital signature. Code
access security also enforces the varying levels of trust on code, which
minimizes the amount of code that must be fully trusted in order to run.
Another benefit of code access security is no-touch deployment. This
feature allows desktop applications to be almost deployed as easily as
web applications. Users run your application from a network share or URL
(intranet or internet) and the .NET Framework automatically downloads the
executable files (EXE and DLLs) to the users machine and executes them. These
files are cached locally and will not be downloaded again until the developer
copies a new version to the network or web server.
In this session we will discuss how to work with the .NET security features
in code, administer groups and policies using the .NET Configuration Tools,
see no-touch deployment in action and discuss strategies you can use when
developing applications that may not run with full trust.