Debian Codegraph @

doc/sources/admin/applications/sympa.rst

raw
1 Sympa
2 =====
3
4 |image0|
5
6 Presentation
7 ------------
8
9 `Sympa <http://www.sympa.org>`__ is a mailing list manager.
10
11 To configure SSO with Sympa, you have the choice between:
12 * CAS
13 * **Magic authentication**: a special SSO URL is protected by LL::NG, Sympa will display a button for users who wants to use this feature.
14
15 We recommend to use CAS.
16
17 CAS
18 ---
19
20
21 Sympa configuration
22 ~~~~~~~~~~~~~~~~~~~
23
24 Edit the file "auth.conf", for example:
25
26 ::
27
28 vi /etc/sympa/auth.conf
29
30 And fill it:
31
32 ::
33
34 cas
35 base_url https://auth.example.com/cas
36 non_blocking_redirection on
37 auth_service_name SSO
38 ldap_host ldap.example.com:389
39 ldap_get_email_by_uid_filter (uid=[uid])
40 ldap_timeout 7
41 ldap_suffix dc=example,dc=com
42 ldap_scope sub
43 ldap_email_attribute mail
44
45 Restart services:
46
47 ::
48
49 service sympa restart
50 service apache2 restart
51
52 See also `official documentation <https://sympa-community.github.io/manual/customize/cas.html>`__
53
54 LemonLDAP::NG configuration
55 ~~~~~~~~~~~~~~~~~~~~~~~~~~~
56
57 Declare CAS application in the configuration, register the service URL.
58
59 No attributes are needed.
60
61
62 Magic authentication
63 --------------------
64
65
66 .. tip::
67
68 Since LL::NG 1.9, old Auto-Login feature has been
69 removed since it works only with Sympa-5 which has been deprecated
70
71
72 Sympa configuration
73 ~~~~~~~~~~~~~~~~~~~
74
75 Edit the file "auth.conf", for example:
76
77 ::
78
79 vi /etc/sympa/auth.conf
80
81 And fill it:
82
83 ::
84
85 generic_sso
86 service_name Centralized auth service
87 service_id lemonldapng
88 email_http_header HTTP_MAIL
89 netid_http_header HTTP_AUTH_USER
90 internal_email_by_netid 1
91 logout_url https://auth.example.com/?logout=1
92
93
94 .. tip::
95
96 You can also disable internal Sympa authentication to keep
97 only LemonLDAP::NG by removing user_table paragraph
98
99 Note that if you use FastCGI, you must restart Apache to enable changes.
100
101
102 You can also use <portal>?logout=1 as logout_url to remove LemonLDAP::NG
103 session when "disconnect" is chosen.
104
105 Sympa virtual host
106 ~~~~~~~~~~~~~~~~~~
107
108 Configure Sympa virtual host like other
109 :doc:`protected virtual host<../configvhost>` but protect only magic
110 authentication URL.
111
112
113 .. tip::
114
115 The location URL end is based on the ``service_id`` defined in
116 Sympa apache configuration.
117
118 - For Apache:
119
120 .. code-block:: apache
121
122 <VirtualHost *:80>
123 ServerName sympa.example.com
124
125 <Location /wws/sso_login/lemonldapng>
126 PerlHeaderParserHandler Lemonldap::NG::Handler::ApacheMP2
127 </Location>
128
129 ...
130
131 </VirtualHost>
132
133 - For Nginx:
134
135 .. code-block:: nginx
136
137 server {
138 listen 80;
139 server_name sympa.example.com;
140 root /path/to/application;
141 # Internal authentication request
142 location = /lmauth {
143 internal;
144 include /etc/nginx/fastcgi_params;
145 fastcgi_pass unix:/var/run/llng-fastcgi-server/llng-fastcgi.sock;
146 # Drop post data
147 fastcgi_pass_request_body off;
148 fastcgi_param CONTENT_LENGTH "";
149 # Prevent attacks on older Nginx versions (<1.29.5)
150 fastcgi_param HTTP_HOST $host;
151 # Keep original request (LL::NG server will receive /lmauth)
152 fastcgi_param X_ORIGINAL_URI $original_uri;
153 }
154
155 # Client requests
156 location /wws/sso_login/lemonldapng {
157 auth_request /lmauth;
158 set $original_uri $uri$is_args$args;
159 auth_request_set $lmremote_user $upstream_http_lm_remote_user;
160 auth_request_set $lmlocation $upstream_http_location;
161 error_page 401 $lmlocation;
162 try_files $uri $uri/ =404;
163
164 ...
165
166 include /etc/lemonldap-ng/nginx-lua-headers.conf;
167 }
168 location / {
169 try_files $uri $uri/ =404;
170 }
171 }
172
173 Sympa virtual host in Manager
174 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
175
176 Go to the Manager and :doc:`create a new virtual host<../configvhost>`
177 for Sympa.
178
179 Configure the :ref:`access rules<rules>` and define
180 the following :ref:`headers<headers>`:
181
182 - Auth-User
183 - Mail
184
185 .. |image0| image:: /applications/sympa_logo.png
186 :class: align-center
187