Configure virus scanning before package upload - Intergraph Smart Engineering Manager - 4.0 - Installation & Upgrade - Hexagon

Intergraph Smart Engineering Manager Web API Installation and Configuration

Language
English
Product
Intergraph Smart Engineering Manager
Subproduct
Web API
Search by Category
Installation & Upgrade
Smart Engineering Manager Web Version
4.0

This procedure shows how to configure the settings for MetaDefender or any custom virus scanner to implement virus scanning of packages before uploading them to a file server. Scanning is performed asynchronously but waits until the response from the scanner is received before starting to upload the package.

If the scan fails, the package is not uploaded and the user will receive a notification about any virus that is detected.

  • If no MetaDefender URI is specified, or a specified MetaDefender endpoint does not exist, or MetaDefender throws an exception, the software will use a customer-implemented scanner.

  • The IVirusScanner interface is provided for you to implement a custom scanner:

    IVirusScanner interface

  • If no custom scanning is configured, the package will be uploaded without performing a virus scan.

Configure MetaDefender virus scanner

Metadefender Virus Scanner

Locate the folder where SEM Web API is installed, for example: "C:\Program Files (x86)\Smart\Engineering Manager\4.0".

  1. Under the installation root path, navigate to "..\Smart\Engineering Manager\4.0\Server".

  2. From the Server folder, open the web.config file using a text editor.

  3. Go to the <appSettings> section and locate the following row:

    <!--Settings for Metadefender VirusScan-->

  4. Enter values for the following parameters, for example:

    <add key="MetaDefender_URI" value="http://semappmetdef01.mycloud.net:8008" />

    <add key="MetaDefender_ApiKey" value="" />

    <add key="MetaDefender_PollingInterval" value="200" />

    <add key="MetaDefender_Timeout" value="1000000" />

    • The MetaDefender_ApiKey value is relevant where the MetaDefender URI is secured. For details of how to generate a key, see https://onlinehelp.opswat.com/vault/Generate_an_API_key_from_Metadefender_Core.html. If the MetaDefender URI is not secured, the MetaDefender_ApiKey parameter value should be left blank.

    • The MetaDefender_PollingInterval parameter determines the sleep time between polling scan results.

    • Values of the MetaDefender_PollingInterval and MetaDefender_Timeout parameters are in milliseconds.

  5. Save and close the web.config file.

Use custom virus scanner to perform scanning

The custom scanner example shown here makes use of the Clam AV virus scanner.

ClamAvScanner

  1. Implement the IVirusScanner interface and create an assembly out of it.

  2. Place the assembly in the ~\VirusScanner folder, for example: C:\Program Files (x86)\Smart\Engineering Manager\4.0\Server\VirusScanner, along with any other dependent files.

  3. Locate the folder where SEM Web API is installed, for example: "C:\Program Files (x86)\Smart\Engineering Manager\4.0".

  4. Under the installation root path, navigate to "..\Smart\Engineering Manager\4.0\Server".

  5. From the Server folder, open the web.config file using a text editor.

  6. Go to the <appSettings> section and add the following rows:

    <!-- Scan using customer implemented virus scanner dll(s) -->

    <add key="CustomerVirusScanner_FullClassName" value="" />

  7. Enter a value for the CustomerVirusScanner_FullClassName parameter based on the format Namespace.Classname, for example: CustomScanner_Example.ClamAvScanner:

    Custom Scanner Classname

  8. Save and close the web.config file.