• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Paul Clapham
  • Jeanne Boyarsky
  • Junilu Lacar
  • Henry Wong
  • Ron McLeod
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Frits Walraven
  • Tim Holloway
  • Carey Brown
  • Piet Souris
  • salvin francis
  • fred rosenberger

Policy file and RMISecurityManager

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",
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.
Posts: 17346
Mac IntelliJ IDE 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.
PI day is 3.14 (march 14th) and is also einstein's birthday. And this is merely a tiny ad:
Devious Experiments for a Truly Passive Greenhouse!
    Bookmark Topic Watch Topic
  • New Topic