SDKs
...
v2
Samples

Air-Gap License

7min
air gap license activation 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 retrieve an initialization code from the licensespring air gap portal generate an activation code using the sdk and the initialization code submit the activation code to the air gap portal and obtain a confirmation code activate the license on the air gapped machine using the confirmation code and policy data 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 	// complete the activation using the confirmation code and policy file 	ld, err = lh activateairgaplicense(confirmationcode, policypath, licensekey, policyid) 	if err != nil { 	 fmt println("error during air gap activation ", err) 	 return err 	} 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 protal airgappublickey the air gap public key from portal settings notes air gap activation does not require file export/import, only copying codes between the portal and the sdk ensure the policy file is shipped with your software as it is required for activation both activation and configuration require the correct air gap public key, available in your licensespring settings