[This is preliminary documentation and is subject to change.]

Type must be something that inherits from System.Security.Permissions.CodeAccessSecurityAttribute.

Namespace:  Forcepoint.GUISS
Assembly:  Forcepoint.GUISS (in Forcepoint.GUISS.dll) Version: 0.2.0.1 (0.2.0.1)

Syntax

C#
public Dictionary<Type, SecurityCheckDelegate> SecurityChecks { get; set; }

Remarks

Examples of PermissionAttributes are:

For a full list of PermissionAttributes, see http://msdn.microsoft.com/en-us/library/system.security.permissions.codeaccesssecurityattribute.aspx

In Skin libraries, the Security should be set this way:

  1. Under the Properties node in the Solution Explorer, open up AssemblyInfo.cs
  2. At the bottom of the file, add something like this: [assembly: FileIOPermissionAttribute(SecurityAction.RequestRefuse, Unrestricted=true)]

Examples

CopyC#
private SetUpSecurity
{
    Skin.SecurityChecks.Add(typeof(FileIOPermissionAttribute), new SecurityCheckDelegate(SecurityCheck_FileIOPermission));
}

private bool SecurityCheck_FileIOPermission(object permissionAttribute)
{
    FileIOPermissionAttribute fiopa = (FileIOPermissionAttribute)permissionAttribute;
    //This means: Request refusal for having Unrestricted access.
    if (fiopa.Action == SecurityAction.RequestRefuse && fiopa.Unrestricted == true)
        return true;
    else
        return false;
}

See Also