[jboss-user] [Security & JAAS/JBoss] - java.policy : crash after some hours

jogregoire do-not-reply at jboss.com
Wed Oct 10 10:21:01 EDT 2007


Hello,

I use a java.policy and there si no problem to run my web app (STruts and Hibernate) but an exception is catched when i attempt to reconnect after some hours. I would like to know if it is due to socket connections. So could you have a look on my policy file an correct me ?

// The Java2 security serveur.policy 
// Install with -Djava.security.policy==serveur.policy

// Trusted core Java code
grant codeBase "file:${java.home}/lib/ext/-" {
   permission java.security.AllPermission;
};
grant codeBase "file:${java.home}/lib/*" {
   permission java.security.AllPermission;
};
// For java.home pointing to the JDK jre directory
grant codeBase "file:${java.home}/../lib/*" {
   permission java.security.AllPermission;
};

// Trusted core Jboss code
grant codeBase "file:${jboss.home.dir2}/bin/-" {
   permission java.security.AllPermission;
};
grant codeBase "file:${jboss.home.dir2}/lib/-" {
   permission java.security.AllPermission;
};
grant codeBase "file:${jboss.server.home.dir2}/lib/-" {
   permission java.security.AllPermission;
};
grant codeBase "file:${jboss.server.home.dir2}/deploy/jmx-console.war/-"{
   permission java.security.AllPermission;
};
grant codeBase "file:${jboss.server.home.dir2}/deploy/jbossws14.sar/-"{
   permission java.security.AllPermission;
};
grant codeBase "file:${jboss.server.home.dir2}/deploy/jbossweb-tomcat55.sar/-"{
   permission java.security.AllPermission;
};
grant codeBase "file:${jboss.server.home.dir2}/deploy/jboss-aop.deployer/-"{
   permission java.security.AllPermission;
};
grant codeBase "file:${jboss.server.home.dir2}/deploy/http-invoker.sar/-"{
   permission java.security.AllPermission;
};
grant codeBase "file:${jboss.server.home.dir2}/deploy/jboss-bean.deployer/-"{
   permission java.security.AllPermission;
};
grant codeBase "file:${jboss.server.home.dir2}/deploy/jms/-"{
   permission java.security.AllPermission;
};
grant codeBase "file:${jboss.server.home.dir2}/deploy/uuid-key-generator.sar/-"{
   permission java.security.AllPermission;
};
grant codeBase "file:${jboss.server.home.dir2}/tmp/-" {
   permission java.io.FilePermission "C:\\JBOSS\\jboss-4.0.5.GA\\server\\default\\tmp\\-", "read";
   permission java.io.FilePermission "C:\\JBOSS\\jboss-4.0.5.GA\\server\\default\\tmp\\-", "write";
   permission java.io.FilePermission "C:\\JBOSS\\jboss-4.0.5.GA\\server\\default\\tmp\\-", "delete";
   permission java.io.FilePermission "C:\\DOCUME~1\\JEANOL~1\\LOCALS~1\\-", "read";
   permission java.io.FilePermission "C:\\DOCUME~1\\JEANOL~1\\LOCALS~1\\Temp\\-", "write";
   permission java.io.FilePermission "C:\\DOCUME~1\\JEANOL~1\\LOCALS~1\\Temp\\-", "delete";
   permission java.lang.RuntimePermission "accessDeclaredMembers";
   permission java.lang.RuntimePermission "shutdownHooks";
   permission java.lang.RuntimePermission "getProtectionDomain";
   permission java.lang.reflect.ReflectPermission "suppressAccessChecks";
   permission java.lang.RuntimePermission "createClassLoader";
   permission java.lang.RuntimePermission "getClassLoader";
   permission java.security.SecurityPermission "getPolicy";
};
grant codeBase "file:${jboss.server.home.dir2}/tmp/-" {
   permission java.io.FilePermission "C:\\JBOSS\\jboss-4.0.5.GA\\server\\default\\tmp\\-", "read";
   permission java.io.FilePermission "C:\\JBOSS\\jboss-4.0.5.GA\\server\\default\\tmp\\-", "write";
   permission java.io.FilePermission "C:\\JBOSS\\jboss-4.0.5.GA\\server\\default\\tmp\\-", "delete";
   permission java.io.FilePermission "C:\\DOCUME~1\\JEANOL~1\\LOCALS~1\\-", "read";
   permission java.io.FilePermission "C:\\DOCUME~1\\JEANOL~1\\LOCALS~1\\Temp\\-", "write";
   permission java.io.FilePermission "C:\\DOCUME~1\\JEANOL~1\\LOCALS~1\\Temp\\-", "delete";
   permission java.lang.RuntimePermission "accessDeclaredMembers";
   permission java.lang.RuntimePermission "shutdownHooks";
   permission java.lang.RuntimePermission "getProtectionDomain";
   permission java.lang.reflect.ReflectPermission "suppressAccessChecks";
   permission java.lang.RuntimePermission "createClassLoader";
   permission java.lang.RuntimePermission "getClassLoader";
   permission java.security.SecurityPermission "getPolicy";
};
grant codeBase "file:${jboss.server.home.dir2}/tmp/-" {
   permission java.io.FilePermission "C:\\JBOSS\\jboss-4.0.5.GA\\server\\default\\tmp\\-", "read";
   permission java.io.FilePermission "C:\\JBOSS\\jboss-4.0.5.GA\\server\\default\\tmp\\-", "write";
   permission java.io.FilePermission "C:\\JBOSS\\jboss-4.0.5.GA\\server\\default\\tmp\\-", "delete";
   permission java.io.FilePermission "C:\\DOCUME~1\\JEANOL~1\\LOCALS~1\\-", "read";
   permission java.io.FilePermission "C:\\DOCUME~1\\JEANOL~1\\LOCALS~1\\Temp\\-", "write";
   permission java.io.FilePermission "C:\\DOCUME~1\\JEANOL~1\\LOCALS~1\\Temp\\-", "delete";
   permission java.lang.RuntimePermission "accessDeclaredMembers";
   permission java.lang.RuntimePermission "shutdownHooks";
   permission java.lang.RuntimePermission "getProtectionDomain";
   permission java.lang.reflect.ReflectPermission "suppressAccessChecks";
   permission java.lang.RuntimePermission "createClassLoader";
   permission java.lang.RuntimePermission "getClassLoader";
   permission java.security.SecurityPermission "getPolicy";
};

grant {
   permission java.util.PropertyPermission "*", "read";
   permission java.lang.RuntimePermission "queuePrintJob";
   permission java.net.SocketPermission "localhost:5432", "accept, connect, listen";
   permission java.net.SocketPermission "localhost:8009", "accept, connect, listen";
   permission java.net.SocketPermission "*:80", "accept, connect, listen";
   permission java.net.SocketPermission "*:110", "accept, connect, listen";
   permission java.net.SocketPermission "*:25", "accept, connect, listen";
   permission java.lang.RuntimePermission "accessClassInPackage.*";
   permission java.lang.RuntimePermission "org.jboss.security.SecurityAssociation.getSubject";
   permission javax.management.MBeanServerPermission "findMBeanServer";
   permission javax.management.MBeanPermission "org.jboss.mx.modelmbean.XMBean#*[JMImplementation:type=MBeanRegistry]", "*";
   permission javax.security.auth.AuthPermission "createLoginContext.*";
};
 

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4093510#4093510

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4093510



More information about the jboss-user mailing list