How do I communicate over a secure RMI link?

Sameer Tyagi

You can find all the details you need within the following Sun documents:

The SUN SSL Info
Creating custom socket factories

The naming registry is implemented as a standard RMI service, so attempts to register and lookup services will involve network connections being established. With an SSL socket factory installed in a client these connections will be SSL-secured. As a result, the naming registry must use SSL to accept connections. For this reason you must install the SSL socket factory in your naming registry as well as your RMI server. The most straightforward way to achieve this is to have your server start its own naming registry. This registry will then benefit from the server's SSL support.

The server would need to invoke a method like this before binding the object and starting the registry and similarly on the client beore looking up the object
RMISocketFactory.setSocketFactory (some vendor provided factory);

Note : In other words the vendors provide a SSL implementation of the registry that needs to be started instead of the rmiregisty in case you are not programmatically statring the registry through a LocateRegistry.createRegistry().

0 Comments  (click to add your comment)
Comment and Contribute

 

 

 

 

 


(Maximum characters: 1200). You have 1200 characters left.

 

 

About | Sitemap | Contact