Debian Codegraph @

doc/sources/admin/applications/liferay.rst

raw
1 Liferay
2 =======
3
4 |image0|
5
6 Presentation
7 ------------
8
9 `Liferay <http://www.liferay.com/>`__ is an enterprise portal.
10
11 Liferay can use LL::NG as an SSO provider but you have to manage how
12 users are created:
13
14 - By hand in Liferay administration screens
15 - Imported from an LDAP directory
16
17 Of course, integration will be full if you use the LDAP directory as
18 users backend for LL::NG and Liferay.
19
20
21 .. attention::
22
23 If the user is not created, or can not be created via
24 LDAP import, the connection to Liferay will be refused. With LDAP,
25 login, mail, first name and last name are required attributes. If one is
26 missing, the user is not created.
27
28 This documentation just explains how to set up the SSO part. Please
29 refer to Liferay documentation to enable LDAP provisionning.
30
31 Configuration
32 -------------
33
34 Liferay administration
35 ~~~~~~~~~~~~~~~~~~~~~~
36
37 Access to Liferay (first time):
38
39 |image1|
40
41 Login as administrator:
42
43 |image2|
44
45 Go to ``My Account``:
46
47 |image3|
48
49 Go to ``Portal`` » ``Settings``:
50
51 |image4|
52
53 Go to ``Configuration`` » ``Authentication``:
54
55 |image5|
56
57 In ``General``, fill at least the following information:
58
59 - **How do users authenticate?**: by login
60
61
62 .. tip::
63
64 We advice to deactivate other options, cause users will use
65 LL::NG portal to modify or reset their password.
66
67 |image6|
68
69
70 .. attention::
71
72 You need to activate LDAP authentication, else SSO
73 authentication will not work. Do this in the control panel or in the
74 configuration file:
75
76 ::
77
78 ldap.auth.enabled=true
79
80
81
82 Then use the ``SiteMinder`` tab to configure SSO:
83
84 - **Enabled**: Yes
85 - **Import from LDAP**: Yes (see :doc:`presentation<>`)
86 - **User Header**: Auth-User (case sensitive)
87
88 |image7|
89
90
91 .. attention::
92
93 Do not forget to save your changes!
94
95 Liferay virtual host
96 ~~~~~~~~~~~~~~~~~~~~
97
98 Configure Liferay virtual host like other
99 :doc:`protected virtual host<../configvhost>`.
100
101 - For Apache:
102
103 .. code-block:: apache
104
105 <VirtualHost *:80>
106 ServerName liferay.example.com
107
108 PerlHeaderParserHandler Lemonldap::NG::Handler
109
110 ...
111
112 </VirtualHost>
113
114 - For Nginx:
115
116 .. code-block:: nginx
117
118 server {
119 listen 80;
120 server_name liferay.example.com;
121 root /path/to/application;
122 # Internal authentication request
123 location = /lmauth {
124 internal;
125 include /etc/nginx/fastcgi_params;
126 fastcgi_pass unix:/var/run/llng-fastcgi-server/llng-fastcgi.sock;
127 # Drop post data
128 fastcgi_pass_request_body off;
129 fastcgi_param CONTENT_LENGTH "";
130 # Prevent attacks on older Nginx versions (<1.29.5)
131 fastcgi_param HTTP_HOST $host;
132 # Keep original request (LL::NG server will receive /lmauth)
133 fastcgi_param X_ORIGINAL_URI $original_uri;
134 }
135
136 # Client requests
137 location / {
138 auth_request /lmauth;
139 set $original_uri $uri$is_args$args;
140 auth_request_set $lmremote_user $upstream_http_lm_remote_user;
141 auth_request_set $lmlocation $upstream_http_location;
142 error_page 401 $lmlocation;
143 try_files $uri $uri/ =404;
144
145 ...
146
147 include /etc/lemonldap-ng/nginx-lua-headers.conf;
148 }
149 location / {
150 try_files $uri $uri/ =404;
151 }
152 }
153
154 Liferay virtual host in Manager
155 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
156
157 Go to the Manager and :doc:`create a new virtual host<../configvhost>`
158 for Liferay.
159
160 Just configure the :ref:`access rules<rules>`. You
161 can add a rule for logout:
162
163 ::
164
165 ^/c/portal/logout => logout_sso
166
167 Configure the ``Auth-User`` :ref:`header<headers>`.
168
169 .. |image0| image:: /applications/liferay_logo.png
170 :class: align-center
171 .. |image1| image:: /documentation/liferay_1.png
172 :class: align-center
173 :width: 600px
174 .. |image2| image:: /documentation/liferay_2.png
175 :class: align-center
176 :width: 600px
177 .. |image3| image:: /documentation/liferay_3.png
178 :class: align-center
179 :width: 600px
180 .. |image4| image:: /documentation/liferay_4.png
181 :class: align-center
182 :width: 600px
183 .. |image5| image:: /documentation/liferay_5.png
184 :class: align-center
185 :width: 600px
186 .. |image6| image:: /documentation/liferay_6.png
187 :class: align-center
188 :width: 600px
189 .. |image7| image:: /documentation/liferay_7.png
190 :class: align-center
191 :width: 600px