Solution #1 is probably the most elegant solution, as it centralizes all the licensing logic. Any changes can be done in one place. The main drawbacks to a licensing server (as compared to a local license file like #3) are performance and reliance on the availability of the licensing server. If the licensing server goes down, what do you want your applications to do? Block all access? Temporarily allow all access?
I've been there and done that. I'd like to offer some leading questions on each approach.
A key piece of information is why are you trying to prevent unlicensed users from using your software? Is this an application open to the general public? Is this to protect/support sales and contractual obligations? Are your users friendly (might accidentally add new users) or hostile (will intentionally add users they don't have licenses for)?
Do your customers have access to your softwares configuration? To the hardware it runs on?
Create a java webservice that will be mounted on a license data, and all the servers will communicate with it when a user logs in any of the above applications.
What happens if the license server is down or slow? Does this prevent logins? Will calling out to the license server on each login slow down the login enough to annoy the users?
Who will maintain this service? Who will add/update licenses?
How will you secure the communication with the license server?
Do a socket based server.
This is the same overall approach as the first option. You should think of this in terms of "I have a remote license server". The protocols and techniques used to communicate with that server are important, but not as important as the overall design.
Mount a lisence file on each server and make each one communicate with its file individually and act as the license rules.
How will you generate and distribute these license files? Will you/your support team do it or the customer?
How will you secure the license files? A license file with a number in it will do, but is hardly adequate to really enforce licensing restrictions. A signed file is a step better. A cryptographically secured file is best, but may be overkill.
发布评论
评论(2)
解决方案#1 可能是最优雅的解决方案,因为它集中了所有许可逻辑。任何更改都可以在一处完成。许可服务器的主要缺点(与#3 等本地许可文件相比)是性能和对许可服务器可用性的依赖。如果许可服务器出现故障,您希望您的应用程序做什么?阻止所有访问?暂时允许所有访问?
Solution #1 is probably the most elegant solution, as it centralizes all the licensing logic. Any changes can be done in one place. The main drawbacks to a licensing server (as compared to a local license file like #3) are performance and reliance on the availability of the licensing server. If the licensing server goes down, what do you want your applications to do? Block all access? Temporarily allow all access?
我去过那里并做到了这一点。我想就每种方法提出一些主要问题。
一个关键信息是您为什么试图阻止未经许可的用户使用您的软件?这是向公众开放的应用程序吗?这是为了保护/支持销售和合同义务吗?您的用户是友好的(可能会意外添加新用户)还是敌对的(会故意添加他们没有许可证的用户)?
您的客户可以访问您的软件配置吗?到它运行的硬件?
如果许可证服务器出现故障或速度缓慢,会发生什么情况?这会阻止登录吗?每次登录时调用许可证服务器是否会减慢登录速度,足以惹恼用户?
谁来维护这项服务?谁将添加/更新许可证?
您将如何保护与许可证服务器的通信?
这与第一个选项的总体方法相同。您应该从“我有一个远程许可证服务器”的角度来考虑这一点。用于与该服务器通信的协议和技术很重要,但不如整体设计那么重要。
您将如何生成和分发这些许可证文件?您/您的支持团队或客户会这样做吗?
您将如何保护许可证文件?带有编号的许可证文件就可以,但不足以真正执行许可限制。签名文件会更好。加密保护的文件是最好的,但可能有点过头了。
I've been there and done that. I'd like to offer some leading questions on each approach.
A key piece of information is why are you trying to prevent unlicensed users from using your software? Is this an application open to the general public? Is this to protect/support sales and contractual obligations? Are your users friendly (might accidentally add new users) or hostile (will intentionally add users they don't have licenses for)?
Do your customers have access to your softwares configuration? To the hardware it runs on?
What happens if the license server is down or slow? Does this prevent logins? Will calling out to the license server on each login slow down the login enough to annoy the users?
Who will maintain this service? Who will add/update licenses?
How will you secure the communication with the license server?
This is the same overall approach as the first option. You should think of this in terms of "I have a remote license server". The protocols and techniques used to communicate with that server are important, but not as important as the overall design.
How will you generate and distribute these license files? Will you/your support team do it or the customer?
How will you secure the license files? A license file with a number in it will do, but is hardly adequate to really enforce licensing restrictions. A signed file is a step better. A cryptographically secured file is best, but may be overkill.