[FIX] I have improve the error message in procurement
[odoo/odoo.git] / addons / users_ldap / __openerp__.py
1 ##############################################################################
2 #
3 #    OpenERP, Open Source Management Solution
4 #    Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>).
5 #
6 #    This program is free software: you can redistribute it and/or modify
7 #    it under the terms of the GNU Affero General Public License as
8 #    published by the Free Software Foundation, either version 3 of the
9 #    License, or (at your option) any later version.
10 #
11 #    This program is distributed in the hope that it will be useful,
12 #    but WITHOUT ANY WARRANTY; without even the implied warranty of
13 #    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14 #    GNU Affero General Public License for more details.
15 #
16 #    You should have received a copy of the GNU Affero General Public License
17 #    along with this program.  If not, see <http://www.gnu.org/licenses/>.
18 #
19 ##############################################################################
20
21 {
22     "name" : "Authentication via LDAP",
23     "version" : "1.0",
24     "depends" : ["base"],
25     "images" : ["images/ldap_configuration.jpeg"],
26     "author" : "OpenERP SA",
27     "description": """
28 Adds support for authentication by LDAP server.
29 ===============================================
30 This module allows users to login with their LDAP username and
31 password, and will automatically create OpenERP users for them
32 on the fly.
33
34 **Note**: This module only work on servers who have Python's
35 ``ldap`` module installed.
36
37 Configuration
38 +++++++++++++
39 After installing this module, you need to configure the LDAP
40 parameters in the Configuration tab of the Company details.
41 Different companies may have different LDAP servers, as long
42 as they have unique usernames (usernames need to be unique in
43 OpenERP, even across multiple companies).
44
45 Anonymous LDAP binding is also supported (for LDAP servers
46 that allow it), by simpling keeping the LDAP user and password
47 empty in the LDAP configuration. This does **not** allow
48 anonymous authentication for users, it is only for the master
49 LDAP account that is used to verify if a user exists before
50 attempting to authenticate it.
51
52 Securing the connection with STARTTLS is available for LDAP
53 servers supporting it, by enabling the TLS option in the LDAP
54 configuration.
55
56 For further options configuring the LDAP settings, refer to the
57 ldap.conf manpage: manpage:`ldap.conf(5)`.
58
59 Security Considerations
60 +++++++++++++++++++++++
61 Users' LDAP passwords are never stored in the OpenERP database,
62 the LDAP server is queried whenever a user needs to be
63 authenticated. No duplication of the password occurs, and
64 passwords are managed in one place only.
65
66 OpenERP does not manage password changes in the LDAP, so
67 any change of password should be conducted by other means
68 in the LDAP directory directly (for LDAP users).
69
70 It is also possible to have local OpenERP users in the
71 database along with LDAP-authenticated users (the Administrator
72 account is one obvious example).
73
74 Here is how it works:
75
76   * The system first attempts to authenticate users against
77     the local OpenERP database ;
78   * if this authentication fails (for example because the
79     user has no local password), the system then attempts
80     to authenticate against LDAP ;
81
82 As LDAP users have blank passwords by default in the local
83 OpenERP database (which means no access), the first step
84 always fails and the LDAP server is queried to do the
85 authentication.
86
87 Enabling STARTTLS ensures that the authentication query to the
88 LDAP server is encrypted.
89
90 User Template
91 +++++++++++++
92 In the LDAP configuration on the Company form, it is possible to
93 select a *User Template*. If set, this user will be used as
94 template to create the local users whenever someone authenticates
95 for the first time via LDAP authentication.
96 This allows pre-setting the default groups and menus of the
97 first-time users.
98
99 **Warning**: if you set a password for the user template,
100 this password will be assigned as local password for each new
101 LDAP user, effectively setting a *master password* for these
102 users (until manually changed). You usually do not want this.
103 One easy way to setup a template user is to login once with
104 a valid LDAP user, let OpenERP create a blank local user with the
105 same login (and a blank password), then rename this new user
106 to a username that does not exist in LDAP, and setup its
107 groups the way you want.
108
109 Interaction with base_crypt
110 +++++++++++++++++++++++++++
111 The base_crypt module is not compatible with this module, and
112 will disable LDAP authentication if installed at the same time.
113
114     """,
115
116
117     "website" : "http://www.openerp.com",
118     "category" : "Tools",
119     "data" : [
120         "users_ldap_view.xml",
121         "user_ldap_installer.xml",
122         "security/ir.model.access.csv",
123     ],
124     "auto_install": False,
125     "installable": True,
126     "certificate" : "001141446349334700221",
127     "external_dependencies" : {
128         'python' : ['ldap'],
129     }
130 }
131 # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
132