Table of Contents

Summary

This page describes the abstract, the concrete client, and the DB model used for the key system. This page does not describe the generic program flow and operations required to implement all features. It may describe certain operations particularly where SQL queries are needed to perform operations.

Abstract License Model

The license key system is composed of two major entities and one log (audit) entity.

The License entity is a single item representing the abstraction of a license. It has the following properties:

Key codes are:

Product feature codes are 4 character tuples for each program/feature. Examples might include something like:

Note that the code need not represent a user readable string. User's must never be presented with the codes directly but rather specific user readable strings that are understandable to them. It is outside the scope of this implementation to provide meaningful user interface strings, and as such the application programmer is responsible for displaying appropriate strings. While a reasonable US English list of strings may exist, these are not suitable for localized versions of the software.

The License Association entity relates a use to the License instance. The associations are limited by business logic (Java server code) to a maximum of 10 associations per license.

The License Log provides an audit trail of operations and interactions in the license system.

Log types are:

License Key Timers

Variant of Timed Key

Key Type Start timeExpire timeExpire UpdatesTimed expireMax checkout durationNote
Timed Key Set@Key createcreate+35dN/ASet by AGTEKCustomer settable
Permanent Key Set@Key createNeverN/ASet by AGTEKCustomer settable
Training Key Set@Key createcreate+10 daysAGTEK manual opN/ACustomer settableAllows all users=“*”
Rental Key Set@Key createcreate+1 yearAGTEK manual opN/ACustomer settableCalled out for billing

Strange keys

Key Type Start timeExpire timeExpire UpdatesTimed expireMax checkout durationNote
Software Key Set@Key createcreate+1yrnow+1 year on renewSet by AGTEKN/Arequires periodic renewal()+secret sauce collected and checked on client to server, NEVER allow checkin
One Time Key Set@Key createNeverN/AN/AForeverNEVER allow checking or renew

Data Base Tables

License Table

Field Type Null Key Default Extra Comment mod access
handle int(32) NO PRI NULL auto_increment Universal ID for key AUTO
type char(1) NO NULL {'T', 'P', 'R', 'D'} AGTEK
custid int(16) NO NULL ID of customer AGTEK
numusers int(16) NO NULL Number of allowed users AGTEK
maxcheckout int(32) NO NULL Unix delta time for maximum checkout by user CUST
starttime int(32) NO NULL Unix time of key activation AUTO
expiretime int(32) NO NULL Unix time for key expire, -1 == never; rental = duration + starttimeAGTEK
products varchar(255) YES NULL Quad code, comma sep, up to 50 AGTEK
timedproducts varchar(255) YES NULL Quad code, comma sep, up to 50 AGTEK
timedexpire int(32) NO NULL Expire time for all temporary products AGTEK
checkedout tinyint(1) NO NULL 1 if checked out, 0 if available AUTO
expired tinyint(1) NO NULL 1 if expired, 0 if available AUTO

Operations

License Users

Field Type Null Key Default Extra Comment mod access
handle int(16) NO PRI NULL auto_increment Universal ID for this association AUTO
keyid int(32) YES NULL ID of key to associate AUTO (driven by admin request)
userid int(16) YES NULL ID of user to associate AUTO (driven by admin request)

License Log

Field Type Null Key Default Extra Comment mod access
handle int(32) NO PRI NULL auto_increment Universal ID for this log entry AUTO
time int(32) NO NULL Unix time of the log AUTO
keyid int(32) YES NULL KeyID assoc with this log. AUTO
type char(1) NO NULL Entry type (see below) AUTO
userid int(16) NO NULL UserID performing op AUTO
comment varchar(512) YES NULL Free form text AUTO

MOTD (announcements)

Field Type Null Key Default Extra Comment mod access
handle int(32) NO PRI NULL auto_increment Unique id of announcement AUTO
products varchar(255) YES NULL Product codes affected, null == all products AUTO
expire int(32) NO NULL When this message is no longer active AUTO
message varchar(1024) YES NULL Text of message AUTO

Alterations to Customer

Field Type Null Key Default Extra Comment mod access
hasccess tinyint(4) NO 0 Indicates if users belonging to this customer can use AGTEK Access AGTEK
haslicense tinyint(4) NO 0 Indicates if users belonging to this customer can use AGTEK License Server AGTEK