Module NotePlus: Difference between revisions

From Dolibarr ERP CRM Wiki
Jump to navigation Jump to search
(Initial edit.)
 
(Added to List of Modules category)
Line 1: Line 1:
== Features ==
==Features==
This module enhances Dolibarr’s native notes functionality by allowing unlimited, highly secure notes to be added to nearly any ERP element. It features ''AES-256 encryption'', personal or shared keys, ''PBKDF2 password management'', and ''multi-company compatibility''.
This module enhances Dolibarr’s native notes functionality by allowing unlimited, highly secure notes to be added to nearly any ERP element. It features ''AES-256 encryption'', personal or shared keys, ''PBKDF2 password management'', and ''multi-company compatibility''.
[[File:NotePlus features en.jpg]]
[[File:NotePlus features en.jpg]]


== Unlimited Notes for Every Element ==
==Unlimited Notes for Every Element==
<br />
<br />


* Add an ''unlimited'' number of notes to each element.
*Add an ''unlimited'' number of notes to each element.
* Each note includes a ''title and content''.
*Each note includes a ''title and content''.
* The system logs the ''date and user'' of the last modification:
*The system logs the ''date and user'' of the last modification:


[[File:Noteplus 001 - Unlimited notes.png]]
[[File:Noteplus 001 - Unlimited notes.png]]


== Elements Supporting NotePlus Notes ==
==Elements Supporting NotePlus Notes==
<br />
<br />


* The "Note+" tab will appear in the following Dolibarr elements: ''Products, services, customers, suppliers, contacts, members, users, projects, contracts, quotes, customer orders, supplier orders, customer invoices, supplier invoices, calendar events, Bills of Materials (BOM), manufacturing orders, workstations, and tickets.''  
*The "Note+" tab will appear in the following Dolibarr elements: ''Products, services, customers, suppliers, contacts, members, users, projects, contracts, quotes, customer orders, supplier orders, customer invoices, supplier invoices, calendar events, Bills of Materials (BOM), manufacturing orders, workstations, and tickets.''
* Some of these elements (e.g., calendar events) do not have Dolibarr’s native "Private Note" or "Public Note" options:
*Some of these elements (e.g., calendar events) do not have Dolibarr’s native "Private Note" or "Public Note" options:


[[File:NotePlus 002 - Notes on Agenda event.png]]
[[File:NotePlus 002 - Notes on Agenda event.png]]


== Optional Note Encryption ==
==Optional Note Encryption==
<br />
<br />


* You can optionally encrypt note content.
*You can optionally encrypt note content.
* The module generates a random 256-bit key.
*The module generates a random 256-bit key.
* The system prompts the user for an "''unlock key''".
*The system prompts the user for an "''unlock key''".
* This key is not stored in the database.
*This key is not stored in the database.
* '''If lost or forgotten, encrypted data cannot be recovered.'''
*'''If lost or forgotten, encrypted data cannot be recovered.'''
* Adding encrypted notes is simple:
*Adding encrypted notes is simple:


