Security information: Difference between revisions

m
Added a note about API explorer not working with AcceptPathInfo off
mNo edit summary
Tag: 2017 source edit
m (Added a note about API explorer not working with AcceptPathInfo off)
 
(18 intermediate revisions by one other user not shown)
Line 7: Line 7:
<!-- END interlang links -->
<!-- END interlang links -->


[[Category:Admin]]
[[Category:Admin_en]]
[[Category:Admin_en]]
{{TemplateDocUser}}
{{TemplateDocDevEn}}


This page is an entry point to the various information relating to Dolibarr ERP CRM in relation to security.
This page is an entry point to the various information relating to Dolibarr ERP CRM in relation to security.
Line 15: Line 16:
=[[File:securite.png]] Security Alerts=
=[[File:securite.png]] Security Alerts=


To receive all official alerts about known security vulnerabilities on Dolibarr project (aggregation of official published CVE, Private Vulnerability Disclosure, project issues) you can:
To list or receive all official alerts about known security vulnerabilities (aggregation of official published CVE, Private Vulnerability Disclosure, project issues) on Dolibarr project you can:
* look at the section "'''Security alerts'''" available on this page https://cti.dolibarr.org,
* or subscribe to the RSS feed at https://cti.dolibarr.org/index-security.rss (for example with the Android application [https://f-droid.org/packages/com.nononsenseapps.feeder/ Feeder]) if you need to receive or read alert in real time on your smartphone.


* If you want to also receive security alerts not yet known by the project team, and published in the international CVE database, you can subscribe to a CVE alert service. A good service for example https://opencve.io).
*look at the section "'''Security alerts'''" available on this page https://cti.dolibarr.org,
*or subscribe to the RSS feed at https://cti.dolibarr.org/index-security.rss if you need to receive or read alert in real time on your smartphone (for example with the Android application [https://f-droid.org/packages/com.nononsenseapps.feeder/ Feeder]).
 
*If you want to also receive security alerts not yet known by the project team, and published in the international CVE database, you can subscribe to a CVE alert service, for example https://opencve.io).


=[[File:art.png]] Security Features=
=[[File:art.png]] Security Features=
Dolibarr implements several security features to match best practices rules related to security.
Dolibarr implements several security features to match best practices rules related to security.
   
   
This is a list of main security features you can find :
This is a list of main security features you can find<span> </span>:




'''Encryption'''
==Encryption==


*Passwords or security keys data are encrypted in database <sup>[*7]</sup> <sup>[*8]</sup>.
*Passwords or security keys data are encrypted in database <sup>[*7]</sup> <sup>[*8]</sup>.
Line 70: Line 72:




'''Hacks and cracks'''
==Features Anti Hacks and cracks==


*Works with register_globals on or off (off highly recommended) <sup>[*2]</sup>.
*Works with PHP register_globals on or off (off highly recommended) <sup>[*2]</sup>.
*Works with PHP safe_mode on or off (on recommended) <sup>[*3]</sup>.
*Works with PHP safe_mode on or off (on recommended) <sup>[*3]</sup>.
*Production mode to disable any technical information leakage like debug, error stacktrace, version informations (See [[Configuration_file|configuration file]]) <sup>[*6]</sup>.
*Production mode to disable any technical information leakage like debug, error stacktrace, version informations (See [[Configuration_file|configuration file]]) <sup>[*6]</sup>.
*Protection against SQL injection. Protected by an Internal WAF, and unit test to check database good practice for escapement. <sup>[*2]</sup>.
*WAF: Protection against SQL injection. Protected by an Internal WAF, and unit test to check database good practice for escapement. <sup>[*2]</sup>.
*Protection against XSS injection (Cross Site Scripting). Protected by an internal WAF and web page headers. <sup>[*1]</sup>.
*WAF: Protection against XSS injection (Cross Site Scripting). Protected by an internal WAF and web page headers. <sup>[*1]</sup>.
*Protection against SSRF. All access to an URL uses the getURLContent() method into core/lib/geturl.lib.php that bring this protection.
*Protection against SSRF. All access to an URL uses the getURLContent() method into core/lib/geturl.lib.php that brings this protection.
*Protection against CSRF (Cross Site Request Forgery). Protected by an internal WAF and a token system. <sup>[*5]</sup>.
*Protection against CSRF (Cross Site Request Forgery). Protected by an internal WAF and a token system (with several level of renewal policies, by session or by page). <sup>[*5]</sup>.
*Application features for quotas (upload limits, file extensions, file sizes, etc.)


Note that it is also recommended to protect your web server by disabling the Apache option
Note that it is also recommended to protect your web server by disabling the Apache option
<syntaxhighlight lang="ini">
<syntaxhighlight lang="ini">
AcceptPathInfo Off
</syntaxhighlight> - Note that the API explorer does not work with <syntaxhighlight lang="ini">
AcceptPathInfo Off
AcceptPathInfo Off
</syntaxhighlight>
</syntaxhighlight>




