1 Reply Latest reply on Apr 17, 2003 10:45 AM by michaelaemisegger

    java.security.AllPermission not granted

    michaelaemisegger Newbie

      I try to run the default server with security manager turned on:


      D:\jboss-3.0.6_tomcat-4.1.18\bin>run
      ===============================================================================
      .
      JBoss Bootstrap Environment
      .
      JBOSS_HOME: D:\jboss-3.0.6_tomcat-4.1.18\bin\\..
      .
      JAVA: D:\j2sdk1.4.1\bin\java
      .
      JAVA_OPTS: -Dprogram.name=run.bat -Djava.security.manager -Djava.security.policy==../server/default/conf/server.policy -Djava.security.de
      bug=all
      .
      CLASSPATH: ;D:\j2sdk1.4.1\lib\tools.jar;D:\jboss-3.0.6_tomcat-4.1.18\bin\\run.jar
      .
      ===============================================================================
      .
      properties: reading security properties file: D:\j2sdk1.4.1\jre\lib\security\java.security
      jar: beginEntry META-INF/MANIFEST.MF
      jar: done with meta!
      jar: nothing to verify!
      scl: getPermissions ProtectionDomain (file:/D:/jboss-3.0.6_tomcat-4.1.18/bin/run.jar <no certificates>)
      sun.misc.Launcher$AppClassLoader@92e78c
      <no principals>
      java.security.Permissions@1c78e57 (
      (java.lang.RuntimePermission exitVM)
      (java.io.FilePermission \D:\jboss-3.0.6_tomcat-4.1.18\bin\run.jar read)
      )


      scl:
      policy: reading file:/D:/jboss-3.0.6_tomcat-4.1.18/server/default/conf/server.policy
      policy: Adding policy entry:
      policy: signedBy null
      policy: codeBase null
      policy: (java.security.AllPermission <all permissions> <all actions>)
      policy:
      policy: overriding other policies!
      policy: getPermissions:
      PD CodeSource: (file:/D:/jboss-3.0.6_tomcat-4.1.18/bin/run.jar <no certificates>)
      PD ClassLoader: sun.misc.Launcher$AppClassLoader@92e78c
      PD Principals: <no principals>
      java.lang.Exception: Stack trace
      at java.lang.Thread.dumpStack(Thread.java:1071)
      at java.security.AccessController.checkPermission(AccessController.java:391)
      at java.lang.SecurityManager.checkPermission(SecurityManager.java:542)
      at java.lang.SecurityManager.checkRead(SecurityManager.java:887)
      at java.io.File.isDirectory(File.java:698)
      at sun.net.www.ParseUtil.fileToEncodedURL(ParseUtil.java:208)
      at sun.security.provider.PolicyFile.canonicalizeCodebase(PolicyFile.java:1626)
      at sun.security.provider.PolicyFile.access$400(PolicyFile.java:243)
      at sun.security.provider.PolicyFile$3.run(PolicyFile.java:1067)
      at java.security.AccessController.doPrivileged(Native Method)
      at sun.security.provider.PolicyFile.getPermissions(PolicyFile.java:1063)
      at sun.security.provider.PolicyFile.getPermissions(PolicyFile.java:1013)
      at sun.security.provider.PolicyFile.implies(PolicyFile.java:965)
      at java.security.ProtectionDomain.implies(ProtectionDomain.java:188)
      at java.security.AccessControlContext.checkPermission(AccessControlContext.java:255)
      at java.security.AccessController.checkPermission(AccessController.java:401)
      at java.lang.SecurityManager.checkPermission(SecurityManager.java:542)
      at java.lang.SecurityManager.checkPropertiesAccess(SecurityManager.java:1259)
      at java.lang.System.getProperties(System.java:500)
      at org.jboss.Main.(Main.java:74)
      at org.jboss.Main$1.run(Main.java:380)
      at java.lang.Thread.run(Thread.java:536)
      access: domain (context is null)
      access: access allowed (java.io.FilePermission D:\jboss-3.0.6_tomcat-4.1.18\bin\run.jar read)
      policy: evaluate codesources:
      Policy CodeSource: (null <no certificates>)
      Active CodeSource: (file:/D:/jboss-3.0.6_tomcat-4.1.18/bin/run.jar <no certificates>)
      policy: evaluate principals:
      Policy Principals: []
      Active Principals: []
      policy: evaluation (codesource/principals) passed
      policy: granting (java.security.AllPermission <all permissions> <all actions>)
      access: access allowed (java.util.PropertyPermission * read,write)
      java.lang.Exception: Stack trace
      at java.lang.Thread.dumpStack(Thread.java:1071)
      at java.security.AccessControlContext.checkPermission(AccessControlContext.java:228)
      at java.security.AccessController.checkPermission(AccessController.java:401)
      at java.lang.SecurityManager.checkPermission(SecurityManager.java:542)
      at java.lang.SecurityManager.checkPropertyAccess(SecurityManager.java:1291)
      at java.lang.System.getProperty(System.java:572)
      at org.jboss.Main.boot(Main.java:94)
      at org.jboss.Main$1.run(Main.java:381)
      at java.lang.Thread.run(Thread.java:536)
      java.lang.Exception: Stack trace
      at java.lang.Thread.dumpStack(Thread.java:1071)
      at java.security.AccessController.checkPermission(AccessController.java:391)
      at java.lang.SecurityManager.checkPermission(SecurityManager.java:542)
      at java.lang.SecurityManager.checkPropertyAccess(SecurityManager.java:1291)
      at java.lang.System.getProperty(System.java:572)
      at sun.security.action.GetPropertyAction.run(GetPropertyAction.java:66)
      at java.security.AccessController.doPrivileged(Native Method)
      at java.security.ProtectionDomain.seeAllp(ProtectionDomain.java:233)
      at java.security.ProtectionDomain.toString(ProtectionDomain.java:219)
      at java.lang.String.valueOf(String.java:2177)
      at java.lang.StringBuffer.append(StringBuffer.java:361)
      at java.security.AccessControlContext.checkPermission(AccessControlContext.java:234)
      at java.security.AccessController.checkPermission(AccessController.java:401)
      at java.lang.SecurityManager.checkPermission(SecurityManager.java:542)
      at java.lang.SecurityManager.checkPropertyAccess(SecurityManager.java:1291)
      at java.lang.System.getProperty(System.java:572)
      at org.jboss.Main.boot(Main.java:94)
      at org.jboss.Main$1.run(Main.java:381)
      at java.lang.Thread.run(Thread.java:536)



      What is the source of the error messages? Both, .java.policy in my home directory and ../server/default/conf/server.policy, have only following permission entry:

      grant {
      // Allow everything for now
      permission java.security.AllPermission;
      };