(https://imasdeweb.com/UserFiles/Image/2025/003-encrypted-notes_en.gif)
(https://imasdeweb.com/UserFiles/Image/2025/003-encrypted-notes_en.gif)


* To access encrypted note content, only the unlock key is required:
*To access encrypted note content, only the unlock key is required:


[[File:NotePlus 004 - Decrypting note.png]]
[[File:NotePlus 004 - Decrypting note.png]]


== Personal Keys vs. Shared Keys ==
==Personal Keys vs. Shared Keys==
<br />
<br />


* Each user can create as many encryption keys as needed.
*Each user can create as many encryption keys as needed.
* Users can also create shared keys for team access.
*Users can also create shared keys for team access.
* When using personal keys: Only the creator can decrypt notes
*When using personal keys: Only the creator can decrypt notes
* When using shared keys: Any user with the key can decrypt notes.
*When using shared keys: Any user with the key can decrypt notes.
* Each user manages their own keys:
*Each user manages their own keys:


(https://imasdeweb.com/UserFiles/Image/2025/005-manage_encryption-keys_en.gif)
(https://imasdeweb.com/UserFiles/Image/2025/005-manage_encryption-keys_en.gif)
Line 49: Line 49:
'''Shared Note Considerations:'''
'''Shared Note Considerations:'''


* When a user marks a key as SHARED, others can use it to encrypt notes with the same unlock key, enabling secure collaboration.
*When a user marks a key as SHARED, others can use it to encrypt notes with the same unlock key, enabling secure collaboration.
* Only the key creator can modify or delete it (!!).
*Only the key creator can modify or delete it (!!).


== Technical Considerations ==
==Technical Considerations==




'''Secure Key Storage'''
'''Secure Key Storage'''


* Encryption keys are 256-bit (64 hex characters), generated using PHP’s `openssl_random_pseudo_bytes()` with a unique salt. Example: <code>e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855</code> <br />
*Encryption keys are 256-bit (64 hex characters), generated using PHP’s `openssl_random_pseudo_bytes()` with a unique salt. Example: <code>e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855</code> <br />
* The key is stored in the database encrypted with AES-256, using the user’s unlock key (which is typically weak). To strengthen it, the system applies PBKDF2 with 600,000 iterations and a unique salt—double the OWASP 2025 recommendation (!!).<br />
*The key is stored in the database encrypted with AES-256, using the user’s unlock key (which is typically weak). To strengthen it, the system applies PBKDF2 with 600,000 iterations and a unique salt—double the OWASP 2025 recommendation (!!).<br />
* Notes are encrypted using the 256-bit key also via AES-256. <br />⚠️ '''Performance Note:''' Encryption/decryption may add ''~0.5 seconds'' (depends on server power). <br />
*Notes are encrypted using the 256-bit key also via AES-256. <br />⚠️ '''Performance Note:''' Encryption/decryption may add ''~0.5 seconds'' (depends on server power). <br />


'''Encryption Recommendations'''
'''Encryption Recommendations'''
Line 65: Line 65:
While PBKDF2 hardening makes brute-force attacks difficult, we recommend:
While PBKDF2 hardening makes brute-force attacks difficult, we recommend:


# Avoid reusing keys—use different keys for different purposes to limit exposure.
#Avoid reusing keys—use different keys for different purposes to limit exposure.
# Use strong unlock keys—avoid short or dictionary-based passwords. Instead, use ''mixed case, numbers, and symbols''. If using words, make them a ''long, nonsensical phrase''.
#Use strong unlock keys—avoid short or dictionary-based passwords. Instead, use ''mixed case, numbers, and symbols''. If using words, make them a ''long, nonsensical phrase''.


'''Change Tracking'''
'''Change Tracking'''
Line 74: Line 74:
'''Multi-Company Compatibility'''
'''Multi-Company Compatibility'''


* Notes added to a company’s elements are **only visible within that company**.
*Notes added to a company’s elements are **only visible within that company**.
* Keys created by a user are **only accessible when working in that company**.
*Keys created by a user are **only accessible when working in that company**.


== Installation Process ==
==Installation Process==
<br />
<br />


# Go to Configuration → Modules.
#Go to Configuration → Modules.
# Navigate to the "Install External Module" tab and upload the module’s ZIP file.
#Navigate to the "Install External Module" tab and upload the module’s ZIP file.
# Return to the "Available Modules" tab.
#Return to the "Available Modules" tab.
# Filter by Origin: "External - IMASDEWEB".
#Filter by Origin: "External - IMASDEWEB".
# Activate the module.
#Activate the module.


[[File:NotePlus - Activate module.png]]
[[File:NotePlus - Activate module.png]]
[[Category:List of Modules]]

Revision as of 01:49, 28 December 2025

Features

This module enhances Dolibarr’s native notes functionality by allowing unlimited, highly secure notes to be added to nearly any ERP element. It features AES-256 encryption, personal or shared keys, PBKDF2 password management, and multi-company compatibility. NotePlus features en.jpg

Unlimited Notes for Every Element


  • Add an unlimited number of notes to each element.
  • Each note includes a title and content.
  • The system logs the date and user of the last modification:

Noteplus 001 - Unlimited notes.png

Elements Supporting NotePlus Notes


  • The "Note+" tab will appear in the following Dolibarr elements: Products, services, customers, suppliers, contacts, members, users, projects, contracts, quotes, customer orders, supplier orders, customer invoices, supplier invoices, calendar events, Bills of Materials (BOM), manufacturing orders, workstations, and tickets.
  • Some of these elements (e.g., calendar events) do not have Dolibarr’s native "Private Note" or "Public Note" options:

NotePlus 002 - Notes on Agenda event.png

Optional Note Encryption


  • You can optionally encrypt note content.
  • The module generates a random 256-bit key.
  • The system prompts the user for an "unlock key".
  • This key is not stored in the database.
  • If lost or forgotten, encrypted data cannot be recovered.
  • Adding encrypted notes is simple:

(003-encrypted-notes_en.gif)

  • To access encrypted note content, only the unlock key is required:

NotePlus 004 - Decrypting note.png

Personal Keys vs. Shared Keys


  • Each user can create as many encryption keys as needed.
  • Users can also create shared keys for team access.
  • When using personal keys: Only the creator can decrypt notes
  • When using shared keys: Any user with the key can decrypt notes.
  • Each user manages their own keys:

(005-manage_encryption-keys_en.gif)

Shared Note Considerations:

  • When a user marks a key as SHARED, others can use it to encrypt notes with the same unlock key, enabling secure collaboration.
  • Only the key creator can modify or delete it (!!).

Technical Considerations

Secure Key Storage

  • Encryption keys are 256-bit (64 hex characters), generated using PHP’s `openssl_random_pseudo_bytes()` with a unique salt. Example: e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
  • The key is stored in the database encrypted with AES-256, using the user’s unlock key (which is typically weak). To strengthen it, the system applies PBKDF2 with 600,000 iterations and a unique salt—double the OWASP 2025 recommendation (!!).
  • Notes are encrypted using the 256-bit key also via AES-256.
    ⚠️ Performance Note: Encryption/decryption may add ~0.5 seconds (depends on server power).

Encryption Recommendations

While PBKDF2 hardening makes brute-force attacks difficult, we recommend:

  1. Avoid reusing keys—use different keys for different purposes to limit exposure.
  2. Use strong unlock keys—avoid short or dictionary-based passwords. Instead, use mixed case, numbers, and symbols. If using words, make them a long, nonsensical phrase.

Change Tracking

Currently, only the **last modification time and user** are logged. A full **change log** may be added in the future if demand exists.

Multi-Company Compatibility

  • Notes added to a company’s elements are **only visible within that company**.
  • Keys created by a user are **only accessible when working in that company**.

Installation Process


  1. Go to Configuration → Modules.
  2. Navigate to the "Install External Module" tab and upload the module’s ZIP file.
  3. Return to the "Available Modules" tab.
  4. Filter by Origin: "External - IMASDEWEB".
  5. Activate the module.

NotePlus - Activate module.png