Authentication, SSO and SSL

From Dolibarr ERP CRM Wiki
Revision as of 11:19, 29 December 2022 by Eldy (talk | contribs) (→‎forceuser)
Jump to navigation Jump to search


Authentication setup in Dolibarr

There is different solutions to be authenticated with Dolibarr. You can find the selected method into the htdocs/conf/conf.php file into the parameter $dolibarr_authentication_mode. This is a list of available values:

  • dolibarr
  • http
  • ldap
  • forceuser
  • ...

You can combine several methods (some combinations are however technically not compatible). If you use several method (separated by a coma), you will try to authenticate using the first method and if it fails, the next method will be used. For example, if you set

$dolibarr_authentication_mode="ldap,dolibarr"

the system will try to authenticate using the LDAP database and if it fails it will try to login using the internal Dolibarr login/password

Each authentication mode may have complementary parameters (also into htdocs/conf/conf.php file) to have them working. Let's have a look at each available method:

The different authentication modes

dolibarr

With this method, the login and pass you entered on login page will be compared to the login and the hashed password saved into the Dolibarr database (Table llx_user).

http

You can set the authentication mode to http if you Dolibarr web application is protected by an Apache http basic authentication form. The login/pass are stored into the file used by the HTTP Basic system to store passwords (it is often a file called .htpasswd if you used the mod_auth_basic plugin of Apache).

Note that the user must also exists as a existing user into the Dolibarr user database. Also the date of validity of this user must be valid.

ldap

If you set the authentication mode to LDAP, the test of the validity of your login and password are done using a LDAP database.

Note that the user must also exists as an existing user into the Dolibarr user database. Also the date of validity of this user must be valid.

forceuser

When this method is used, there is no need to enter a login or password. No login page is show. The user will be automatically set to the one defined into the variable $dolibarr_auto_user saved into htdocs/conf/conf.php

This mode is used only on development platforms. For example on an instance used to make demo or automated tests.

googleauth

This method is still in development and is not yet available

openid

This method is not yet available and still in development.


However, if you need to connect using OpenID, you can already do it using the following solution:

Connect to dolibarr using Openid and the HTTP Basic of Apache

TODO...