[MERGE] lp881356
[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     'complexity': "expert",
28     "description": """
29 Adds support for authentication by LDAP server.
30 ===============================================
31 This module allows users to login with their LDAP username and
32 password, and will automatically create OpenERP users for them
33 on the fly.
34
35 **Note**: This module only work on servers who have Python's
36 ``ldap`` module installed.
37
38 Configuration
39 +++++++++++++
40 After installing this module, you need to configure the LDAP
41 parameters in the Configuration tab of the Company details.
42 Different companies may have different LDAP servers, as long
43 as they have unique usernames (usernames need to be unique in
44 OpenERP, even across multiple companies).
45
46 Anonymous LDAP binding is also supported (for LDAP servers
47 that allow it), by simpling keeping the LDAP user and password
48 empty in the LDAP configuration. This does **not** allow
49 anonymous authentication for users, it is only for the master
50 LDAP account that is used to verify if a user exists before
51 attempting to authenticate it.
52
53 Securing the connection with STARTTLS is available for LDAP
54 servers supporting it, by enabling the TLS option in the LDAP
55 configuration.
56
57 For further options configuring the LDAP settings, refer to the
58 ldap.conf manpage :manpage:`ldap.conf(5)`.
59
60 Security Considerations
61 +++++++++++++++++++++++
62 Users' LDAP passwords are never stored in the OpenERP database,
63 the LDAP server is queried whenever a user needs to be
64 authenticated. No duplication of the password occurs, and
65 passwords are managed in one place only.
66
67 OpenERP does not manage password changes in the LDAP, so
68 any change of password should be conducted by other means
69 in the LDAP directory directly (for LDAP users).
70
71 It is also possible to have local OpenERP users in the
72 database along with LDAP-authenticated users (the Administrator
73 account is one obvious example).
74
75 Here is how it works:
76
77   * The system first attempts to authenticate users against
78     the local OpenERP database ;
79   * if this authentication fails (for example because the
80     user has no local password), the system then attempts
81     to authenticate against LDAP ;
82
83 As LDAP users have blank passwords by default in the local
84 OpenERP database (which means no access), the first step
85 always fails and the LDAP server is queried to do the
86 authentication.
87
88 Enabling STARTTLS ensures that the authentication query to the
89 LDAP server is encrypted.
90
91 User Template
92 +++++++++++++
93 In the LDAP configuration on the Company form, it is possible to
94 select a *User Template*. If set, this user will be used as
95 template to create the local users whenever someone authenticates
96 for the first time via LDAP authentication.
97 This allows pre-setting the default groups and menus of the
98 first-time users.
99
100 **Warning**: if you set a password for the user template,
101 this password will be assigned as local password for each new
102 LDAP user, effectively setting a *master password* for these
103 users (until manually changed). You usually do not want this.
104 One easy way to setup a template user is to login once with
105 a valid LDAP user, let OpenERP create a blank local user with the
106 same login (and a blank password), then rename this new user
107 to a username that does not exist in LDAP, and setup its
108 groups the way you want.
109
110 Interaction with base_crypt
111 +++++++++++++++++++++++++++
112 The base_crypt module is not compatible with this module, and
113 will disable LDAP authentication if installed at the same time.
114
115     """,
116
117
118     "website" : "http://www.openerp.com",
119     "category" : "Tools",
120     "data" : [
121         "users_ldap_view.xml",
122         "user_ldap_installer.xml",
123         "security/ir.model.access.csv",
124     ],
125     "auto_install": False,
126     "installable": True,
127     "certificate" : "001141446349334700221",
128     "external_dependencies" : {
129         'python' : ['ldap'],
130     }
131 }
132 # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
133