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
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 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.
Step 3: Generate Deactivation Code
Similar to the activation flow, start by generating a deactivation code using the initialization code from the Air-Gap Portal:
initializationCode: Provided by the Air-Gap Portal.licenseKey: Retrieved from the authentication data provided in configuration.
Print and store the deactivation code. You will paste this back into the Air-Gap Portal to obtain a confirmation code.
Step 4: Deactivate License Using Confirmation Code
After receiving the confirmation code from the portal, complete the deactivation:
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 the License Handler's configuration.policyId: Found on the LicenseSpring portal and the Air-Gap portal.
Last updated
Was this helpful?