Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

So after one has programmed and integrated a licensing solution into his or her application, how should one deal with licensing errors?

My understanding is: Show whether a license is valid or invalid - and report if the license server is not reachable. Nothing more, nothing less.

Licenses could be invalid due to a variety of reasons: Invalid Machine-Code, maximum number of activations reached, invalid licensed version...

But should we report them to the user or just tell him "okay", "not okay" or "license server not reachable"?

I don't know if this is the right place to ask, maybe security.stackexchange.com is more suitable, but that could be true for ux.stackexchange.com, too... So I'm asking it here.

share|improve this question

1 Answer 1

up vote 4 down vote accepted

In my view what you're proposing is exactly correct. Only reveal what's necessary.

From a security point of view if you consider an "attacker" trying to learn from why the license is wrong the correct way to handle the situation is to leak no information. For example if you try to "optimize" the user experience by being nice and telling the user that "It seems the license is otherwise valid but the last few characters contain an error. Please re-check them and try again!" it is very obvious that this gives information away to the attacker which can then be used to defeat the licensing procedure by being able to guess a correct license.

Sometimes the possible security considerations are not just about securing your own product/service but to actually secure that of your customers too. As an example consider this: I have licensed your software with my username + license. Now, if your software is "kind" enough to let the user know if the username was incorrect or if the license digest was incorrect the software leaks information. A malicious user could use this feature to determine if I as your customer use or at least have licensed your software. This is a potential security issue against me, your customer rather than against you or your service. "Funnily" enough, something similar has lead to divorces for married couples when the suspecting other has been able to figure out if their partner has registered on a dating website with their personal email.

There are other forms of leaking information too, but they are side channel attacks such as measuring the power consumption or the time it takes to verify a given license and trying to modify it so that giving a bit different license produces different timing information and as such can possibly reveal if the modifications modifed the input license towards a legit one or not. To counter such side channel attacks one would need to be able to create such an implementation of the license validation measure which does not leak this information. Such as the validation taking constant time(to a nanosecond precision, mind you, so we're talking about exact identical amount of CPU cycles for example) regardless of whether the given license for validation is valid or not.

share|improve this answer
    
This is a throughout well-thought answer with many sidenotes. Thank you! But what would you do when a customer asks you "Hey, I've used the license you gave me but it won't validate. What's wrong with it?"... You'd need to be able to see why your application refuses to validate the customers license. –  SeToY Jan 22 '13 at 11:51
1  
@SeToY - You tell them the license in question is not valid and issue them a new one. –  Ramhound Jan 22 '13 at 12:17
    
@Ramhound That could be used to get free licenses. At least it would be a strong requirement to verify that the given license indeed is valid even though the user can't validate and that the usr is certainly the correct one to whom the license is registered. At a quick thought the only way this whole setting(that a legitimate user can't validate his/her legit license) would be a problem in the implementation which does the validation process. Issuing a new license does not fix the underlying problem. The correct way would be to debug what exactly goes wrong in the system and fix it. –  zxcdw Jan 22 '13 at 12:21
    
@zxcdw - Clearly you would make the user pay for any license generated in this fashion. My solution to a problem like this is to make the previous license invalid and generate a new license. If additional users are required collect additional monies from customer. –  Ramhound Jan 22 '13 at 12:30
    
@Ramhound I would find such a policy very bad for the end user if the reason for non-validating license is at the license issuer's end(That is, if the problem with legitly issued licenses not validating is a bug in software for example). It's like making users pay for your own mistakes. –  zxcdw Jan 22 '13 at 12:38

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.