NGWS SDK Documentation  

This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!

ISecurityEncodable Interface

This interface defines the methods that convert permission object state to and from XML element representation. The XML representation of permissions is used to describe instances of permissions for code requests, declarative security permission sets, and security policy configuration.

ISecurityEncodable

[Visual Basic]
Public Interface ISecurityEncodable
[C#]
public interface ISecurityEncodable
[C++]
public __gc __interface ISecurityEncodable

[JScript] In JScript, you can use the interfaces in the NGWS frameworks, but you cannot define your own.

Classes that Implement ISecurityEncodable

Class Description
AllMembershipCondition Membership condition that matches all code.
ApplicationDirectoryMembershipCondition Membership condition tests if the assembly is within the application directory or not.
CodeAccessPermission CodeAccessPermission is an abstract base class that provides functionality required by all code access permissions. Some of its methods are abstract and must be implemented by non-abstract subclasses of CodeAccessPermission. Some of the implemented methods cannot be overridden.
FirstMatchCodeGroup FirstMatchCodeGroup allows security policy to be defined that works similar to a switch {case 1: ...; case 2: ...; ... default: ...; } conditional structure.
HashMembershipCondition Membership condition that matches only a certain assembly with specified hash code.
PermissionSet Represents a set of permissions of different types. This class supports all functionality of a permission, for the set of permissions as a whole.
PolicyStatement The PolicyStatement class represents an enumeration of the result of a code group matching.
PrincipalPermission Allows checks against the Active principal (see IPrincipal object) using the language constructs defined for both declarative and imperative security actions. By passing identity information (user name and role) to the constructor, the PrincipalPermission object can be used to demand that the identity of the active principal matches this information.

To match the active Principal object, and associated Identity object, both the specified identity and role must match. A NULL identity string is interpreted as a request to match any identity. A NULL role string will match any role. By implication, PrincipalPermission(NULL, NULL) will match the identity and roles in any Principal object. It is also possible to construct a PrincipalPermission that only checks for whether the Identity represents and authenticated or unauthenticated entity. In this case, the name and roles are ignored.

PublisherMembershipCondition Security policy membership condition based on software publisher certificate.
SiteMembershipCondition Security policy membership condition based on site of origin.
SkipVerificationMembershipCondition [To be supplied.]
StrongNameMembershipCondition Security policy membership condition based on strong name.
UnionCodeGroup Code groups are the building blocks of code access security policy. Each policy level consists of a root code group that may have child code groups and so on forming a tree. Each code group has a membership condition that determines if a given assembly belongs to it or not based on the evidence for that assembly. Only code groups whose membership conditions match a given assembly and their children apply policy.

UnionCodeGroup is the most common type of code group, the policy statement of all matching child code groups (and by extension their children) are unioned together with the permission set of the matching parent code group. Thus, if its membership condition matches this code group will union its policy statement with those of all its children that also match the evidence.

URLMembershipCondition Membership condition for security policy- code belongs to the group if it matches the specified URL.
ZoneMembershipCondition Security policy membership condition based on zone of origin.

Remarks

You need to implement this permission for any new permission object.

Requirements

Namespace: System.Security

Assembly: mscorlib.dll

See Also

ISecurityEncodable Members | System.Security Namespace