home *** CD-ROM | disk | FTP | other *** search
/ PC Professionell 2004 December / PCpro_2004_12.ISO / files / webserver / xampp / xampp-tomcat-addon-1.4.9-installer.exe / catalina.policy < prev    next >
Encoding:
Text File  |  2004-05-17  |  6.9 KB  |  163 lines

  1. // ============================================================================
  2. // catalina.corepolicy - Security Policy Permissions for Tomcat 5
  3. //
  4. // This file contains a default set of security policies to be enforced (by the
  5. // JVM) when Catalina is executed with the "-security" option.  In addition
  6. // to the permissions granted here, the following additional permissions are
  7. // granted to the codebase specific to each web application:
  8. //
  9. // * Read access to the document root directory
  10. //
  11. // $Id: catalina.policy,v 1.11 2004/03/02 12:36:22 remm Exp $
  12. // ============================================================================
  13.  
  14.  
  15. // ========== SYSTEM CODE PERMISSIONS =========================================
  16.  
  17.  
  18. // These permissions apply to javac
  19. grant codeBase "file:${java.home}/lib/-" {
  20.         permission java.security.AllPermission;
  21. };
  22.  
  23. // These permissions apply to all shared system extensions
  24. grant codeBase "file:${java.home}/jre/lib/ext/-" {
  25.         permission java.security.AllPermission;
  26. };
  27.  
  28. // These permissions apply to javac when ${java.home] points at $JAVA_HOME/jre
  29. grant codeBase "file:${java.home}/../lib/-" {
  30.         permission java.security.AllPermission;
  31. };
  32.  
  33. // These permissions apply to all shared system extensions when
  34. // ${java.home} points at $JAVA_HOME/jre
  35. grant codeBase "file:${java.home}/lib/ext/-" {
  36.         permission java.security.AllPermission;
  37. };
  38.  
  39.  
  40. // ========== CATALINA CODE PERMISSIONS =======================================
  41.  
  42.  
  43. // These permissions apply to the launcher code
  44. grant codeBase "file:${catalina.home}/bin/commons-launcher.jar" {
  45.         permission java.security.AllPermission;
  46. };
  47.  
  48. // These permissions apply to the daemon code
  49. grant codeBase "file:${catalina.home}/bin/commons-daemon.jar" {
  50.         permission java.security.AllPermission;
  51. };
  52.  
  53. // These permissions apply to the commons-logging API
  54. grant codeBase "file:${catalina.home}/bin/commons-logging-api.jar" {
  55.         permission java.security.AllPermission;
  56. };
  57.  
  58. // These permissions apply to the server startup code
  59. grant codeBase "file:${catalina.home}/bin/bootstrap.jar" {
  60.         permission java.security.AllPermission;
  61. };
  62.  
  63. // These permissions apply to the JMX server
  64. grant codeBase "file:${catalina.home}/bin/jmx.jar" {
  65.         permission java.security.AllPermission;
  66. };
  67.  
  68. // These permissions apply to the servlet API classes
  69. // and those that are shared across all class loaders
  70. // located in the "common" directory
  71. grant codeBase "file:${catalina.home}/common/-" {
  72.         permission java.security.AllPermission;
  73. };
  74.  
  75. // These permissions apply to the container's core code, plus any additional
  76. // libraries installed in the "server" directory
  77. grant codeBase "file:${catalina.home}/server/-" {
  78.         permission java.security.AllPermission;
  79. };
  80.  
  81. // ========== WEB APPLICATION PERMISSIONS =====================================
  82.  
  83.  
  84. // These permissions are granted by default to all web applications
  85. // In addition, a web application will be given a read FilePermission
  86. // and JndiPermission for all files and directories in its document root.
  87. grant { 
  88.     // Required for JNDI lookup of named JDBC DataSource's and
  89.     // javamail named MimePart DataSource used to send mail
  90.     permission java.util.PropertyPermission "java.home", "read";
  91.     permission java.util.PropertyPermission "java.naming.*", "read";
  92.     permission java.util.PropertyPermission "javax.sql.*", "read";
  93.  
  94.     // OS Specific properties to allow read access
  95.     permission java.util.PropertyPermission "os.name", "read";
  96.     permission java.util.PropertyPermission "os.version", "read";
  97.     permission java.util.PropertyPermission "os.arch", "read";
  98.     permission java.util.PropertyPermission "file.separator", "read";
  99.     permission java.util.PropertyPermission "path.separator", "read";
  100.     permission java.util.PropertyPermission "line.separator", "read";
  101.  
  102.     // JVM properties to allow read access
  103.     permission java.util.PropertyPermission "java.version", "read";
  104.     permission java.util.PropertyPermission "java.vendor", "read";
  105.     permission java.util.PropertyPermission "java.vendor.url", "read";
  106.     permission java.util.PropertyPermission "java.class.version", "read";
  107.     permission java.util.PropertyPermission "java.specification.version", "read";
  108.     permission java.util.PropertyPermission "java.specification.vendor", "read";
  109.     permission java.util.PropertyPermission "java.specification.name", "read";
  110.  
  111.     permission java.util.PropertyPermission "java.vm.specification.version", "read";
  112.     permission java.util.PropertyPermission "java.vm.specification.vendor", "read";
  113.     permission java.util.PropertyPermission "java.vm.specification.name", "read";
  114.     permission java.util.PropertyPermission "java.vm.version", "read";
  115.     permission java.util.PropertyPermission "java.vm.vendor", "read";
  116.     permission java.util.PropertyPermission "java.vm.name", "read";
  117.  
  118.     // Required for OpenJMX
  119.     permission java.lang.RuntimePermission "getAttribute";
  120.  
  121.     // Allow read of JAXP compliant XML parser debug
  122.     permission java.util.PropertyPermission "jaxp.debug", "read";
  123.  
  124.     // Precompiled JSPs need access to this package.
  125.     permission java.lang.RuntimePermission "accessClassInPackage.org.apache.jasper.runtime";
  126.     permission java.lang.RuntimePermission "accessClassInPackage.org.apache.jasper.runtime.*";
  127.     
  128. };
  129.  
  130.  
  131. // You can assign additional permissions to particular web applications by
  132. // adding additional "grant" entries here, based on the code base for that
  133. // application, /WEB-INF/classes/, or /WEB-INF/lib/ jar files.
  134. //
  135. // Different permissions can be granted to JSP pages, classes loaded from
  136. // the /WEB-INF/classes/ directory, all jar files in the /WEB-INF/lib/
  137. // directory, or even to individual jar files in the /WEB-INF/lib/ directory.
  138. //
  139. // For instance, assume that the standard "examples" application
  140. // included a JDBC driver that needed to establish a network connection to the
  141. // corresponding database and used the scrape taglib to get the weather from
  142. // the NOAA web server.  You might create a "grant" entries like this:
  143. //
  144. // The permissions granted to the context root directory apply to JSP pages.
  145. // grant codeBase "file:${catalina.home}/webapps/examples/-" {
  146. //      permission java.net.SocketPermission "dbhost.mycompany.com:5432", "connect";
  147. //      permission java.net.SocketPermission "*.noaa.gov:80", "connect";
  148. // };
  149. //
  150. // The permissions granted to the context WEB-INF/classes directory
  151. // grant codeBase "file:${catalina.home}/webapps/examples/WEB-INF/classes/-" {
  152. // };
  153. //
  154. // The permission granted to your JDBC driver
  155. // grant codeBase "jar:file:${catalina.home}/webapps/examples/WEB-INF/lib/driver.jar!/-" {
  156. //      permission java.net.SocketPermission "dbhost.mycompany.com:5432", "connect";
  157. // };
  158. // The permission granted to the scrape taglib
  159. // grant codeBase "jar:file:${catalina.home}/webapps/examples/WEB-INF/lib/scrape.jar!/-" {
  160. //      permission java.net.SocketPermission "*.noaa.gov:80", "connect";
  161. // };
  162.  
  163.