# Air Gapped License Policy

Air-gapped licenses allow ISVs to node-lock licenses on computers in air-gapped environments, where files are not allowed to leave the network once the software application has been deployed.

Instead, the software is deployed alongside license policy files, which can then be selected, and node-locked through a series of code exchanges (instead of http requests or file exchanges).

### Creating Air-Gap License Policies

On the product page ( saas.licensespring.com/{companyID}/products/{productID} ) go to `license policies` tab and click on a `add license policy` button.

To mark policy as air-gapped switch the `set as air-gapped` switcher under the title to true.

![Setting Policy as Air-Gapped](https://content.gitbook.com/content/gLzurdfXUuKr9IziZWLz/blobs/43COBwqtSEXRKcmmu407/eMR0wc%20zOCOgc_YB6bWzr_image.png)

{% hint style="info" %}
&#x20;Air-gap license policies cannot be edited after creation. Additionally, standard license policies cannot be converted to air-gap policies. If you require an air-gap policy, a new one must be created from the outset.
{% endhint %}

### Creating Air-Gapped License Files

You can either download the license file from the product license policy, or, if a license was set as "air-gapped", you can download the license policy file from the license detail page.

![Locating Air-Gap License Policy](https://content.gitbook.com/content/gLzurdfXUuKr9IziZWLz/blobs/5mLBdmj4Wp2n6EqeQPf6/6XY8KGGhpL7Y5ObNq8fPv_image.png)

![](https://content.gitbook.com/content/gLzurdfXUuKr9IziZWLz/blobs/tXmh9rsxPKdLBFn4e359/gzy8xQpJPRKCx9G3AGyI4_image.png)

### Activating an Air-Gapped License

The air-gap portal for license activation is available on this public URL: [**airgap.licensespring.com**](https://airgap.licensespring.com/)

Process of activation is done in 4 steps including actions on server (portal) and SDK:

{% stepper %}
{% step %}

### Generate an Initialization Code

To start the license activation process, the user needs to enter the license key on the portal to initialize the air-gap license activation. This will create a one-time `initialization code`.

![Initialize Air-Gap Activation](https://content.gitbook.com/content/gLzurdfXUuKr9IziZWLz/blobs/RWavrpwfq9woHeC09HhU/Xu1wViLbHxDn8NEH9L6aZ_image.png)

![Initialization Code](https://content.gitbook.com/content/gLzurdfXUuKr9IziZWLz/blobs/qsEihYVPOOeJX89bzm0l/wE6hXZCAOa%20LtMUQzydjM_image.png)

The `initialization code` needs to be imported to the SDK alongside with the license key. The SDK will verify the initialization code and return the `activation code` and `hardware_id`.

{% hint style="info" %}
The initialization will generate a QR code containing the JSON with a `license_key` and an `initialization_code` included. This can help and remove the need for copy pasting or manually entering the codes.
{% endhint %}
{% endstep %}

{% step %}

### Generate Confirmation Code

When attempting to activate an air-gapped license, the SDK should be configured to activate an Air-gapped license. It will accept the `license_key` as well as the `initialization_code` and return the `hardware_id` as well as an `activation code` along with the license key. Go back to the air-gapped portal and click on "Enter air-gap activation code" and enter them in order to receive a confirmation code.

![Entering Air-Gap Activation Code](https://content.gitbook.com/content/gLzurdfXUuKr9IziZWLz/blobs/ZbAvIGsUmXD4itCDMMu1/NulxpSsEXW7sosqurNgpq_image.png)

![Entering Air-Gap Activation Code Pop-up](https://content.gitbook.com/content/gLzurdfXUuKr9IziZWLz/blobs/i6p12dNXoWYkb1ifsrx2/3urpjyiwDidqp1jJKrTh5_image.png)

![License Has Been Activated Pop-up](https://content.gitbook.com/content/gLzurdfXUuKr9IziZWLz/blobs/egvdvCdnabGYqa8hL3GE/y8RuJVgUTItw5tuN190rh_image.png)

The license key, hardware ID, policy ID and this new signature `confirmation code` need to be input into the SDK. The SDK validates the code using company account public air-gap key which is also previously embedded in to the SDK. If successful, the SDK will use the policy ID to retrieve the license entitlements and use this as a local license file.

Generated QR code contains the JSON with `license_key`, `hardware_id`, `policy_id` and `confirmation_code` included which you can scan and then send or save. This can help and remove the need for manually copy pasting the codes.
{% endstep %}
{% endstepper %}
