Weblog
First CAS sample in Mono
I've been working on Mono's Code Access Security (CAS) since being back from vacations. This is, like cryptography, not a very visual-friendly task - but there's still some progress to be shown ;-)
If you compile the following source file...
... you will get the following output using either Microsoft's runtime or Mono (CVS):
Now while we're still a very long way from complete CAS support but this little subset is an important milestone because:
- it shows that (a least a subset) of the security policy can be resolved;
- it use the host provided evidences to get the current zone (MyComputer) from which the code is being executed;
- it works using a partial (assembly-based) stack walk.
Best of all it allows to tests many security classes, like permissions, using different policies - something not easily achievable using NUnit. It also open up the doors for more people to start experimenting with CAS, albeit in a very limited form right now, with the next Mono release (1.1.1).
Still missing...
- full stack walk - required to support modifiers like
Assert,DenyandPermitOnly; - support for declarative security (attributes);
- tests;
- tools like
caspol.exeandpermview.exe; - more tests;
- the class librairies audit - to ensure correct security attributes are applied;
- and even more tests.
8/17/2004 09:32:28 | Comments
The views expressed on this website/weblog are mine alone and do not necessarily reflect the views of my employer.
