Licensing Infrastructure
The infrastructure that supports our licensing mechanisms.
Proposal

Licensing library design after refactoring

Components
LicenseManager (dll)
Resolve licensing aspects for the generic controller
Handling the active license
Downloading new licenses
Validating licenses and execution requests
Check internet settings
LicenseModel (dll)
Representing the license data in a standard way.
Serializing and deserializing the data
Encryption
License WebService:
Provide license files on request
Add new licenses to DB
Query licenses DB
Licensing WebApp:
Provide UX for licensing manager users
Show status of licenses
Create new licenses
Sequence Diagrams


Database Migration
There are currently 3 software components where licenses are created, each of them with its corresponding database:
Studio: for Snow
VBUC CLI License Generator: for VBUC manually generated licenses.
VBUC in Sales Web Flow for automatic VBUC sales.

License Model
After considering Snow, VBUC and other experiences with licenses, this is the purposed LicenseModel:
public class LicenseModel
{
private Dictionary<string,object> licenseData;
private string LicenseFile;
public const int unlimitedUnits = -1;
public readonly DateTime unlimitedDate = DateTime.MinValue;
// Create and Save
public LicenseModel(string filename);
// Will save be available here or in a different dll?
// Basic Data
public string GUID; //license key
public DateTime DateIssued;
public DateTime LastExecutionDate;
public string Product;
public string ProductFriendlyName;
public string OwnerCompany;
public string OwnerName;
public string OwnerEmail;
public string CreatedBy;
public string OwnerIpAddress;
public string CreatedAtComputer;
public List<string> Products;
public List<string> ProductFriendlyNames;
public string LicensingAssemblyVersion;
// Restrictions
public string LicenseType
public string UnitsType;
public int AccumulatedUnits;
public int UnitsPerExecution;
public DateTime StartDate;
public DateTime EndDate;
public int TimesDownloaded;
public int AvailableActivations;
public Fingerprint Fingerprint;
public ExecutionMode ExecutionMode; // (Scanning | Migration)
// How to store status?: ConsumedAccumulatedUnits & LastUsedDate
// Other
public int NotifyDays;
public IEnumerable<KeyValuePair<string,string>> FriendlyRestrictions;
public List<string> AllowedCustomFeatures; // CSharp, ASP, ...
}
Pending Questions:
LicenseFile: why is this text field stored in the VBUC DB?
DateIssued: should it be the original date when the license was inserted into the DB? (makes more sense) or the date when the current license file was serialized?
Unmutable License Files: Where to handle ConsumedAccummulatedLines & LastUsedDate?
LicenseType & ExecutionMode: define a generic mechanism to solve all possible scenarios.
Serialization of new files: available in the LicenseModel, or only in a separate private dll?
Last updated