Configuring a static custom web portal

You can integrate the on-demand target function into your own website by configuring a static web portal. This type of integration requires you to copy a set of resources from the default portal on the remote control server to your external website. The website is used as a static portal on which to run on-demand sessions.

About this task

The term static refers to the content provided by the web server that does not change unless the files themselves are edited in the web server system.

The set of resources that are required to be copied to your website, are the files for the plug-ins and the on-demand target application. These files are copied to your website to allow all the files that are required to start an on-demand session to be downloaded from there.

The drawback of this approach is that there is no communication between the static portal and the internal remote control server. Therefore, it does not allow for providing custom data, or to verify the connection code before the remote control session starts. Because the configuration is also static, the connection code must be provided after the on-demand target is started.

The prerequisite for configuring a static portal is to have a web server that provides content through the internet. You must have permissions on the web server to be able to add and edit content, and knowledge of web technologies.

To configure a static portal, complete the following steps:

Procedure

  1. Go to the following directory on the remote control server:
    RC_SERVER_INSTALL_DIR\wlp\usr\servers\trcserver\apps\TRCAPP.ear\trc.war\ondemand

    Where: RCSERVER_INSTALL_DIR is the IBM® BigFix® Remote Control server installation directory.

  2. Copy the 9.x.x.<version> directories to an \ondemand directory on your own website. The directories contain the ODTJPlugin.jar, ODTIEPlugin.cab, odtffplugin.xpi, and TRCPlayer.jar files. One of the directories contains a lnx32, and win32 directory. The contents of the directories must also be copied.
  3. Create a configuration file.
    The configuration file must contain the details of the available brokers. Specify the broker host names and ports in a semicolon separated list. It also contains a list of certificates that can be used to verify that the certificate that is presented by the broker can be trusted. Save the file with extension .properties.
    For example, config.properties, which contains the following entries.
    BrokerList=rcbroker.example.org:8881
    -----BEGIN CERTIFICATE-----
    Base64 encoded certificate data
    -----END CERTIFICATE-----
    where: Base64 encoded certificate data is the certificate data for the specific certificate. You can copy the certificate data from the IBM BigFix Remote Control server. You must have a BEGIN CERTIFICATE and END CERTIFICATE section for each certificate that you add.
    1. Select Admin > All trusted certificates
    2. Select the certificate.
    3. Select Edit certificate.
    4. Copy the certificate text to the configuration file.
  4. Create HTML pages for each installation method that can be used to start the on-demand target.
    ActiveX control
    The HTML page that is used to provide the ActiveX control installation mechanism must contain a short segment of JavaScript™ code for starting the applet. It also contains an <object> tag to import the ActiveX control. The following example uses a configuration file that is named config.properties and web server rcweb.example.org. You must change the paths and file names to match your environment. In the <head> tag, you must add the following elements to include necessary JavaScript code.
    <script  type="text/javascript">
     function autoLaunch() {
    var ctl = document.getElementById('OnDemandCtl');
     ctl.LaunchOnDemand("", 
     "http://rcweb.example.org/ondemand/config.properties");
     }</script>

    The <body> element of the page must contain the following elements.
    <div style="height:200px">
    <object id="OnDemandCtl"
    classid="CLSID:E8A8645D-629A-4E27-B66C-67AE140C76A4"
    codebase="ondemand/VERSION_NUMBER_1/ODTIEPlugin.cab#VERSION_NUMBER_1" >
    </object>
    </div> 

    You must replace VERSION_NUMBER_1 with the version number of the folder that you copied the ODTIEPlugin.cab file to in step 2. For example, codebase="9.1.0.0020/ODTIEPlugin.cab#9.1.0.0020".

    If the target user is using Internet Explorer and ActiveX is supported and enabled, the on-demand target application is automatically downloaded and started when the HTML page is accessed.
    Firefox plug-in
    The HTML page that is used to provide the Firefox plug-in installation mechanism must contain the following content. The server must be configured to associate .xpi files with the Mime Type: "application/x-xpinstall". The method for configuring the Mime Type varies depending on the web server that you are using. The following examples use a configuration file that is named config.properties and web server rcweb.example.org. You must change the paths and file names to match your environment. Copy the ondemand.js and ondemandff.js files from the ondemand directory in the IBM BigFix Remote Control server to the ondemand directory on your own website. In the <head> tag, you must add the following elements to include necessary JavaScript code.
    <script  type="text/javascript" src="ondemand/ondemandff.js"></script>
    <script type="text/javascript">
      function checkForPlugin() {
     ondemandFFPlugin.checkPlugin();
    }
    </script>
    
    The <body> tag of the page must contain the onload attribute with the following content "setTimeout(checkForPlugin, 2000);".

    For example,

    <body onload="setTimeout(checkForPlugin, 2000);">
    The <body> tag must also contain the following elements.
    <form name="downloadPluginWin32" id="downloadPluginWin32"
    action="ondemand/VERSION_NUMBER_1/win32/odtffplugin.xpi" method="get"
    onSubmit="return true;"></form>
    <form  name="downloadPluginLnx32" id="downloadPluginLnx32" 
    action="ondemand/VERSION_NUMBER_1/lnx32/odtffplugin.xpi"
     method="get"  onSubmit="return true;"></form>
    
    <object id="odl-params"> 
       <param name="config_url" 
    value="http://rcweb.example.org/ondemand/config.properties"/>
    </object>
    
    <object id="odl-plugin-handle">
    <param name="odt-plugin-version" value="VERSION_NUMBER_1">
    </object>
    
    

    Replace VERSION_NUMBER_1 with the version number of the folder that you copied the odtffplugin.xpi file to in step 2. For example, action="9.1.0.0020/odtffplugin.xpi.

    If the Firefox plug-in and JavaScript are enabled when the target user is using a Firefox browser, the on-demand target application is automatically downloaded and started when the HTML page is accessed.
    Java™ Applet
    The HTML page that is used to provide the Applet installation mechanism must contain the following content in the <body> element of the page. The following example uses a configuration file that is named config.properties and web server rcweb.example.org. You must change the paths and file names to match your environment.
    <applet archive="VERSION_NUMBER_1/ODTJPlugin.jar" 
    code="com.ibm.uk.greenock.odt.plugin.app.ODTJPluginApplet">
      <param name="codebase_lookup" value="false" />
      <param name="config_url" 
    value="http://rcweb.example.org/ondemand/config.properties"/>
    </applet>
    
    You must replace VERSION_NUMBER_1 with the version number of the folder that you copied the ODTJPlugin.jar file to in step 2. If Java is enabled in the target user's computer, the on-demand target application is automatically downloaded and started when the HTML page is accessed.
    Java Web Start
    The Java Web Start installation mechanism does not require an HTML page. It requires that a JNLP file is created. The JNLP file can be linked directly from another HTML page. When the page is accessed, it activates the Java Web Start delivery plug-in for the on-demand target application, which is downloaded and started automatically.

    Use the following sample content to create the JNLP file. The example uses a configuration file that is named config.properties and web server rcweb.example.org. You must change the paths and file names to match your environment. Change 9.x.x in the title to the relevant target version.

    <?xml version="1.0" encoding="utf-8"?>
    <jnlp spec="1.0+"
     codebase="http://rcweb.example.org/ondemand/VERSION_NUMBER_1/">
    <information>
     <title>IBM BigFix Remote Control Launcher for
     On Demand target 9.x.x</title>
     <vendor>IBM</vendor>
    </information>
    <security><all-permissions/></security>
    <resources>
     <j2se version="1.4+"/>
     <jar href="ODTJPlugin.jar"/>
    </resources>
    <application-desc>
    <argument>--config_url</argument>
    <argument>http://rcweb.example.org/ondemand/config.properties</argument>
    </application-desc>
    </jnlp>
    Replace VERSION_NUMBER_1 with the version number of the folder that you copied the ODTJPlugin.jar file to in step 2.
    Note: You can add the URL to the JNLP file to the custom HTML pages as a fallback URL. If the on-demand target fails to start when the target user chooses another installation method, they can click the link. The target is downloaded and started by using the Java Web Start installation method.
  5. Optional: Create an HTML page that the target user can access to start the IBM BigFix Remote Control player.
    The player can be used to play back a saved recording of an on-demand session. The page must contain the following element to start the player. The following example uses a web server rcweb.example.org. You must change the paths to match your environment.
    <applet id="player" width="100" height="100" align="middle"
    archive="VERSION_NUMBER_1/TRCPlayer.jar"
    code="com.ibm.uk.greenock.ayudame.playerui.RecorderApplet">
    <param name="codebase_lookup" value="false">
    </applet>
    You must replace VERSION_NUMBER_1 with the version number of the folder that you copied the TRCPlayer.jar file to in step 2.
    For example, http://rcweb.example.org/ondemand/9.1.0.0020/TRCPlayer.jar.