// This file governs the permissions directly granted to all jar files
// listed under the jetty.home/lib directory.
//
// Review of this file is recommended and possible tweaking of the codeBase
// is likely in the future.

grant codeBase "file:${jetty.home}${/}lib${/}-" {
	 
   permission java.lang.RuntimePermission "getClassLoader";
	 
   permission java.util.PropertyPermission "org.eclipse.jetty.webapp.WebAppClassLoader.extensions", "read";
   permission java.util.PropertyPermission "org.eclipse.jetty.ajp.PathMap.separators", "read";
 
   permission java.util.PropertyPermission "ROLLOVERFILE_BACKUP_FORMAT", "read";
	 
   permission java.util.PropertyPermission "org.eclipse.jetty.server.webapp.parentLoaderPriority", "read";
   permission java.util.PropertyPermission "org.eclipse.jetty.server.Request.maxFormContentSize", "read";
	 
   permission javax.security.auth.AuthPermission "modifyPrincipals";	 
   permission javax.security.auth.AuthPermission "modifyPrivateCredentials";
   permission javax.security.auth.AuthPermission "setReadOnly";
  
   permission java.io.FilePermission "${jetty.home}${/}-", "read";
   permission java.io.FilePermission "${java.io.tmpdir}", "read, write";
   permission java.io.FilePermission "${java.io.tmpdir}${/}-", "read, write";
   permission java.io.FilePermission "${/}private${/}${java.io.tmpdir}", "read, write";
   permission java.io.FilePermission "${/}private${/}${java.io.tmpdir}${/}-", "read, write";
   permission java.io.FilePermission "${jetty.home}${/}lib${/}policy${/}-", "read";
   
   
   permission java.io.FilePermission "${java.io.tmpdir}${/}-", "delete";

   
   permission java.io.FilePermission "${jetty.home}${/}logs", "read, write";
   permission java.io.FilePermission "${jetty.home}${/}logs${/}*", "read, write";
     
   permission java.lang.RuntimePermission "createClassLoader";
   permission java.lang.RuntimePermission "setContextClassLoader";
     
   permission java.security.SecurityPermission "getPolicy";
   permission java.lang.RuntimePermission "accessDeclaredMembers";
     
   // jetty specific properties
   permission java.util.PropertyPermission "org.eclipse.jetty.util.log.class", "read";
   permission java.util.PropertyPermission "org.eclipse.jetty.util.log.stderr.DEBUG", "read";
   permission java.util.PropertyPermission "org.eclipse.jetty.util.log.DEBUG", "read";
   permission java.util.PropertyPermission "START", "read";
   permission java.util.PropertyPermission "STOP.PORT", "read";
   permission java.util.PropertyPermission "STOP.KEY", "read";
   permission java.util.PropertyPermission "org.eclipse.jetty.util.log.IGNORED", "read";      
   permission java.util.PropertyPermission "CLASSPATH", "read";
   permission java.util.PropertyPermission "OPTIONS", "read";
   permission java.util.PropertyPermission "JETTY_NO_SHUTDOWN_HOOK", "read";
   permission java.util.PropertyPermission "ISO_8859_1", "read";
   permission java.util.PropertyPermission "jetty.home", "read, write";
     
   permission java.util.PropertyPermission "user.home", "read";
   permission java.util.PropertyPermission "user.dir", "read";
   
     
   permission java.util.PropertyPermission "jetty.class.path", "read, write";
   permission java.util.PropertyPermission "java.class.path", "read, write";
     
   permission java.util.PropertyPermission "jetty.lib", "read";
   permission java.util.PropertyPermission "jetty.server", "read";
   permission java.util.PropertyPermission "jetty.host", "read";
   permission java.util.PropertyPermission "jetty.port", "read";
     
   permission java.util.PropertyPermission "org.eclipse.jetty.util.log.stderr.class", "read";
   		
   permission java.util.PropertyPermission "org.eclipse.jetty.util.URI.charset", "read";
   		
   permission java.util.PropertyPermission "org.eclipse.jetty.util.FileResource.checkAliases", "read";
   		
   permission java.util.PropertyPermission "org.eclipse.jetty.xml.XmlParser.Validating", "read";
   		
   permission java.util.PropertyPermission "org.eclipse.jetty.io.nio.JVMBUG_THRESHHOLD", "read, write";
    
   permission java.util.PropertyPermission "org.eclipse.jetty.util.TypeUtil.IntegerCacheSize", "read, write";
       
   permission java.util.PropertyPermission "org.eclipse.jetty.util.TypeUtil.LongCacheSize", "read";
       
   permission java.util.PropertyPermission "org.eclipse.jetty.io.AbstractBuffer.boundsChecking", "read";
       
   // provides access to webapps
   permission java.io.FilePermission "${jetty.home}${/}webapps${/}-", "read"; // Ought to go up a specific codebase
              
              
   // Allows any thread to stop itself using the java.lang.Thread.stop()
   // method that takes no argument.
   permission java.lang.RuntimePermission "stopThread";    
   
    // jsp support   
   permission java.net.SocketPermission "java.sun.com:80", "connect,resolve";
	 
};