Wednesday, August 29, 2007

Add security policy in tomcat5 on ubuntu

open the file
/etc/tomcat5/policy.d/04webapps.policy
and add folowing lines to that file here the container directory is "test" replace your container directory with "test"

grant codeBase "file:${catalina.home}/webapps/test/WEB-INF/classes/-" {
permission java.security.AllPermission;
};


with this entry all permision will be set to the classes in test/WEB-INF/classes/ directory; if you whish to apply specialized permisions you can customize
"permission java.security.AllPermission;" line

eg:
permission java.net.SocketPermission "localhost:9001", "connect"

for socket permision

No comments:

Post a Comment