Advanced Usage

The RexecJ server can be extended through the use of filters, which are a means by which parts of RexecJ messages can be altered so as to add additional information or encryption. Before proceeding, read the RexecJ server and RexecJ messages sections for more information on configuring an RexecJ server and a description of the RexecJ message format.

Briefly, an RexecJ message is the unit of information transmitted between RexecJ servers and clients. These messages are further subdivided into parts, which each contain a value. It is this value that is the most sensitive part of an RexecJ message. Therefore, it would be helpful to be able to encrypt (or, more generally, filter) these values to ensure security as RexecJ messages are passed over the network. Therefore, the RexecJ protocol allows for implementations to create their own method of passing part values through a filtering method in order to better secure sensitive information. In order to add filtering to RexecJ messages, the RexecJ server must be properly configured. Below is an excerpt from the sample RexecJ server configuration file example-config.rjc, located in the config subdirectory of the RexecJ installation:

  <rjc:message name="rexecj.message.types.LoginMessage">
    <rjc:part name="password">
        <rjc:filter type="rexecj.message.filter.ROT13Filter" />
        <rjc:item name="test" value="test_value" />

The rjc:advanced element is a section of the RexecJ server configuration file that contains information about which message/part combinations should be filtered. In the above example, whenever an RexecJ client sends login information, the password will be encrypted with ROT13 (simple encryption which either shifts characters up or down by thirteen). This is not robust encryption, but merely an example.

The rjc:advanced element contains zero or more rjc:message elements, whose name attribute specifies the name of the RexecJ messages to apply filtering to. Each rjc:message element contains zero or more rjc:part elements, whose name attribute specifies the part name of the message to filter.

Each rjc:part element contains an rjc:metadata element, which contains specific information related to filtering. Specifically, the rjc:filter element, of which there can be zero or more, contains as the value of its type attribute the name of a filter to apply to this message/part combination. Additionally, there can be zero or more rjc:item elements, which are used to supply additional information to an RexecJ filter. These metadata information items are key/value pairs, where the key is specified by the name attribute and the value is specified by the value attribute.

Finally, note that some filters will create a directory under the config subdirectory of the RexecJ installation named filterName, where filterName is the name of the filter. This directory is used to store persistent configuration data for the filter.

Valid XHTML 1.0! Valid CSS!