31,003
edits
Tag: 2017 source edit |
|||
| Line 1: | Line 1: | ||
=Authentication setup in Dolibarr= | |||
= Authentication setup in Dolibarr = | |||
There is different solutions to be authenticated with Dolibarr. You can set the selected authentication method into the file '''htdocs/conf/conf.php''' in the parameter '''$dolibarr_authentication_mode'''. This is a list of available values: | There is different solutions to be authenticated with Dolibarr. You can set the selected authentication method into the file '''htdocs/conf/conf.php''' in the parameter '''$dolibarr_authentication_mode'''. This is a list of available values: | ||
* dolibarr | *dolibarr | ||
* http | *http | ||
* ldap | *ldap | ||
* forceuser | *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 | 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 | ||
| Line 20: | Line 19: | ||
Let's have a look at each available method: | Let's have a look at each available method: | ||
= | =Description of available authentication modes= | ||
== dolibarr == | ==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). | 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 == | ==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''' + '''mod_authn_file''' plugin of Apache). | 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''' + '''mod_authn_file''' plugin of Apache). | ||
| Line 34: | Line 33: | ||
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. | 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 == | ==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. | If you set the authentication mode to LDAP, the test of the validity of your login and password are done using a LDAP database. | ||
| Line 44: | Line 43: | ||
<br /> | <br /> | ||
== forceuser == | ==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''' | 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''' | ||
| Line 52: | Line 51: | ||
<br /> | <br /> | ||
== googleauth == | ==googleauth== | ||
This method is still in development and is not yet available | This method is still in development and is not yet available | ||
<br /> | <br /> | ||
== openid == | ==openid== | ||
This method is not yet available and still in development. | This method is not yet available and still in development. | ||
| Line 62: | Line 61: | ||
However, if you need to connect using OpenID, you can already do it using the following solution: | 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 === | ===Connect to dolibarr using Openid and the HTTP Basic of Apache=== | ||
The idea is to use two elements: | The idea is to use two elements: | ||
* The auth_openidc plugin for Apache | |||
* Dolibarr HTTP authentication. | *The auth_openidc plugin for Apache | ||
*Dolibarr HTTP authentication. | |||
The procedure will therefore require Dolibarr installed with Apache and the apache module https://github.com/zmartzone/mod_auth_openidc. The latter is often directly available on Linux via a package manager command. | The procedure will therefore require Dolibarr installed with Apache and the apache module https://github.com/zmartzone/mod_auth_openidc. The latter is often directly available on Linux via a package manager command. | ||