HI,I've talked about this issue before, and I have now implemented a solution that I thought I would share, just to see if there are any obvious security holes in what I have done (I am by no means an expert in this area).
The basic problem was that I have some resellers for whom I bulk create license keys. This is fine, the resellers sell these and all is well. The problem arises when I add new features to existing licenses - in my case, a couple of optional modules. I needed a solution whereby I could sell pre-made license keys to my existing resellers, and they could sell these on to their customers, without having to contact me (or the buyer) to get existing licenses upgraded.
My solution is as follows:
Create a simple php database with a single table, containing columns for a random license code, feature upgrade type, used flag (has this update been used already), and existing key and timestamp columns (to provide a basic audit trail).
I populate this database (which is on my webserver) with rows containing a GUID and a bitfield containing information about the modules that need to be updated.
In my application, I call a php script on my webserver (just using GET parameters) which takes as parameters the GUID upgrade code and the existing application key. The existing application key is pulled from TurboActivate, and the user enters the GUID code having purchased it from a reseller. I don't see that this communication needs to be particularly secure?
The php script on my webserver does all the Lime interaction - it has the API key. The script looks up the LIME Key id using the supplied text key, checks that the supplied GUID exists in the DB and has not been used already, looks at the features specified and then does an update features via the LIME API. If that is successful, the used flag, text key and timestamp fields are updated in the DB.
Once this web request returns to my application with a success code, I just do a license reactivate and inform the user of any changes.
This seems to me as if it should be secure, and should work OK. All I need to do is create a bulk set of GUIDS and insert them in the DB, and send same set of GUIDS to my reseller.
How does that all sound?
cheers,Matt