Debian Codegraph @

doc/sources/admin/applications/obm.rst

raw
1 OBM
2 ===
3
4 |image0|
5
6 Presentation
7 ------------
8
9 `OBM <http://obm.org>`__ is enterprise-class messaging and collaboration
10 platform for workgroup or enterprises with many thousands users. OBM
11 includes Groupware, messaging server, CRM, LDAP, Windows Domain,
12 smartphone and PDA synchronization…
13
14 OBM is shipped with a LL::NG plugin with these features:
15
16 - SSO on OBM web interface
17 - Logout
18 - User provisioning (account auto creation at first connection)
19
20 Configuration
21 -------------
22
23 .. _obm-1:
24
25 OBM
26 ~~~
27
28 To enable LL::NG authentication plugin, go in ``/etc/obm/obm_conf.inc``:
29
30 .. code-block:: php
31
32 $auth_kind = 'LemonLDAP';
33
34 $lemonldap_config = Array(
35 "auto_update" => true,
36 "auto_update_force_user" => true,
37 "auto_update_force_group" => false,
38 "url_logout" => "https://OBMURL/logout",
39 "server_ip_address" => "localhost",
40 "server_ip_check" => false,
41 "debug_level" => "NONE",
42 // "debug_header_name" => "HTTP_OBM_UID",
43 // "group_header_name" => "HTTP_OBM_GROUPS",
44 "headers_map" => Array(
45 //"userobm_gid" => "HTTP_OBM_GID",
46 //"userobm_domain_id" => ,
47 "userobm_login" => "HTTP_OBM_UID",
48 "userobm_password" => "HTTP_OBM_USERPASSWORD",
49 //"userobm_password_type" => ,
50 "userobm_perms" => "HTTP_OBM_PERMS",
51 //"userobm_kind" => ,
52 "userobm_lastname" => "HTTP_OBM_SN",
53 "userobm_firstname" => "HTTP_OBM_GIVENNAME",
54 // "userobm_title" => "HTTP_OBM_TITLE",
55 "userobm_email" => "HTTP_OBM_MAIL",
56 "userobm_datebegin" => "HTTP_OBM_DATEBEGIN",
57 //"userobm_account_dateexp" => ,
58 //"userobm_delegation_target" => ,
59 //"userobm_delegation" => ,
60 "userobm_description" => "HTTP_OBM_DESCRIPTION",
61 //"userobm_archive" => ,
62 //"userobm_hidden" => ,
63 //"userobm_status" => ,
64 //"userobm_local" => ,
65 //"userobm_photo_id" => ,
66 "userobm_phone" => "HTTP_OBM_TELEPHONENUMBER",
67 //"userobom_phone2" => ,
68 //"userobm_mobile" => ,
69 "userobm_fax" => "HTTP_OBM_FACSIMILETELEPHONENUMBER",
70 //"userobm_fax2" => ,
71 "userobm_company" => "HTTP_OBM_O",
72 //"userobm_direction" => ,
73 "userobm_service" => "HTTP_OBM_OU",
74 "userobm_address1" => "HTTP_OBM_POSTALADDRESS",
75 //"userobm_address2" => ,
76 //"userobm_address3" => ,
77 "userobm_zipcode" => "HTTP_OBM_POSTALCODE",
78 "userobm_town" => "HTTP_OBM_L",
79 "userobm_zipcode" => "HTTP_OBM_POSTALCODE",
80 "userobm_town" => "HTTP_OBM_L",
81 //"userobm_expresspostal" => ,
82 //"userobm_host_id" => ,
83 //"userobm_web_perms" => ,
84 //"userobm_web_list" => ,
85 //"userobm_web_all" => ,
86 //"userobm_mail_perms" => ,
87 //"userobm_mail_ext_perms" => ,
88 //"userobm_mail_server_id" => ,
89 //"userobm_mail_server_hostname" => ,
90 "userobm_mail_quota" => "HTTP_OBM_MAILQUOTA",
91 //"userobm_nomade_perms" => ,
92 //"userobm_nomade_enable" => ,
93 //"userobm_nomade_local_copy" => ,
94 //"userobm_email_nomade" => ,
95 //"userobm_vacation_enable" => ,
96 //"userobm_vacation_datebegin" => ,
97 //"userobm_vacation_dateend" => ,
98 //"userobm_vacation_message" => ,
99 //"userobm_samba_perms" => ,
100 //"userobm_samba_home" => ,
101 //"userobm_samba_home_drive" => ,
102 //"userobm_samba_logon_script" => ,
103 // ---- Unused values ? ----
104 "userobm_ext_id" => "HTTP_OBM_SERIALNUMBER",
105 //"userobm_system" => ,
106 //"userobm_nomade_datebegin" => ,
107 //"userobm_nomade_dateend" => ,
108 //"userobm_location" => ,
109 //"userobm_education" => ,
110 ),
111 );
112
113 Parameters:
114
115 - **url_logout**: URL used by OBM to logout, will be caught by LL::NG
116 - **headers_map**: map OBM internal field to LL::NG header
117
118 Edit also OBM configuration to enable LL::NG Handler:
119
120 - For Apache:
121
122 .. code-block:: apache
123
124 <VirtualHost *:80>
125 ServerName obm.example.com
126
127 # SSO protection
128 PerlHeaderParserHandler Lemonldap::NG::Handler
129
130 DocumentRoot /usr/share/obm/php
131
132 ...
133
134 </VirtualHost>
135
136 - For Nginx:
137
138 .. code-block:: nginx
139
140 server {
141 listen 80;
142 server_name obm.example.com;
143 root /usr/share/obm/php;
144 # Internal authentication request
145 location = /lmauth {
146 internal;
147 include /etc/nginx/fastcgi_params;
148 fastcgi_pass unix:/var/run/llng-fastcgi-server/llng-fastcgi.sock;
149 # Drop post data
150 fastcgi_pass_request_body off;
151 fastcgi_param CONTENT_LENGTH "";
152 # Prevent attacks on older Nginx versions (<1.29.5)
153 fastcgi_param HTTP_HOST $host;
154 # Keep original request (LL::NG server will receive /lmauth)
155 fastcgi_param X_ORIGINAL_URI $original_uri;
156 }
157
158 # Client requests
159 location ~ \.php$ {
160 auth_request /lmauth;
161 set $original_uri $uri$is_args$args;
162 auth_request_set $lmremote_user $upstream_http_lm_remote_user;
163 auth_request_set $lmlocation $upstream_http_location;
164 error_page 401 $lmlocation;
165 try_files $uri $uri/ =404;
166
167 ...
168
169 include /etc/lemonldap-ng/nginx-lua-headers.conf;
170 }
171 location / {
172 try_files $uri $uri/ =404;
173 }
174 }
175
176 LL::NG
177 ~~~~~~
178
179 Attributes and macros
180 ^^^^^^^^^^^^^^^^^^^^^
181
182 You will need to collect all attributes needed to create a user in OBM,
183 this includes:
184
185 - First name
186 - Last name
187 - Login
188 - Mail
189 - ...
190
191 To add these attributes, go in Manager, ``Variables`` »
192 ``Exported Variables``.
193
194
195 .. attention::
196
197 If you plan to forward user's password to OBM, then you
198 have to :doc:`keep the password in session<../passwordstore>`.
199
200 You may also create these macros to manage OBM administrator account
201 (``Variables`` » ``Macros``):
202
203 ===== ============================================================================
204 field value
205 ===== ============================================================================
206 uidR ``($uid =~ /^admin0/i)[0] ? "admin0\@global.virt" : $uid``
207 mailR ``($uid =~ /admin0/i)[0] ? "" : ($mail =~ / ([ @]+)/)[0] . "\@example.com"``
208 ===== ============================================================================
209
210 Virtual host
211 ^^^^^^^^^^^^
212
213 Create OBM virtual host (for example obm.example.com) in LL::NG
214 configuration: ``Virtual Hosts`` » ``New virtual host``.
215
216 Then edit rules and headers.
217
218 Rules
219 '''''
220
221 Define at least:
222
223 - **Default rule**: who can access to the application
224 - **Logout rule**: catch OBM logout
225 - **Exceptions**: allow anonymous access for specific URLs (connectors,
226 etc.)
227
228 ============================= =============================
229 field value
230 ============================= =============================
231 ^/logout logout_sso
232 ^/obm-sync unprotect
233 ^/minig unprotect
234 ^/Microsoft-Server-ActiveSync unprotect
235 ^/caldav unprotect
236 default accept (or whatever you want)
237 ============================= =============================
238
239 Headers
240 '''''''
241
242 Define headers used in OBM mapping, for example:
243
244 ================ ==========
245 field valeur
246 ================ ==========
247 OBM_GIVENNAME $givenName
248 OBM_GROUPS $groups
249 OBM_UID $uidR
250 OBM_MAIL $mailR
251 OBM_USERPASSWORD $_password
252 ================ ==========
253
254 Other
255 ^^^^^
256
257 Do not forget to add OBM in :doc:`applications menu<../portalmenu>`.
258
259 .. |image0| image:: /applications/obm_logo.png
260 :class: align-center
261