I am developing a small RMI application which implements a secure credit card refund. The basic architecture is that the RMI client is on a client server, the RMI server (which
communicates with the secure site using JSSE & XML-RPC) is on a secure machine in a hosting centre. There is a firewall between the client and server and this is what is causing the problem. These machines are all running Solaris.
I've read and almost understood the article by Tim Goffings ...
but still have a few problems. Basically, the RMI server listens on port 1099 so I've enabled this in java.policy. This is where I'm at the limits of my understanding, but when the client communicates with the server, traffic is also generated on another (seemingly random) port - port 0 -which is assigned by the OS.
When I implement the server solution (by extending RMISocketFactory) above to use port 1098 for other communication, this seems to work OK, but when I tie down the sockets in java.policy on both machines to 1098 & 1099, the client still reports an Access Denied exception on an arbitrary high numbered port (e.g. 32277) when I try to run it.
How can I tie the client down to use a single additional port as I have done for the server, as we can only open specific ports on the firewall. I suspect it's centred around implementing RMIClientSocketFactory but am unsure as how to proceed.
Any ideas would be much appreciated.
Greg.
communicates with the secure site using JSSE & XML-RPC) is on a secure machine in a hosting centre. There is a firewall between the client and server and this is what is causing the problem. These machines are all running Solaris.
I've read and almost understood the article by Tim Goffings ...
but still have a few problems. Basically, the RMI server listens on port 1099 so I've enabled this in java.policy. This is where I'm at the limits of my understanding, but when the client communicates with the server, traffic is also generated on another (seemingly random) port - port 0 -which is assigned by the OS.
When I implement the server solution (by extending RMISocketFactory) above to use port 1098 for other communication, this seems to work OK, but when I tie down the sockets in java.policy on both machines to 1098 & 1099, the client still reports an Access Denied exception on an arbitrary high numbered port (e.g. 32277) when I try to run it.
How can I tie the client down to use a single additional port as I have done for the server, as we can only open specific ports on the firewall. I suspect it's centred around implementing RMIClientSocketFactory but am unsure as how to proceed.
Any ideas would be much appreciated.
Greg.