This week's book giveaway is in the OCMJEA forum.
We're giving away four copies of OCM Java EE 6 Enterprise Architect Exam Guide and have Paul Allen & Joseph Bambara on-line!
See this thread for details.
The moose likes Developer Certification (SCJD/OCMJD) and the fly likes rmi security problem : policy file Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Certification » Developer Certification (SCJD/OCMJD)
Bookmark "rmi security problem : policy file" Watch "rmi security problem : policy file" New topic
Author

rmi security problem : policy file

Michael Tu
Greenhorn

Joined: Oct 14, 2002
Posts: 29
Have to bring myself here as the problem makes me crazy

I created a security manager in my RMI server simply use:
System.setSecurityManager(new RMISecurityManager());

Also, I have a fbn.policy file like:
grant {
permission java.security.AllPermission;
};

then I start my RMI server by specifying -Djava.security.policy=c:\...\fbn.policy. The server runs OK.
Now, my client side also has a line of:
System.setSecurityManager(new RMISecurityManager());

I run my client in the same PC with -Djava.security.policy=c:\...\fbn.policy. It doesn't work! Connection error comes out.
If I do not implement SecurityManager, everything is fine. What's the hell for this? Can anyone advise? Thanks.
Michael
John Smith
Ranch Hand

Joined: Oct 08, 2001
Posts: 2937

I run my client in the same PC with -Djava.security.policy=c:\...\fbn.policy. It doesn't work! Connection error comes out.
If I do not implement SecurityManager, everything is fine. What's the hell for this? Can anyone advise? Thanks.

The consensus in this group is that you should not use policy files, security managers, codebase or classpath settings, or dynamic downloading. These are the "extra features" that do not add much to your design, but they complicate things greatly for you and your accessor.
Eugene.
 
Consider Paul's rocket mass heater.
 
subject: rmi security problem : policy file