################################## Activation Database ################################## RLM activation uses a MySQL database to store all data. There are a total of 19 database tables: .. list-table:: * - active_users - The currently active users * - audit - Audit trail * - badhost - Esed to automatically ban IP addresses * - blacklist - Banned list definitions * - company - Table of customer companies * - contact - Table of customer contacts * - contact_types - Table of contact types * - debuglog - License generator debug logging information * - defaults - Default values for product definition and activation keys * - keyd - The Activation Key definitions * - keyf - The Activation key fulfillment status, * - licf - License Fulfillment data * - prod - The product definitions * - report_cols - Database columns which appear in reports * - report_select - Selection criteria for reports * - report_types - Report type definitions * - setup - Activation setup data * - stats - License generator statistics * - users - Table of authorized users Each table indicates whether the admin tool and/or the license generator read and write to it. The contents of these tables is as follows: ------ *********************************** active_users - active RLC users *********************************** This table is used only by the admin tool. Unused by the license generator. .. list-table:: :header-rows: 1 * - Column - Meaning - Data type * - user - username logged in - string * - timestamp - Time user logged in - integer ------ **************************************** audit – database Audit Trail (v11.2) **************************************** This table is used only by the admin tool. Unused by the license generator. .. list-table:: :header-rows: 1 * - Column - Meaning - Data type * - date - Time of entry - integer * - who - Username logged in - string * - what - Operation performed - string * - tablekey - Key in table modified - string * - tablename - Table modified - string ------ **************************************** badhost – automatic banned list data **************************************** This table is used by both the admin tool. and the license generator. .. list-table:: :header-rows: 1 * - Column - Meaning - Data type * - ip - IP address - string * - first - First transaction - integer * - last - Last transaction - integer * - count - Transaction count - integer ------ **************************************************************** blacklist – banned list definitions, one row per banned host **************************************************************** This table is written only by the admin tool. Read-only by the license generator. .. list-table:: :header-rows: 1 * - Column - Meaning - Data type * - id - Row ID - integer * - domain - The hostname/domain of the banned host. If this string matches any part of the requesting host, that host is not allowed to use the activation server - string (255). No spaces. * - type - Type of banned list entry - integer ------ ******************************************************** company – customer company information ******************************************************** This table is used only by the admin tool. Unused by the license generator. .. list-table:: :header-rows: 1 * - Column - Meaning - Data type * - company_id - Company ID (primary key) - integer * - company - Company name - string (60) * - addr1 - Address line 1 - string (60) * - addr2 - Address line 2 - string (60) * - addr3 - Address line 3 - string (60) * - city - City - string (60) * - state - State - string (60) * - zip - Zip/Postal code - string (60) * - country - Country - string (60) * - c_notes - Misc notes. - string (255) * - companyowner - Reseller owner of this company - integer * - u1 - User-defined. - string (60) * - u2 - User-defined. - string (60) * - u3 - User-defined. - string (60) * - u4 - User-defined. - string (60) * - u5 - User-defined. - string (60) * - u6 - User-defined. - string (60) * - u7 - User-defined. - string (60) * - u8 - User-defined. - string (60) * - u9 - User-defined. - string (60) * - u10 - User-defined. - string (60) ------ ******************************************************** contact – customer contact person information ******************************************************** This table is used only by the admin tool. Unused by the license generator. .. list-table:: :header-rows: 1 * - Column - Meaning - Data type * - contact_id - Contact ID (primary key) - integer * - contact - Contact person name - string (60) * - contact_type - Contact type - string (60) * - title - Job Title - string (60) * - phone - Phone # - string (20) * - fax - Fax # - string (20) * - email - Email address - string (60) * - info - General notes - string (60) * - company_id - ID of associated company record - integer * - ccreate - Creation date - string (11) * - contactowner - Reseller owner of contact - integer ------ ******************************************************** contact_types – customer contact type definitions ******************************************************** This table is used only by the admin tool. Unused by the license generator. .. list-table:: :header-rows: 1 * - Column - Meaning - Data type * - contact_type - Contact type - string (60) ------ ******************************************************** debuglog – license generator debug log ******************************************************** This table is written by the license generator and admin tool. Read by the admin tool only. .. list-table:: :header-rows: 1 * - Column - Meaning - Data type * - date - Date/time of entry - integer * - logdata - The debug data logged - string (500) ------ ********************************************************************** defaults – default specifications for products and activation keys ********************************************************************** This table is read and written only by the admin tool. .. list-table:: :header-rows: 1 * - Column - Meaning - Data type * - id - Row unique id - integer * - user - Whose default (#SYS# for system default) - string (30) * - tab - Which table (prod or keyd) - string (30) * - col - Column in table - string (30) * - value - Default value - string (80) * - invis - Field is invisible - integer (1) ------ ******************************************************************** keyd - activation key definitions, one row per activation key ******************************************************************** This table is written only by the admin tool. Read-only by the license generator. .. list-table:: :header-rows: 1 * - Column - Meaning - Data type * - akey - The activation key (35 character maximum). - string * - active - 0 if this definition is inactive, 1 if active. - integer * - product id - Product identifier, from product definitions. - integer * - count - The # of activations allowed, 0 = unlimited. Limited to 1 for Refresh-type activations. - integer * - type - 0 - Normal, 1 - Reactivate, 2 - Refresh - integer * - rehosts - For revoked hostids, the number of hostid changes allowed. - integer * - lastdate - Expiration date of activation key - key cannot be used after this date. - string * - exp - If a number, number of days to expiration of the license after product activation. If == 0, the license does not expire. If a standard RLM date format, it is a fixed expiration date. If specified, this expiration date overrides the expiration date in the product definition. - string * - kver - License version, to override product definition. - string (11) * - kver_type - License version type. - integer * - white - Domain whitelist for key - only domain names appearing in this list can use the key. This string can be a spaceseparated list. If any component of the string matches the requesting hostname, that host is allowed to activate using this key. - string (100) * - misc - Any optional RLM license attributes. - string (255) * - notes - Optional notes to allow you to identify the key - unused by RLM. - string (100) * - contact_id - Contact ID of owner of activation key. - integer * - key_allowed_hostids - Allowed Hostids for this activation key (overrides product definition). - integer * - kcreate - Key creation time. - char (11) * - ash_sn - Serial number for Alternate Server hostid. - integer * - user_def - User-defined field (unused by Activation Pro). - char (32) * - sub_interval - Subscription Interval (Subscription type only). -1 == month, -2 == quarter -3 == year, + == # of days. - smallint (6) * - sub_window - Subscription Renewal Window (Subscription type only). - smallint (6) * - keyowner - Company id of reseller who owns this key. - integer ------ ****************************************************************************** keyf - activation key fulfillment information, one row per activation key ****************************************************************************** This table is written by both the license generator and RLC. .. list-table:: :header-rows: 1 * - Column - Meaning - Data type * - akey - The activation key - string * - num - Number of (current) fulfillments from this key, not counting fulfillments which were subsequently revoked. - integer * - date - For Reactvation: original expiration date of the license. For Refresh: last date license refreshed. - string * - lasthostid - For Refresh type: Last hostid fulfilled. - string (80) * - num_revoked - Number of licenses revoked . - integer ------ **************************************************************** licf - license fulfillment information, one row per activation **************************************************************** This table is written by both the license generator and RLC. .. list-table:: :header-rows: 1 * - Column - Meaning - Data type * - id - Row ID - integer * - akey - The activation key. - string * - product_id - Product identifier - integer * - count - Number of licenses activated. - integer * - time - Time() value when activation was done. - time_t (integer) * - license_hostid - Hostid for license. - string * - reference_hostid - Reference hostid for rehostable licenses. - string * - expdate - Expiration date of first license, in fmt yyyy-mm-dd. - string * - hostname - Hostname on activated machine. - string * - remote_host - IP address (typically) of machine requesting activation. - string * - log - Log info from rlm_act_request() call. - string * - license - Generated license. For floating licenses, this is just the LICENSE line. - string * - last_fulfill - time() value at last fulfillment. - time_t (integer) * - num_fulfills - Number of fulfillments of this license. - integer * - revoked - “license was revoked” flag (1=revoked). - integer * - revoked_time - Time license was revoked. - integer * - last_check - Last time an rlm_act_keyvalid() called on this fulfillment. - integer * - time_str - String version of time field. - string * - last_fulfill_str - String version of last_fulfill field. - string * - last_check_str - String version of last_check field. - string ------ *********************************************************** prod - product definitions, one row per product definition *********************************************************** This table is written only by the admin tool. Read-only by the license generator. .. list-table:: :header-rows: 1 * - Column - Meaning - Data type * - id - Activation product identifier - integer * - active - 0 if this definition is inactive, 1 if active (product definitions are not deleted). The license generator doesn't create licenses for inactive products . - integer * - obsolete - 1 if this product definition is obsolete, meaning it can't be used to create new activation keys. - integer (1) * - name - Product Definition name - string * - version - The RLM product version - string * - version_type - 0 – normal version, non-zero – date-based version - integer * - upgrade_version - Upgrade-from version number (UPGRADE licenses only) - string * - exp - If a number, number of days to expiration of the license after product activation. If == 0, the license does not expire. If a standard RLM date format, it is a fixed expiration date. - string * - lictype - 0 = floating, 1 = node-locked, uncounted, 2 = node-locked, counted (unimplemented), 3 = single, 4 = UPGRADE (floating) - integer * - issued - 0 - do not include "issued=" in license, 1 - include "issued=[today's date]" in license. - integer * - add_akey - 0 – do not include “akey=” in license, 1 – include “akey=” - integer * - add_cust - 0 – do not include “customer=” in license, 1 - include - tinyint * - product - License product name . - string * - misc - Any optional RLM license attributes . - string * - generator - Used to specify alternate license generators. 0=standard RLM generator. - integer * - prod_id - ID of the Primary License of this product definition. 0 for the primary license. - integer * - nlic - Number of licenses to create per fulfillment request. Multiplied by request count. Unused for nodelocked or single licenses. - integer * - prod_allowed_hostids - Bitmap of allowed hostid types. If 0, all hostid types are allowed. - integer * - pcreate - Record creation date - string * - ash_type - Alternate server hostid type - integer * - ash_tolerance - Alternate server hostid tolerance - integer * - lictext - Text to prepend to generated license - varchar (1024) * - pnotes - Notes for this product definition - varchar (100) ------ *********************************************************** report_cols – database columns which appear in report *********************************************************** This table is read-only by RLC. Unused by the license generator. .. list-table:: :header-rows: 1 * - Column - Meaning - Data type * - id - Primary key - integer * - report - Report name - string (40) * - displayorder - Order to display selections - integer (2) * - tablecolumn - Column name from table - string (40) * - display - Report column header text - string (30) * - is_int - If non-zero, column contains integer data - integer (1) ------ ************************************************ report_select – report selection definitions ************************************************ This table is read-only by RLC. Unused by the license generator. .. list-table:: :header-rows: 1 * - Column - Meaning - Data type * - id - Primary key - integer * - report - Report name - string (40) * - fixed - Is selection criteria fixed or variable - integer (1) * - displayorder - Order to display selections - integer (2) * - display - Text to display in UI - string (40) * - var - POST variable name - string (20) * - size - Size of text box in UI - integer (3) * - op - Table for report data - string (20) * - value - Value for fixed selection criteria - string (64) ------ ************************************************ report_types – report type definitions ************************************************ This table is read-only by RLC. Unused by the license generator. .. list-table:: :header-rows: 1 * - Column - Meaning - Data type * - report - Report name - string (40) * - sel - Used by report writer UI - string (2) * - tablename - Table for report data - string (40) * - displayorder - Order to display report names - integer (2) * - report_header - Display header for report - string (80) * - type - Report type (0-internal, 1-user-defined) - integer (1) * - base_report - Base report for a user-defined report - string (40) * - rep_output - Output for user-defined report - integer (2) * - schedule - Schedule for user-defined report - integer (1) * - subschedule - Sub-schedule for user-defined report - char (10) * - email_to - Email list for user-defined report - char (80) ------ ******************************************************* setup - RLC setup definitions, one row per setup item ******************************************************* This table is written only by the admin tool. Read-only by the license generator. This table contains data such as the activation URL for refresh, Activation Pro version, etc. .. list-table:: :header-rows: 1 * - Column - Meaning - Data type * - what - Description of the data item - string (30) * - data - The actual data - string (64) ------ ******************************** stats – Activation statistics ******************************** This table contains license generation statistics. This table is read-only by RLC. Read-write by the license generator. .. list-table:: :header-rows: 1 * - Column - Meaning - Data type * - date - Date in the format” yyyy-mm-dd hh”. This record collects statistics for 60 minutes starting at the hour indicated. Primary key. - char (13) * - total - Total transactions with the activation server - integer (11) * - good - Completed license fulfillments - integer (11) * - badkey - Unknown activation key supplied - integer (11) * - blacklist - # of hosts automatically banned - integer * - checks - Reprise pings the hosted activation servers with an invalid activation key to check that the website is up, the license generator is working and the database is working. This is a bad key where the key supplied is “rsi-check-act-server”. - integer (11) * - numfulfill - Number of “num fulfill” commands executed. Used by rlm_act_revoke()/rlm_act_rehost_revoke(). - integer (11) * - rmfulfill - Number of “remove fulfill” commands executed. Used by rlm_act_revoke()/rlm_act_rehost_revoke(). - integer (11) * - prod - Number of “list product” commands executed. Used by rehostable hostid activation. - integer (11) * - badtime - Number of otherwise good requests from clients with clocks which are off by more than 7 days. - integer (11) * - info - # of getinfo requests. - integer * - keyvalid - # of keyvalid requests. - integer ------ ******************************* users - authorized RLC users ******************************* This table is used only by the admin tool. Unused by the license generator. .. list-table:: :header-rows: 1 * - Column - Meaning - Data type * - username - Username - string * - password - User's encrypted password - string * - userid - User Identifier - string * - userlevel - User access (1=view, 2=edit, 9=admin) - integer * - email - User's email address - string (50) * - timestamp - Last time user logged in. - integer * - contact_id - User's contact_id - integer * - vistabs - Visible Tabs bitmask - integer