This is an old revision of the document!
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.
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:
Key Type | Start time | Expire time | Expire Updates | Tempexpire | Maxduration |
Permanent Key | Set@Key create | Never | Set by AGTEK | Customer settable | |
Software Key | Set@Key create | Start + 1 year | Set by AGTEK | Customer settable | |
One Time Key | Set@Key create | Never | N/A | N/A | Forever |
Rental Key | Set@Key create | Start + 1 year | Update by AGTEK | N/A | Customer settable |
Training Key | Set@Key create | Start + 10 days | N/A | N/A | Customer settable |
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 + starttime | AGTEK | ||
products | varchar(255) | YES | NULL | Quad code, comma sep, up to 50 | AGTEK | ||
tempexpire | int(32) | NO | NULL | Expire time for all temporary products | AGTEK | ||
tempproducts | varchar(255) | YES | NULL | Quad code, comma sep, up to 50 | AGTEK | ||
checkedout | tinyint(1) | NO | NULL | 1 if checked out, 0 if available | |||
expired | tinyint(1) | NO | NULL | 1 if expired, 0 if available |
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 |