Alternate Nodelock Hostids

The Alternate Nodelock Hostid capability works in conjunction with RLM Activation Pro, and is not supported when used without ActPro.


Overview

An Alternate Nodelock Hostid is very similar to an Alternate Server Hostid, except that it is used to lock a group of licenses to a particular node, and there is no automatic checking of the Alternate Nodelock Hostid. With that in mind, the remainder of this chapter is a simplified version of the Alternate Server Hostid chapter.

An Alternate Nodelock Hostid is a method to lock one or more individual licenses to a nodelocked, uncounted license, rather than directly to a hostid. The main uses for this are to lock the licenses to a rehostable hostid (so your customer can revoke and re-authorized all licenses with a single revoke/re-authorization request pair), or so that you can disable the licenses that are in the field. Also, this allows you to lock multiple independent versions of a particular license to a rehostable hostid, which isn’t possible using a rehostable hostid directly.

The Alternate Nodelock Hostid hostid type, which has the same syntax as the alternate server hostid type (license=serial#) is supported by RLM only as a nodelock hostid on a LICENSE line. A single computer can only use a single Alternate Nodelock Hostid locked to a rehostable hostid, i.e., there cannot be two different “license=xyz” hostids in license files if the two Alternate Nodelock Hostids both use rehostable hostids.

Note

Unlike an Alternate Server Hostid, there is no runtime checking to verify that the activation key used to generate the Alternate Nodelock Hostid is still valid. If you want this checking, you will need to call rlm_act_keyvalid() at the appropriate time(s).

The license for the Alternate Nodelock Hostid must have the following characteristics. (This is for the Alternate Nodelock Hostid license only, these restrictions do not apply to the licenses which are locked to the Alternate Nodelock Hostid.) Also note that the options string is generated correctly by Activation Pro when you select the “Alternate Nodelock Hostid” license type, so you don’t have to worry about that part of the license:

  • It must be a nodelocked, uncounted license (ActPro does this automatically when you select the “Alternate Nodelock Hostid” license type).

  • Product name: rlm_nodelock (you must set the product name correctly in ActPro)

  • Options string, as defined below (set automatically by activation pro)

  • Serial# must be a decimal number of <= 15 digits (activation pro generates this automatically every time it creates an activation key)

  • hostid: required

  • akey= recommended if you want to call rlm_act_keyvalid()

  • Set issuer to the URL of the activation server (recommended if you want to call rlm_act_keyvalid()

The options string has the following format:

options=serial#

Where:

serial# - is the serial number from the license=serial# specification on the product’s LICENSE line

Note

The serial number is the part of the hostid that makes the nodelocked licenses in the license file unique. Activation Pro will give each of your customers a different serial number automatically (actually, it gives each activation key a unique serial number, so you should only generate a single Alternate Nodelock Hostid from one activation key).

When creating the product definition for an Alternate Nodelock Hostid license, use ActPro’s “Alternate Nodelock Hostid” License type in the product definition for this – this product definition will generate the LICENSE line required. The serial number is generated automatically when an activation key is created and cannot be changed. You MUST, however, set the product name to “rlm_nodelock”.

When creating your product definition, be sure to select “Yes” in the “Include Activation Key in License” parameter if you are going to call rlm_act_keyvalid() later, and if you are using this capability to provide rehostable licenses, select only “rehostable” in the “Allowed Hostid Types” selection of either the product definition or activation key.

The following code sample will create the alternate nodelock hostid, assuming the activation key “anh-key” is an activation key with the properties above:

RLM_ACT_HANDLE act_handle;

        act_handle = rlm_act_new_handle(rh);
        rlm_act_set_handle(act_handle, RLM_ACT_HANDLE_REHOST, (void *) 1);
        i = rlm_activate(rh, althost1, "anh-key", 1, license, act_handle);
        rlm_act_destroy_handle(act_handle);

Once you have activated the ANH license and written “license” to a local license file, you can get the hostid to use in the other licenses with code like the following:

RLM_HANDLE rh;
RLM_LICENSE lic;
char *options;
char *hostid[RLM_MAX_HOSTID_STRING];

        strcpy(hostid, “invalid”);

        rh = rlm_init(...);
        lic = rlm_checkout(rh, “rlm_nodelock”, “1.0”, 1);
        if (!rlm_license_stat(lic))
        {
                options = rlm_license_options(lic);
        }
        if (options) sprintf(hostid, “license=%s”, options);

Warning

If you use alternate nodelock hostids, you MUST set the URL in the ActPro database in the admin->database tab.


Alternate Nodelock Hostid Example

Example: Four product licenses locked to an Alternate Nodelock Hostid.

For this example, we show the Alternate Nodelock Hostid license and the four product licenses in separate boxes. In practice, you should put the Alternate Nodelock Hostid license in a separate license file so that you can easily copy the product licenses to a 2nd machine and abandon the old Alternate Nodelock Hostid license when you revoke and re-authorize it with a new one.

LICENSE isvname rlm_nodelock 1.0 1-jan-2025 uncounted
hostid=rehost=cc5a340f:84ca2561da285b7cbac719a916b016dcffde6434
options=1234 akey=1234-5678-abce-efgh
issuer=http://hostedactivation.com signature
LICENSE isvname product1 1.0 1-jan-2025 uncounted
hostid=license=1234 signature
LICENSE isvname product2 1.0 1-jan-2025 uncounted
hostid=license=1234 signature
LICENSE isvname product3 1.0 1-jan-2025 uncounted
hostid=license=1234 signature
LICENSE isvname product4 1.0 1-jan-2025 uncounted
hostid=license=1234 signature

Use Case #1: Using Alternate Nodelock Hostids to support rehosting of a group of product Licenses

In order to allow your customer to rehost a group of nodelocked licenses, use the following procedure:

  1. In rlm_isv_config.c, be sure to include RLM_ACTPRO_ALLOW_ASH in the “allowed_types” variable in the call to rlm_isv_cfg_actpro_allowed_hostids().

  2. Set the URL in Activation Pro, in the “Admin”/”Database”/“Activation Server URL” section. This causes the correct URL to be placed into the license. While this step is optional, the generation of the Alternate Nodelock Hostid will have the issuer=URL keyword in the license, which you can use if you want to call rlm_act_keyvalid().

  3. Set up a product in activation pro with product name “rlm_nodelock”, license type “Alternate Nodelock Hostid”. Check only “rehostable” under “Allowed Hostid Types”. Check “Yes” under “Include Activation Key in License”. Leave the “Other RLM keyword=value pairs” field blank – the Activation pro license generator will fill this in.

  4. Create an activation key for this product. Saving the activation key will cause ActPro to generate a unique serial number in the “ash_sn” column of the “keyd” table. Note that you should issue a single activation key for a single Alternate Nodelock Hostid, and you should not delete this key if you ever want to get that serial number back again. Leave the “Other RLM keyword=value pairs” field blank.

  5. Give the activation key to your customer.

  6. Your customer then activates this license using your activation utility. Store this license in license file #1.

  7. Your customer can then activate any nodelocked product licenses using the hostid “license=xyz”, where xyz is the serial number of the license generated in step 6. It is best practice to keep these licenses in a different license file from the one created in step 6, since the Alternate Nodelock Hostid license file will be replaced on a re-activation.

  8. At this point your customer can deactivate the Alternate Nodelock Hostid license, move the license file and software to another machine, and re-activate it there. The individual product licenses do not need to be re-activated.


Use Case #2: Remotely Disabling Nodelocked Licenses

In order to be able to disable your customer’s nodelocked licenses, use the same procedure as Use Case #1, with the following exceptions:

  • Your code would call rlm_act_keyvalid() to verify that the activation key was not disabled. When you want to disable the licenses, disable the activation key in ActPro.

  • For this case, you can use a rehostable hostid as in Use Case #1, or you can leave the “Allowed hostid types” blank in order to use a standard hostid for the Alternate Nodelock Hostid.