View Full Version : Activation Wizard and Tools

09-29-2009, 06:35 PM
We wanted to share some tools we developed as part of our FNP 11.6.1 and FNO 12.0 implementation.

The contents are:
An activation wizard to handle license activation, return or repair.
A tool to automatically process e-mail activation requests.
Code to generate more secure activation ids.

Detailed Contents:

1. ActivationWizard. Contains a comprehensive GUI based activation wizard that allows users to
activate, return or repair licenses via the internet, e-mail or phone. Also contains a C++ class
library that simplifies using the functions in the Flex*Net API. See the ActivationWizard folder
for details including a sample binary and manual.
The GUI eases the license activation process and also contains workarounds for several
different bugs that we found during our implementation.

2. Mailer. In our implementation of FNO we received a large number of activations via e-mail.
To accomodate this, we wrote a simple program that responds to e-mail activation requests
automatically. To use this you will need a copy of e-mail factory for .NET. A free trial
can be downloaded at: http://www.jscape.com/emailfactorydotnet/index.html.
This code also provides a nice example of how to use FNO web services from C#.
Basically, to use FNO services from C# just run wsdl.exe on a wsdl file from FNO then
add the method SetAuthenticationCredentials() as shown in the code to set the SOAP
BASIC authentication credentials.

3. Activation ID generator. In our implementation of FNO we found the built-in activation
ID generator to be unsatisfactory. If you create a bunch of line items via a script
using SOAP (or possibly even by hand) then the resulting keys will all be numbered sequentially.
This creates the problems that:
a. Keys are easy to guess.
b. Customers can easily get mixed up and use another customer's key by mistake.

We provide an example of an improved activation id generator.

a. The sample follows Java “best practices” as described here where the IDs are generated
using java SecureRandom so that they are random and hard to guess:

b. Activation IDs are distinguished from Entitlement IDs by the prefixes ACT- and ENT-.
We found that our support got confused by having these IDs with the same format.

c. IDs are limited to 20 characters using base 34 (numbers + A-Z minus I and O).
This is the same kind of activation id format used by major vendors and it gives a larger
and harder key space to guess licenses.

d. Activation IDs are given a simple checksum to help prevent user error in entering the wrong key.
The activation GUI also supports this checksum.

The downside of the sample code is that since it returns a random id, there is a very
small chance that the returned id might already be used in the database.
If the ID fails, users can just click save once again.
In our bulk license creation scripts we simply detect any failed license creations and try
again manually. (To be honest this has never happened since the chance of this occurring is so