How does Avacaster licensing and verification work?
From Avacast Support
How does Avacaster licensing and verification work?
The Avacaster server must have a properly configured license file (AvaLicense.cfg) in order to run continuously and support the number of connections licensed by the customer. The license also has an expiration date, so it must be renewed as needed (usually yearly) if the customer wishes to continue using the server.
Obtaining a customer's license information
NOTE: The Client Support folder referred to in this article is the Corporate Documents/Internal/Client Support/ folder on the mail.avacast.com FTP server.
The details for a customer's license is (or should be) currently recorded in several places:
- The Helpdesk ticket opened for the server install.
- Customer Fact Sheet document.
A Word document named FS_CUSTOMERNAME.doc is created for each customer server and is stored in Client Support/Customer Fact Sheets.
- AvacasterLicenses.xls document.
This Excel document lists all assigned Avacaster licenses and is located in Client Support/Licenses. This isn't really as necessary since the Unique ID is now the Helpdesk ticket number (more about this below).
- Super Administrator.
On an existing Avacaster server with a license already installed, log in to the Super Administrator and go to the Server panel to view the current license information.
Creating the license file
You can create the AvaLicense.cfg file with the LicenseMaker (version 3) application, which is a standalone Director projector (Mac and PC versions are available on dev.avacast.com:1021 FTP server in ava/license_maker). The Avacaster Installer can also create this file, but you must still follow steps 1 through 3 below to generate the number, which you then paste into the Installer at the appropriate point.
To use the license maker application:
1) Double click the projector to run it.
2) Enter the following information in the fields:
- Avacaster Version #
- Format is officially X.X.X, but must be entered as X.XX. For example, enter 4.1.2 as 4.12, enter 5.0.0 as 5.00, etc.
- Licensee Name
- Customer's name or initials.
- License Number
- This is a unique integer ID for this Avacaster server in order to ensure that the resulting Avacaster Serial Number is unique (because in theory the other parameters could be the same on different servers). A designated Avacaster staff member usually assigns this number, and it is documented in the AvacasterLicensing.xls file (mentioned above). In the past, this number has just been the next one in a sequence. However, another option is to use the Helpdesk ticket number that was opened for the install, since this will still always be unique
- Maximum connections allowed
- Enter number of licensed users. IMPORTANT: this number MUST match the ConnectionLimit variable set in /SMUS/Multuser.cfg, or else the Avacaster service will not run properly.
- Expiration Date
- Format must be YYYY/MM/DD 12:59:59. For example: 2005/07/31 12:59:59.
3) Click the "make license file" button. The application window will change to display the encrypted license number.
4) Click the "save" button. In the Save dialog, save AvaLicense.cfg to wherever you like.
5) Copy this AvaLicense.cfg file to both the SMUS directory (typically under the web root) on the new server and to Client Support/Licenses/CUSTOMERNAME/ (create this last directory if necessary).
How the license file works
The SMUS checks on startup for the presence of the encoded AvaLicense.cfg file in the SMUS directory and validates the expiry date and connection limit vs the serial number. If this file is not present, a 2-hour demo license is accorded. If the file is present, but doesn't match or the date has passed the server is disabled. If the timer runs out, the SMUS is disabled. The license file is re-checked every hour; however if the SMUS becomes disabled it will go into a coma (app still running, but unusable) and need to be rebooted when the new license file is uploaded.
How license verification works
The above is all well and good, but doesn't allow us to cut off a customer in a situation where we've enabled their full license upon installation, but for some reason we haven't been able to obtain payment from them. The solution was to add an addtional check, by having a file on one of our servers, that if present and contains a certain keyword, shuts off the server. That file will be the same as the license number with the extension ".txt", e.g. "AVA-0300-20091231-00100-00001.txt" (that's the dev server's license number) and live in the "avacustlics" directory on "www.avacast.com". Caveat: this course won't work if the server is behind a firewall that blocks HTTP access to the outside, but it's better than nothing.
It will be checked within 5 minutes of SMUS' startup, assuming the AvaLicense.cfg file checks out, and if it's not found (404 error) the license reverification will start from scratch every 24 hours. So, you should have a file for every license in that directory; only the licenses you want to disable should contain the word "invalid." You can put ANY other text in there, such as the name of the customer and so forth, as long as you remember that the server is looking for the word "invalid" to disable.
If the file IS there, and does NOT contain the word "invalid", then it will continue to check for reverification every 24 hours. This means that when you want to remotely disable a customer's server, it could take as long as a full 24 hours for their server to stop working for free.
By looking at our weblogs for www.avacast.com/avacustlics/ we should be able to tell which of our customers' servers are running -- and 404 errors to that dir (which will occur every 15 mins) should tell us which customers we need to create remote license files for, then they will only hit us every 24 hours.
[Note: So far we have not created a verification file for each customer as a regular policy. Instead, we just create one when we want to turn a server off.]
- SMUS boots.
- SMUS reads local AvaLicense.cfg
- if not found -> activate 2hr demo license.
- if found --> validate; shut down if invalid.
- SMUS accesses http://www.avacast.com/avacustlics/[license#].txt
- if not found (e.g. 404 error) --> go back to step 2 after 24 hours.
- if found --> validate; shut down if contains word "invalid"; otherwise go back to step 2 in 24 hours.
Note: there will be a 5-minute gap between step 2 and step 3 on SMUS boot sequence due to need to wait for SuperAdmin movie to instantiate in order to call AvaInetXtra.