org.eclipse.jetty.policy
类 JettyPolicy

java.lang.Object
  继承者 java.security.Policy
      继承者 org.eclipse.jetty.policy.JettyPolicy

public class JettyPolicy
extends Policy

Policy implementation that will load a set of policy files and manage the mapping of permissions and protection domains Features of JettyPolicy are: - we are able to follow the startup mechanic that jetty uses with jetty-start using OPTIONS=policy,default to be able to startup a security manager and policy implementation without have to rely on the existing JVM cli options - support for specifying multiple policy files to source permissions from - support for merging protection domains across multiple policy files for the same codesource - support for directories of policy files, just specify directory and all *.policy files will be loaded. Possible additions are: - scan policy directory for new policy files being added - jmx reporting - proxying of system security policy where we can proxy access to the system policy should the jvm have been started with one, I had support for this but ripped it out to add in again later - an xml policy file parser, had originally added this using modello but tore it out since it would have been a nightmare to get its dependencies through IP validation, could do this with jvm xml parser instead sometime - check performance of the synch'd map I am using for the protection domain mapping


嵌套类摘要
 
从类 java.security.Policy 继承的嵌套类/接口
Policy.Parameters
 
字段摘要
 
从类 java.security.Policy 继承的字段
UNSUPPORTED_EMPTY_COLLECTION
 
构造方法摘要
JettyPolicy(String policyDirectory, Map<String,String> properties)
           
 
方法摘要
 void dump(PrintStream out)
           
 CertificateValidator getCertificateValidator()
           
static PolicyContext getContext()
          returns the policy context which contains the map of properties that can be referenced in policy files and the keystore for validation
 PermissionCollection getPermissions(CodeSource codesource)
           
 PermissionCollection getPermissions(ProtectionDomain domain)
           
 boolean implies(ProtectionDomain domain, Permission permission)
           
 void initialize()
          required for the jetty policy to start function, initializes the policy monitor and blocks for a full cycle of policy grant updates
 void refresh()
           
 void setCertificateValidator(CertificateValidator validator)
           
 
从类 java.security.Policy 继承的方法
getInstance, getInstance, getInstance, getParameters, getPolicy, getProvider, getType, setPolicy
 
从类 java.lang.Object 继承的方法
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

构造方法详细信息

JettyPolicy

public JettyPolicy(String policyDirectory,
                   Map<String,String> properties)
方法详细信息

refresh

public void refresh()
覆盖:
Policy 中的 refresh

initialize

public void initialize()
required for the jetty policy to start function, initializes the policy monitor and blocks for a full cycle of policy grant updates


getPermissions

public PermissionCollection getPermissions(ProtectionDomain domain)
覆盖:
Policy 中的 getPermissions

getPermissions

public PermissionCollection getPermissions(CodeSource codesource)
覆盖:
Policy 中的 getPermissions

implies

public boolean implies(ProtectionDomain domain,
                       Permission permission)
覆盖:
Policy 中的 implies

getContext

public static PolicyContext getContext()
returns the policy context which contains the map of properties that can be referenced in policy files and the keystore for validation

返回:
the policy context

dump

public void dump(PrintStream out)

getCertificateValidator

public CertificateValidator getCertificateValidator()

setCertificateValidator

public void setCertificateValidator(CertificateValidator validator)


Copyright © 2013. All Rights Reserved.