9.1. Scripted license management

Using REST API calls there is an option for scripted activation and deactivation for Metadefender Core servers with no Internet connection or if your infrastructure is using automation to create/destroy Metadefender Core instances. In this chapter the steps of these two scenarios are described.

Requirements

  • an installed Metadefender Core instance without Internet connection

  • another computer that has Internet connection and can run your activation scripts

  • a manual or automated way to transfer data between the two computers

Activation steps

  1. For activating Metadefender Core v4, deployment ID and activation key are needed to generate the license file.

    1. Activation key should be purchased from OPSWAT.

    2. Metadefender Core v4 deployment ID can be queried by using REST API (for details see Get Current License Information page)

      Save this deployment ID in your system, you might need this ID when the instance is unavailable at the time of deactivation.

  2. Activate license and get the license file using the following URL:
    https://activation.dl.opswat.com/activation?key=<activation key>&deployment=<deployment unique ID>&quantity=<quantity>
    Where <quantity> is the number of scan nodes to be connected to this Core instance (most cases it's 1, please refer 9.2. Multi-node deployment for multi-node deployment scenarios)

    If the activation is successfully, a license file is downloaded. Save this file.

    HTTP status codes can be:

    HTTP Response

    Body

    Comment

    200 Ok

    license file

    Activation was successfully.

    200 Activation failed

    error: '<user conform error message>'

    Failed activation

    200 Invalid parameter

    error: 'Could not activate your product because the Activation Key you provided is invalid. Check if you typed it correctly or open a support ticket if problem persist.'

    Invalid key format

    200 Invalid parameter

    error: 'Could not activate your product because the Deployment ID you provided is invalid. Check if you typed it correctly or open a support ticket if problem persist.'

    Invalid deployment format

    200 Invalid parameter

    error: 'Could not activate your product because the quantity you provided is invalid. Check if you typed it correctly or open a support ticket if problem persist.'

    Invalid deployment format

    400 Bad request

     

    Missing key, quantity or deployment

    500 Internal server error

    error: 'Internal server error (<error ID>). Please contact support'

     

    In case of any activation issue, contact OPSWAT support for help

  3. Upload license file to Metadefender Core v4:
    The license file should be uploaded to the Metadefender Core v4 to activate the product.
    For details see page: Uploading License Key File

Deactivation steps

  1. For deactivation of a deployment ID an activation key is necessary:

    1. Activation key should be purchased from OPSWAT.

    2. Metadefender Core v4 deployment ID can be queried by using REST API (for details see Get Current License Information page)

  2. Deactivate license using the following URL:
    https://activation.dl.opswat.com/deactivation?key=<activation key>&deployment=<deployment unique ID>

    HTTP status codes can be:

    HTTP Response

    Body

    Comment

    200 Ok

    result: ok

    Successful deactivation

    200 No active license found

    error: 'Could not found any active license with the given parameters'

    The license has not been activated yet or it has been deactivated already.

    200 Invalid parameter

    error: 'Could not deactivate your product because the Activation Key you provided is invalid. Check if you typed it correctly or open a support ticket if problem persist.'

    Invalid key format

    200 Invalid parameter

    error: 'Could not deactivate your product because the Deployment ID you provided is invalid. Check if you typed it correctly or open a support ticket if problem persist.'

    Invalid deployment format

    400 Bad request

     

    Missing key or deployment

    500 Internal server error

    error: 'Internal server error (<error ID>). Please contact support'

     

Important notes

Product activation is tight to several hardware, operating system and software parameters. In case of one or more major hardware or software parameter change the product might turn into deactivated status. Operating system updates, other software updates should not affecting the activation status.

If the product is online activated and has live Internet connection then in case of deployment ID change the product reactivates itself. If the product doesn't have Internet connection then the administrator is responsible to reactivate the product.

Because of the above administrator should consider licensing restrictions of the offline deployments if using any virtualization and/or containerization technologies.