Remote Method Invocation (RMI) is used in JReport Server for distributed functionality, such as for clustering, event system, Remote API, and monitoring system. To avoid security risks and the mess of using the RMI registry (all the remote objects bound with the RMI registry directly can cause the remote objects to be unmanageable), universal remote object management has been introduced into JReport Server.
In the universal remote object management system, when getting a remote object to perform certain operations, either on a server (local or remote) or in a 3rd-party application (via Remote API), a request must be sent to the remote object management to get that special remote object. Also, authentication is required before any request for a remote object can be processed.
The authentication process requires a remote authentication file that contains the authentication information to accomplish the security check. The remote authentication file (<install_root>\bin\rmi.auth
) is generated by JReport Server automatically during the server installation process. You can protect your authentication file by moving it to a safe place after installation.
The authentication file is commonly used in the following circumstances:
<server_install_root>\bin
directory. <monitor_install_root>\bin
. JReport Server Monitor will then fetch it from <monitor_install_root>\bin
and build an authInfo object.java -cp ... -Djrs.rmi.auth_file=%authFileName% mainClass
. Also, you can specify a string by specifying the content of the authentication file. For example, java -cp ... -Djrs.rmi.auth_string=my_auth_info mainClass
. Alternatively, you can specify the authentication string yourself arbitrarily. As long as the authentication strings that the local and remote server both hold are the same, you can pass the authentication check: java -cp ... -Djrs.rmi.auth_string=my_auth_info mainClass
.
Note: In JReport Server and JReport Server Monitor, you can also use -Djrs.rmi.auth_file or -Djrs.rmi.auth_string in the startup file. JReport Server/JReport Server Monitor looks up these three locations in turn (-Djrs.rmi.auth_string => -Djrs.rmi.auth_file => <monitor_install_root>\bin) when checking authentication information. The information first found will be used for the authentication check in the remote object management system.
The authentication information can be of any bytes, as long as the authInfo objects match between the local and the remote server. The following are the methods for specifying authentication information:
<server_install_root>\bin
to generate the authentication file.