| Availability |
Odoo Online
Odoo.sh
On Premise
|
| Odoo Apps Dependencies |
•
Discuss (mail)
• Website (website) |
| Lines of code | 526 |
| Technical Name |
db_license_manage |
| License | OPL-1 |
Digitalub Angola - Odoo Database License Manager (v17)
The Database License Manager is a security module for Odoo 17 designed to protect intellectual property and control the software's usage period.
Unlike simple solutions based on plain text dates, this module uses Asymmetric Cryptography (RSA) and JWT (JSON Web Tokens) to ensure that the license cannot be forged, altered, or cloned for other databases.
Note: This module requires the installation of additional Python libraries (pyjwt, cryptography).
🚀 Key Features
- Expiration Date Lock: Prevents users from logging in after the defined expiration date.
- UUID Binding (Anti-Copy): The license is generated specifically for the client's database UUID. If the database is restored on another server, the license automatically becomes invalid.
- RSA 2048-bit Security: Uses a private key (held by the provider) to sign licenses and a public key (configured in the module) for validation.
- Dynamic Configuration: The public key is configured directly in the Odoo interface, without needing to change code.
- Complete Visualization: Displays the start (issuance) and end (expiration) dates of the license.
- Admin Bypass (Fail-Safe): Administrators (ID 1, ID 2, and Superusers) maintain access to the system even with an expired license, allowing token renewal via the interface.
- Grace Period: The system is prepared to issue visual warnings (Warnings) 15 days before expiration.
🛠️ Technical Prerequisites
This module depends on standard Python cryptography libraries. Make sure they are installed in the Odoo server environment:
pip install pyjwt cryptography
⚙️ Installation and Configuration (Client)
1. Installation
- Place the
db_license_managerfolder in thecustom_addonsdirectory. - Update the applications list and install the module.
2. Initial Configuration (Required)
As soon as the module is installed, no user will be able to log in (except Admin) until the Public Key is configured.
- Log in with an Administrator account.
- Go to Settings > Licensing.
- In the "RSA Public Key" field, paste the content of your
public_key.pemfile. - Save the settings.
3. Insert the License
- Still in Settings > Licensing.
- In the "License Token" field, paste the string provided by your software provider.
- The system will immediately validate the signature and show:
- License Status (Valid/Invalid/Expired)
- Start Date (Valid from...)
- End Date (...to)
🛡️ Security Flow
- Login Attempt: The user enters their credentials.
- User Verification: Odoo validates the password.
- Interception: The module checks if the user is an Admin.
- If YES: Access granted.
- If NO: The module reads the License Token and the Public Key from the system.
- Token Validation:
- Is the RSA signature valid with the configured public key?
- Is the current date less than the expiration date?
- Does the token's UUID match the current database's UUID?
- Result: If any check fails, the user is forcibly logged out and an error message is displayed.
Odoo Proprietary License v1.0 This software and associated files (the "Software") may only be used (executed, modified, executed after modifications) if you have purchased a valid license from the authors, typically via Odoo Apps, or if you have received a written agreement from the authors of the Software (see the COPYRIGHT file). You may develop Odoo modules that use the Software as a library (typically by depending on it, importing it and using its resources), but without copying any source code or material from the Software. You may distribute those modules under the license of your choice, provided that this license is compatible with the terms of the Odoo Proprietary License (For example: LGPL, MIT, or proprietary licenses similar to this one). It is forbidden to publish, distribute, sublicense, or sell copies of the Software or modified copies of the Software. The above copyright notice and this permission notice must be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Please log in to comment on this module