[Mono-list] Declarative security issues
Hinne Hettema (DSL AK)
Mon, 29 Jul 2002 10:42:21 +1200
"From VS.NET help:
"Declarative security syntax uses attributes to place security information
into the metadata of your code." "
I do agree the data ends up in the metadata, but I was wondering if it is in
the right place... I also check the web, btw (but may be looking in the
wrong place here).
From section 21.11 of the spec:
"Note: The general flow from a compiler's point of view is as follows. The
user specifies a custom attribute through some language-specific syntax that
encodes a call to the attribute's constructor. If the attribute's type is
derived (directly or indirectly) from
System.Security.Permissions.SecurityAttribute then it is a security
custom attribute and requires special treatment, as follows (other custom
attributes are handled by simply recording the constructor in the metadata
as described in Section 21.10). The attribute object is constructed, and
provides a method (CreatePermission) to convert it into a security
permission object (an object derived from System.Security.Permission). All
the permission objects attached to a given metadata item with the same
security action are combined together into a System.Security.PermissionSet.
This permission set is converted into a form that is ready to be stored in
XML using its ToXML method to create a System.Security.SecurityElement.
Finally, the XML that is required for the metadata is created using the
ToString method on the security element."
The point is that the DeclSecurity table should get filled with some data as
a result of this? Is it a case of some of the classes being as yet
incomplete? Am I totally off-base here?