I'm creating an web application in ColdFusion 11 which was originally going to be cloud-hosted. However some potential customers would prefer for it to be hosted by themselves on their premises.
This has brought up the questions of:
- Managing the application on multiple sites (e.g. upgrades, updates)
- Licensing the application so it only works while the customer is paid-up
- Preventing clients from accessing the source code and either messing the application or pirating it
The first one that I want to tackle is how to create a licence file per customer that the application checks every time its used, and then allows the customer in. Bearing in the mind the entire application is hosted by the customer so I can't have a central system that checks licencing. I need something like how older Desktop applications worked where you typed in a serial number and it licenced the product.
My initial thoughts are to:
- Preload a database table that the client has with hashed/encrypted serial numbers
- Have some other table that maps the serials to expiry dates
- My web app checks the databases tables for serial validity against the database table and then decides to work for whatever period the serial lasts for
The only thing is... how would it check for "serial validity". That is, how would my web app know which serial this customer is using and keep that permanently until the expiry date which could be 12 months away.
Could anyone give me some pointers how to achieve this kind of client-based security for a ColdFusion web application?