MIMIC WEBUI Guide

  1. Preface

    The MIMIC WEBUI is an optional browser-based web interface to control MIMIC Simulator. It is an alternative to the MIMICview desktop-based graphical user interface (GUI), or the multitude of scripting interfaces in different programming languages.

    WEBUI: Main canvas

    The WEBUI server is installed by the MIMIC administrator as an optional Update Wizard package, and needs to run either on the same system as the MIMICD simulator daemon, or a system that can connect to it. See Installation section below.

    Once you have installed it, users can consult it's user guide on how to use it to control MIMIC.

  2. Table of Contents

  3. Requirements

    Linux or Windows 64-bit Java
    Java 8, 9, Java 11 SE

  4. Installation

    Install the WEBUI packages in Update Wizard.

    Once the WEBUI packages have been installed on your MIMIC system, you need to run the WEBUI server. You can run it on the same system as MIMICD, but if you want more CPU power to be available to both, you should run it on a different system.

    Since WEBUI is implemented as a MIMIC client serving the web-based user interface, if run on a different system, then all the same rules apply as all other MIMIC clients, as detailed in this FAQ entry. In particular, you want the MIMIC install area and private area(s) accessible at the same absolute paths on both MIMIC and WEBUI system, eg. via NFS and/or symbolic links.

  5. WEBUI Server

    The webui.sh shell script (and WEBUI.BAT on Windows) is a convenience front-end script to invoke the Java-based WEBUI server. It is designed to run in 2 modes:

    • Local mode - in this mode the WEBUI server provides access to a single instance of MIMIC to local users.

    • Lab mode - in this mode, the WEBUI server provides lab access to one or more instances of MIMIC to remote users, possibly over the Internet.

    It takes these command line options:

    • -mh <address> | --mimichost <address> for MIMIC host address

    • -mp <port #> | --mimicport <port #> for MIMIC management port (default 9797)

    • -a <agent-range> | --agents <agent-range> for range of agents (default all agents)

    • -sh <address> | --servicehost <address> for client facing web service (default 0.0.0.0)

    • -sp <port #> | --serviceport <port #> for client facing web service (default 8080)

    • -sd <path> | --shared_dir <path> for mimic shared directory path

    • -td <path> | --temp_dir <path> for mimic temporary directory path

      Temporary files (output from scripts, etc) will be placed in the specified path. If this is not specified, then temporary files will be placed in the folder specified by the MIMIC_TMPDIR environment variable, and if this is not specified, then in /tmp.

      Files will accumulate, and the system administrative scripts, eg. via crontab should periodically remove old files.

    • -es | --enablesecured to enable HTTP secured server

    • -kf <filepath> | --keyfile <filepath> relative path of the keystore file (in PKCS12 format)

      To create the PKCS12 keyfile:

      cd /tmp
      openssl genrsa -out key.pem 2048
      
      openssl req -new -sha256 -key key.pem -out csr.csr
      
      openssl req -x509 -sha256 -days 365 -key key.pem -in csr.csr -out certificate.pem
      

      and type the password in the Password prompt, then convert to PKCS12 format:

      openssl pkcs12 -export -out mimicwebui.p12 -inkey key.pem -in certificate.pem
      
      chmod 755 mimicwebui.p12
      

      Then copy the keyfile to a subfolder in the MIMIC install area:

      mkdir /usr/local/mimic/java/webui/ssl
      
      cp /tmp/mimicwebui.p12 /usr/local/mimic/java/webui/ssl
      

      then the -kf argument would be ssl/mimicwebui.p12.

    • -pw <password> | --password <password> password for the keystore file

    • -ssh <address> | --securedservicehost <address> for client facing web service (default 0.0.0.0)

    • -ssp <port #> | --securedserviceport <port #> for client facing web service (default 8443)

      Note : Both HTTP and HTTPS can coexist in single server instance using different port numbers

      Lab Mode

    • -cs | --cloudserver to run in cloud based lab server mode

      Admin web service is available only in cloud based lab server mode.

    • -ah <address> | --adminhost <address> for admin web service (default 0.0.0.0)

    • -ap <port #> | --adminport <port #> for admin web service (default 8080) to run as Browser based UI server for specified MIMIC Host

    • -sah <address> | --securedadminhost <address> for admin web service (default 0.0.0.0)

    • -sap <port #> | --securedadminport <port #> for admin web service (default 8443)

      Saved runtime configuration

    • -ic | --ignoreconfig to ignore previously saved configuration, and will not saved configuration with new value

    • -rc | --resetconfig use with -ic to overwrite save config with new values

    Authentication

    The WEBUI server is not intended to be a public-facing server, instead running on a protected intranet just like the MIMIC daemon. The current modes of protection are

    1. firewall, to enable access only to the desired client IP addresses

    2. in lab mode, specify a key to access a particular lab. Different keys can have access to different subsets of the agents.

    Once the server is running, you can restrict it's CPU usage by setting it's CPU affinity on Linux, eg. like this

    [root@fc28 ~]# ps ax | grep java
     1304 pts/0    Sl     0:11 java -cp .:..:../akka/*:../Apache-Oro/*:webui.jar WebUI.WebUIServer
    -sd ../../ -mh 192.9.192.210 -mp 9797
    
    [root@fc28 ~]# taskset -c -p 0 1304
    pid 1304's current affinity list: 0,1
    pid 1304's new affinity list: 0
    

  6. User Guide

    The WEBUI server contains the usual Help buttons and menus. For more details see its user guide .