MembershipCondition

AllMembershipCondition

======================

代表着一个匹配所有代码的membership condition. 这个类不能被继承.

这个membership condition通常被用做一个policy level的root code group, 以便于这个policy能够应用到所有的代码上.

http://msdn.microsoft.com/en-us/library/system.security.policy.allmembershipcondition.aspx

UrlMembershipCondition

======================

通过测试URL来确定一个assembly是否属于一个code group. 这个类不能被继承.

这里会考量完整的URL, 包括协议(HTTP, HTTPS, FTP) 和 文件. 比如说, http://www.fourthcoffee.com/process/grind.htm 就是一个完整的URL.

 

URLs可以被精确地匹配, 也可以在末尾指定一个通配符(wildcard)来匹配. 比如说, http://www.fourthcoffee.com/process/* 就是一个wildcard URL.

 

http://msdn.microsoft.com/en-us/library/system.security.policy.urlmembershipcondition.aspx

 

ZoneMembershipCondition

======================

通过测试起源的zone来确定一个assembly是否属于一个code group. 这个类不能被继承.

这里所指的zone可以用一个枚举变量来指定, 该枚举变量叫做SecurityZone, 它的成员有:

  • MyComputer
  • Intranet
  • Trusted
  • Internet
  • Untrusted
  • NoZone

具体是哪个zone, 可以使用Microsoft Internet Explorer的选项面板来配置.

http://msdn.microsoft.com/en-us/library/system.security.policy.zonemembershipcondition.aspx

StrongNameMembershipCondition

======================

通过验证程序集的强命名来确定一个程序集是否属于一个code group. 这个类不能被继承.

Strong names are well suited to specifying code assemblies to which you give a rich set of powerful permissions. Since strong names are cryptographically verified, attackers cannot impersonate rightful assemblies and use their permissions.

强明镜是非常适合确定那些你给了很多强大权限的code assemblies的. 因为强命名是通过加密来鉴定的, 攻击者不能模仿有权限的assemblies, 也不能使用它们的权限.

http://msdn.microsoft.com/en-us/library/system.security.policy.strongnamemembershipcondition.aspx

原文地址:https://www.cnblogs.com/awpatp/p/1669284.html