How to setup Security Manager for Java Servlet - RMI in Tomcat?
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Charlotte_Loh
Posted On:   Tuesday, November 13, 2001 05:58 AM

Hi, I am using TomCat to develop Java Servlet-RMI. I know how to setup Security Manager for the Java Rmi Server and Java RMI Client. ---Policy File for Server---- grant { // Allow everything for now permission java.security.AllPermission; }; grant codeBase "file:/C:/TOMCAT_3.2.1/webapps/rmiServlet/WEB-INF/classes/" permission java.net.SocketPermission "127.0.0.1", "accept, connect, listen, resolve"; }; ---Policy File for Client ----- grant { // Allow everything for now permission java.security.AllPermission; }; grant codeBase "file:/C:/TOMCAT_3.2.1/webapps/rmi   More>>

Hi,



I am using TomCat to develop Java Servlet-RMI.



I know how to setup Security Manager for the Java Rmi Server and Java RMI Client.



---Policy File for Server----



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


grant codeBase
"file:/C:/TOMCAT_3.2.1/webapps/rmiServlet/WEB-INF/classes/" permission
java.net.SocketPermission "127.0.0.1", "accept, connect, listen, resolve";
};



---Policy File for Client -----



grant {


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


grant codeBase


"file:/C:/TOMCAT_3.2.1/webapps/rmiServlet/WEB-INF/classes/" {
permission java.net.SocketPermission "127.0.0.1", "accept, connect, listen, resolve";
};



--------------------------------



But I do not know how to setup Security Manager for
Java Servlet-RMI Client.



I couldn't run Java Servlet - RMI Client because of the
security manager exception being thrown.



My question is how do I setup the security manager for
Java Servlet-RMI that acts as Client?



I know that when we run Java RMI Client we include the policy file name to the java command line like bolow



java -Djava.security.policy=Policy_File_Name.policy class_Name



As Java Servlet-RMI client is invoked by a html page or a servlet page, how do I include the policy to the Java Servlet-RMI Client?



I am new to this area. Can anyone help me?


Your help will be appreciated.



Thank you very much.

   <<Less

Re: How to setup Security Manager for Java Servlet - RMI in Tomcat?

Posted By:   Charlotte_Loh  
Posted On:   Wednesday, November 14, 2001 08:49 AM

For those who have the same problem like me, you can refer to :



http://jakarta.apache.org/tomcat/tomcat-3.2-doc/uguide/tomcat-security.html

About | Sitemap | Contact