• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Policy file and RMISecurityManager

 
Sai Prasad
Ranch Hand
Posts: 560
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I did some testing using a Win2K as the client and Win95 as the server(?). I did that because I can start the GUI quickly in my Win2K.
I like to share with you some valuable facts about policy file and RMISecurityManager.
1) If you are going to use a RMISecurityManager on the server side, you must use a java.policy file during server startup with at least the content below:
---------------
grant {
permission java.net.SocketPermission "*:1024-65535",
"connect,accept";
permission java.io.FilePermission
"db.db", "read,write";
permission java.io.FilePermission
"fbn.properties", "read";
};
----------------
Note: If you don't have a properties file, you can ignore the 3rd line in the policy file.
2)You don't have use a RMISecurityManager on the client side even if you use a RMISecurityManager on the server side.
3)I was able to run the application with no RMISecurityManager set on client and server. If you don't use RMISecurityManager on client and server, no need to use a java.policy file at all in server or client.
I remember reading Mark's comments about using a some kind of security manager on the server side.
Mark, Can you tell me why I am supposed to set the RMI or any security manager on the server side, when I can get the application to work with out any security manager on both sides.
Thanks.
 
Mark Spritzler
ranger
Sheriff
Posts: 17278
6
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Actually Peter stated a couple of days ago that we really don't need the SecurityManager at all. I only got it to work with one of the Client. I could never get the server one to work, so I removed it.
Now I think I'd prefer not to put any on either side.
I like simpler and easier.
Mark
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic