Reputation: 927
I'm going to deploy my webapp (WAR) in a server machine. But, server machine is in client people hand, and they take database dump(so new data can be created), and WAR file can be copied from tomcat webapp directory. OS is Windows. If they able to copy my WAR and create a database, they can use it elsewhere. How can I protect this? JNI? Something else? If JNI, what's the smart way?
Upvotes: 1
Views: 132
Reputation: 719239
Seriously, if you cannot trust the people who run the server on which your software is to run, then there is no viable technical solution that will prevent them stealing it and running it somewhere else.
All known technical "fixes" (e.g. obfuscation, encrypted classes, license managers, "call home", etc) only make it a bit harder for the bad guys. They all can can be defeated relatively easily. IMO, they are not worth the effort and the accompanying technical problems that they cause for you and/or your client.
Your best approach is the legal one:
Get your lawyers to help you draw up a contract with the client that expressly forbids them from reverse engineering your software, modifying it, running it in ways that you don't want, and so on.
Get the client to agree to the contract.
Monitor what they are doing (to the extent that you can), and if it looks like they are violating the contract ... SUE THEM.
Even this is not a guarantee, but it should cause your client to have second thoughts about stealing your stuff.
Upvotes: 2
Reputation: 31903
Possible solutions:
Solution #3 is the most common.
Upvotes: 0