Skip to Main Content

Java Security

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Rmi server : authorize client with a policy file

843811Jun 27 2001 — edited Jul 2 2001
Hello,

I have a Rmi client/server application

I wan't my server only authorize a list of clients.

For doing that I define a security manager started with my server :

My server is started :

java -java.security.manager=java.lang.SecurityManager -MyRmiServer

I defined a policy file :

// permission

grant {

permission java.io.FilePermission "<<ALL FILES>>", "execute, read, write, delete";

permission java.net.SocketPermission "127.0.0.1", "accept,connect,listen,resolve";
permission java.net.SocketPermission "client1", "accept,connect,listen,resolve";
};

With this system my client1 got ConnectException when trying to accessed rmi service.

Note : without security manager everything works fine.

Thanks Philippe
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jul 30 2001
Added on Jun 27 2001
1 comment
38 views