'''Pages and files access'''
==Pages and files access==


*Pages and contents are protected by centralized entry code to check permissions (granted on groups or users for each functional module) <sup>[*4]</sup> <sup>[*10]</sup>.
*Pages and contents are protected by centralized entry code to check permissions (granted on groups or users for each functional module) <sup>[*4]</sup> <sup>[*10]</sup>.
Line 93: Line 98:




'''Login protection'''
==Login protection==


*Delay anti brute force cracking on login page <sup>[*7]</sup>. Currently this delay is fixed (May be exponential with tries in a future version).
*Delay anti brute force cracking on login page <sup>[*7]</sup>. Currently this delay is fixed (May be exponential with tries in a future version).
Line 100: Line 105:
*No passwords in logs, even in technical logs <sup>[*7]</sup>.
*No passwords in logs, even in technical logs <sup>[*7]</sup>.
*Internal logger to save permanently all Dolibarr events about user's administration and successful or failed logins or administration events (like user or group or permission changes).
*Internal logger to save permanently all Dolibarr events about user's administration and successful or failed logins or administration events (like user or group or permission changes).
*Can output a log record into a log file (module Debug Log must be enabled with at least level 5-LOG_NOTICE on production server, higher on development server) after success or failed login attempt so you can add a fail2ban rule to lock brute force cracking. You can check record with syntax :
*Can output a log record into a log file (module Debug Log must be enabled with at least level 5-LOG_NOTICE on production server, higher on development server) after success or failed login attempt so you can add a fail2ban rule to lock brute force cracking. You can check record with syntax<span> </span>:


  "YYYY-MM-DD HH:MM:SS (ERROR|NOTICE|INFO|DEBUG)    IP functions_dolibarr::check_user_password_.* Authentication KO"
  "YYYY-MM-DD HH:MM:SS (ERROR|NOTICE|INFO|DEBUG)    IP functions_dolibarr::check_user_password_.* Authentication KO"
Line 106: Line 111:




'''Viruses'''
==Viruses==


*Possibility to run an external anti-virus on every uploaded files <sup>[*3]</sup>.
*Possibility to run an external anti-virus on every uploaded files <sup>[*3]</sup>.




'''Security Information Center'''
==Security Information Center==


*From version 14, you will find into menu Home - Admin tools - Security, a security information center that report you all recommandations done and to do related to your installation.
*From version 14, you will find into menu Home - Admin tools - Security, a security information center that report you all recommandations done and to do related to your installation.




'''A CTI for security'''
==A CTI for security==


A continuous integration platform run Security unit tests and static code analysis on each modification of code.
A continuous integration platform run Security unit tests and static code analysis on each modification of code.




'''A footprint for each version'''
==A footprint for each version==
 
Our release process bring each version with a footprint file (also available online) to validate all files of your local installation and detect any change on any file with the integrated tool available in menu Home - Administration - Security.


Our release process bring each version with a footprint file (also available online) to validate all files of your local installation.


==DOS and Brute force rate Mitigation==


'''DOS and Brute force rate Mitigation'''
*Embedded AntiDOS features with quota on public action per IP.


The project provide examples of some fail2ban rules to block brute force attempts or abusive access on login page, password forgotten page and on any public pages. See https://github.com/Dolibarr/dolibarr/tree/develop/dev/setup/fail2ban
*The project provide also examples of some fail2ban rules to block brute force attempts or abusive access on login page, password forgotten page and on any public pages. See https://github.com/Dolibarr/dolibarr/tree/develop/dev/setup/fail2ban




'''OpenSourceSSF'''
==OpenSourceSSF==


Dolibarr conforms to the Best Practices defined by the OpenSourceSSF: https://bestpractices.coreinfrastructure.org/projects/5521
Dolibarr conforms to the Best Practices defined by the OpenSourceSSF: https://bestpractices.coreinfrastructure.org/projects/5521
Line 140: Line 147:


In most cases, security reports are processed in few days.
In most cases, security reports are processed in few days.
=[[File:art.png]] Bug Bounty and VDP Campaigns=
Bug bounty campaigns are regularly conducted by the project and funded by the Dolibarr Association. These campaigns are private VDP (Vulnerability Disclosure Programs) managed by specialized partners (Examples: https://yogosha.com, https://huntr.com/).
Fixes from these campaigns are published within 15 days, as with any other public vulnerability report (this is the timeframe observed by the community project; contact a Dolibarr Preferred Partner if you require a longer contractual timeframe).




----
----
<sup>(*X)</sup> This solution is part of protection used to solve vulnerabilities classified by the [http://www.owasp.org/index.php/Top_10_2007 OWASP Top Ten 2007] at range number X. Value for position X may have been changed since.
<sup>(*X)</sup> This solution is part of protection used to solve vulnerabilities classified by the [http://www.owasp.org/index.php/Top_10_2007 OWASP Top Ten 2007] at range number X. Value for position X may have been changed since.