Air Gap License

In highly secure environments where systems are completely disconnected from the internet (air-gapped), standard online or offline activation methods involving file exchange may not be suitable. To address this, the LicenseSpring SDK offers an Air-Gap Activation mechanism using code-based exchange.

This guide explains how to use the air-gap flow to activate licenses without transferring files.

Overview of the Air-Gap Flow

1

Retrieve an Initialization Code

Obtain an initialization code from the LicenseSpring Air-Gap Portal.

2

Generate an Activation Code

Use the SDK and the initialization code to generate an activation code.

3

Submit the Activation Code

Submit the activation code to the Air-Gap Portal to receive a confirmation code.

4

Activate the License

Use the confirmation code and the policy data on the air-gapped machine to activate the license.

Each step is handled by SDK functions that require certain inputs provided via the portal or platform settings.

Step 1: Generate Activation Code

Use the initialization code retrieved from the air-gap portal to generate an activation code:

generate_activation.go
// Generate an activation code using the initialization code and license key.
// This code must be submitted to the Air-Gap Portal to receive a confirmation code.
activationCode, err := lh.GetAirGapActivationCode(initializationCode, licenseKey)
if err != nil {
	fmt.Printf("failed to generate air-gap activation code: %w", err)
	return err
}
fmt.Printf("Activation Code: %s\n", activationCode)
  • initializationCode: Provided by the Air-Gap Portal.

  • licenseKey: Retrieved from the authentication data provided in configuration.

Print and store the activation code. You will paste this back into the Air-Gap Portal to obtain a confirmation code.

Step 2: Activate License Using Confirmation Code

After receiving the confirmation code and downloading the associated policy file, use the following function to activate the license:

Required Inputs

  • confirmationCode: Obtained from the Air-Gap Portal.

  • policyPath: Local path to the policy file (must be included with your application).

  • licenseKey: Retrieved from License Handler's configuration.

  • policyId: Found on the LicenseSpring portal and the Air-Gap portal.

  • airgapPublicKey: The air-gap public key from portal settings.

circle-info

Air-Gap activation uses code exchange only — no file export/import is required. Ensure the policy file is shipped with your software, and confirm you have the correct Air-Gap Public Key from your LicenseSpring settings.

Was this helpful?