| 1 |
Upgrade from 1.9 to 2.0 |
| 2 |
======================= |
| 3 |
|
| 4 |
|
| 5 |
.. attention:: |
| 6 |
|
| 7 |
2.0 is a major release, lot of things have been changed. |
| 8 |
You must read this document before upgrade. |
| 9 |
|
| 10 |
Upgrade order from 1.9.\* |
| 11 |
------------------------- |
| 12 |
|
| 13 |
As usual, if you use more than 1 server and don't want to stop SSO |
| 14 |
service AND IF YOU HAVE NO INCOMPATIBILITY MENTIONED IN THIS DOCUMENT, |
| 15 |
upgrade must be done in the following order: |
| 16 |
|
| 17 |
#. servers with handlers only; |
| 18 |
#. portal servers *(all together if your load balancer is stateless |
| 19 |
(user or client IP) and if users use the menu)*; |
| 20 |
#. manager server |
| 21 |
|
| 22 |
|
| 23 |
.. attention:: |
| 24 |
|
| 25 |
You must revalidate your configuration using the |
| 26 |
manager. |
| 27 |
|
| 28 |
Installation |
| 29 |
------------ |
| 30 |
|
| 31 |
|
| 32 |
.. attention:: |
| 33 |
|
| 34 |
French documentation is no more available. Only English |
| 35 |
version of this documentation is maintained now. |
| 36 |
|
| 37 |
This release of LL::NG requires these minimal versions of GNU/Linux |
| 38 |
distributions: |
| 39 |
|
| 40 |
- Debian 9 (stretch) |
| 41 |
- Ubuntu 16.04 LTS |
| 42 |
- CentOS 7 |
| 43 |
- RHEL 7 |
| 44 |
|
| 45 |
For SAML features, we require at least Lasso 2.5 and we recommend Lasso |
| 46 |
2.6. |
| 47 |
|
| 48 |
Configuration |
| 49 |
------------- |
| 50 |
|
| 51 |
- **lemonldap-ng.ini** requires some new fields in portal section. |
| 52 |
Update yours using the one given installed by default. New requires |
| 53 |
fields are: |
| 54 |
|
| 55 |
- **staticPrefix** *(manager and portal)*: the path to static |
| 56 |
content |
| 57 |
- **templateDir** *(manager and portal)*: the path to templates |
| 58 |
directory |
| 59 |
- **languages** *(manager and portal)*: accepted languages |
| 60 |
|
| 61 |
- Portal skins are now in ``/usr/share/lemonldap-ng/portal/templates``. |
| 62 |
See :ref:`skin customization<portalcustom-skin-customization>` to |
| 63 |
adapt your templates. |
| 64 |
- User module in authentication parameters now provides a "Same as |
| 65 |
authentication" value. You must revalidate it in the manager since |
| 66 |
all special values must be replaced by this *(Multi, Choice, Proxy, |
| 67 |
Slave, SAML, OpenID*,...)* |
| 68 |
- **"Multi" doesn't exist anymore**: it is replaced by |
| 69 |
:doc:`Combination<authcombination>`, a more powerful module. |
| 70 |
- Apache and Nginx configurations must be updated to use FastCGI portal |
| 71 |
- URLs for mail reset and register pages have changed, you must update |
| 72 |
configuration parameters. For example: |
| 73 |
|
| 74 |
:: |
| 75 |
|
| 76 |
mailUrl => 'http://auth.example.com/resetpwd', |
| 77 |
registerUrl => 'http://auth.example.com/register', |
| 78 |
|
| 79 |
- Option ``trustedProxies`` was removed, you must now configure your |
| 80 |
Web Server to manage ``X-Forwarded-For`` header, see |
| 81 |
:doc:`how to run LL::NG behind a reverse proxy<behindproxyminihowto>`. |
| 82 |
|
| 83 |
|
| 84 |
.. attention:: |
| 85 |
|
| 86 |
Apache mod_perl has got lot of troubleshooting problems |
| 87 |
since 2.4 version (many segfaults,...), especially when using MPM |
| 88 |
worker or MPM event. That's why LL::NG doesn't use anymore |
| 89 |
ModPerl::Registry: all is now handled by FastCGI (portal and manager), |
| 90 |
except for Apache2 Handler. |
| 91 |
|
| 92 |
**For Handlers, it is now recommended to migrate to Nginx**, but Apache |
| 93 |
2.4 is still supported with MPM prefork. |
| 94 |
|
| 95 |
Configuration refresh |
| 96 |
~~~~~~~~~~~~~~~~~~~~~ |
| 97 |
|
| 98 |
Now portal has the same behavior than handlers: it looks to |
| 99 |
configuration stored in local cache every 10 minutes. So it has to be |
| 100 |
reload like every handler. |
| 101 |
|
| 102 |
|
| 103 |
.. attention:: |
| 104 |
|
| 105 |
If you want to use reload mechanism on a portal only |
| 106 |
host, you must install a handler in Portal host to be able to refresh |
| 107 |
local cache. Include ``handler-nginx.conf`` or ``handler-apache2.conf`` |
| 108 |
for example |
| 109 |
|
| 110 |
LDAP connection |
| 111 |
--------------- |
| 112 |
|
| 113 |
Now LDAP connections are kept open to improve performances. To allow |
| 114 |
that, LL::NG requires an anonymous access to LDAP RootDSE entry to check |
| 115 |
connection. |
| 116 |
|
| 117 |
Kerberos or SSL usage |
| 118 |
--------------------- |
| 119 |
|
| 120 |
- A new :doc:`Kerberos<authkerberos>` authentication backend has been |
| 121 |
added since 2.0. This module solves many Kerberos integration |
| 122 |
problems *(usage in conjunction with other backends, better error |
| 123 |
display,…)*. However, you can retain the old integration manner |
| 124 |
(using :doc:`Apache authentication module<authapache>`). |
| 125 |
- For :doc:`SSL<authssl>`, a new :doc:`Ajax option<authssl>` can be |
| 126 |
used in the same idea: so SSL can be used in conjunction with other |
| 127 |
backends. |
| 128 |
|
| 129 |
Logs |
| 130 |
---- |
| 131 |
|
| 132 |
- **Syslog**: logs are now configured in ``lemonldap-ng.ini`` file |
| 133 |
only. If you use Syslog, you must reconfigure it. See |
| 134 |
:doc:`logs<logs>` for more. |
| 135 |
- **Apache2**: Portal doesn't use anymore Apache2 logger. Logs are |
| 136 |
always written to Apache error.log but Apache "LogLevel" parameter |
| 137 |
has no more effect on it. Portal is now a FastCGI application and |
| 138 |
doesn't use anymore ModPerl. See :doc:`logs<logs>` for more. |
| 139 |
- If you are running behind a proxy, make sure LemonLDAP::NG can |
| 140 |
:doc:`see the original IP address<behindproxyminihowto>` |
| 141 |
of incoming HTTP connections |
| 142 |
|
| 143 |
Security |
| 144 |
-------- |
| 145 |
|
| 146 |
LLNG portal now embeds the following features: |
| 147 |
|
| 148 |
- `CSRF <https://en.wikipedia.org/wiki/Cross-site_request_forgery>`__ |
| 149 |
protection *(Cross-Site Request Forgery)*: a token is built for each |
| 150 |
form. To disable it, set requireToken to 0 *(portal security |
| 151 |
parameters in the manager)* |
| 152 |
- `Content-Security-Policy <https://en.wikipedia.org/wiki/Content_Security_Policy>`__ |
| 153 |
header: portal build dynamically this header. You can modify default |
| 154 |
values in the manager *(Général parameters » Advanced parameters » |
| 155 |
Security » Content-Security-Policy)* |
| 156 |
|
| 157 |
Handlers |
| 158 |
-------- |
| 159 |
|
| 160 |
- **Apache only**: |
| 161 |
|
| 162 |
- **Apache handler** is now Lemonldap::NG::Handler::ApacheMP2 and |
| 163 |
Menu is now Lemonldap::NG::Handler::ApacheMP2::Menu |
| 164 |
- because of an Apache behaviour change, PerlHeaderParserHandler |
| 165 |
must no more be used with "reload" URLs *(replaced by |
| 166 |
PerlResponseHandler)*. Any "reload url" that are inside a |
| 167 |
protected vhost must be unprotected in vhost rules *(protection |
| 168 |
has to be done by web server configuration)*. |
| 169 |
|
| 170 |
- :doc:`CDA<cda>`, |
| 171 |
:doc:`ZimbraPreAuth<applications/zimbra>`, |
| 172 |
:doc:`SecureToken<securetoken>` and |
| 173 |
:doc:`AuthBasic<authbasichandler>` are now |
| 174 |
:doc:`Handler Types<handlerarch>`. So there is no |
| 175 |
more special file to load: you just have to choose "VirtualHost type" |
| 176 |
in the manager/VirtualHosts. |
| 177 |
- :doc:`SSOCookie<ssocookie>`: Since Firefox 60 and |
| 178 |
Chrome 68, "+2d, +5M, 12h and so on..." cookie expiration time |
| 179 |
notation is no more supported. CookieExpiration value is a number of |
| 180 |
seconds until the cookie expires. A zero or negative number will |
| 181 |
expire the cookie immediately. |
| 182 |
|
| 183 |
Rules and headers |
| 184 |
----------------- |
| 185 |
|
| 186 |
* hostname() and remote_ip() are no more provided to avoid some name conflicts *replaced by `$ENV{}`)* |
| 187 |
* `$ENV{<cgi_variable>}` is now available everywhere: see :doc:`writingrulesand_headers` |
| 188 |
* some variable names have changed. See :doc:`variables` document |
| 189 |
|
| 190 |
Opening conditions |
| 191 |
------------------ |
| 192 |
|
| 193 |
- Rule and message fields have been swaped. You have to modifiy and |
| 194 |
validate again your access rules. |
| 195 |
|
| 196 |
Supported servers |
| 197 |
----------------- |
| 198 |
|
| 199 |
- Apache-1.3 files are not provided now. You can build them yourself by |
| 200 |
looking at Apache-2 configuration files |
| 201 |
|
| 202 |
Ajax requests |
| 203 |
------------- |
| 204 |
|
| 205 |
Before 2.0, an Ajax query launched after session timeout received a 302 |
| 206 |
code. Now a 401 HTTP code is returned. ``WWW-Authenticate`` header |
| 207 |
contains: ``SSO <portal-URL>`` |
| 208 |
|
| 209 |
SOAP/REST services |
| 210 |
------------------ |
| 211 |
|
| 212 |
- SOAP server activation is now split in 2 parameters |
| 213 |
(configuration/sessions). You must set them else SOAP service will be |
| 214 |
disabled |
| 215 |
- Notifications are now REST/JSON by default. You can force old format |
| 216 |
in the manager. Note that SOAP proxy has changed: |
| 217 |
http://portal/notifications now. |
| 218 |
- If you use "adminSessions" endpoint with "singleSession*" features, |
| 219 |
you must upgrade all portals simultaneously |
| 220 |
- SOAP services can be replaced by new REST services |
| 221 |
|
| 222 |
|
| 223 |
.. attention:: |
| 224 |
|
| 225 |
\ :doc:`AuthBasic Handler<authbasichandler>` uses now |
| 226 |
REST services instead of SOAP. |
| 227 |
|
| 228 |
CAS |
| 229 |
--- |
| 230 |
|
| 231 |
CAS authentication module no more use perl CAS client, but our own code. |
| 232 |
You can now define several CAS servers in a specific branch in Manager, |
| 233 |
like you can define several SAML or OpenID Connect providers. |
| 234 |
|
| 235 |
CAS issuer module has also been improved, you must modify the |
| 236 |
configuration of CAS clients to move them from virtual host branch to |
| 237 |
CAS client branch. |
| 238 |
|
| 239 |
Developer corner |
| 240 |
---------------- |
| 241 |
|
| 242 |
APIs |
| 243 |
~~~~ |
| 244 |
|
| 245 |
Portal has now many REST features and includes an API plugin. See Portal |
| 246 |
manpages to learn how to write auth modules, issuers or other features. |
| 247 |
|
| 248 |
Portal overview |
| 249 |
~~~~~~~~~~~~~~~ |
| 250 |
|
| 251 |
Portal is no more a single CGI object. Since 2.0, It is based on |
| 252 |
Plack/PSGI and Mouse modules. Little resume |
| 253 |
|
| 254 |
:: |
| 255 |
|
| 256 |
Portal object |
| 257 |
| |
| 258 |
+-> auth module |
| 259 |
| |
| 260 |
+-> userDB module |
| 261 |
| |
| 262 |
+-> issuer modules |
| 263 |
| |
| 264 |
+-> other plugins (notification,...) |
| 265 |
|
| 266 |
Requests are independent objects based on |
| 267 |
Lemonldap::NG::Portal::Main::Request which inherits from |
| 268 |
Lemonldap::NG::Common::PSGI::Request which inherits from Plack::Request. |
| 269 |
See manpages for more. |
| 270 |
|
| 271 |
Handler |
| 272 |
~~~~~~~ |
| 273 |
|
| 274 |
Handler libraries have been totally rewritten. If you've made custom |
| 275 |
handlers, they must be rewritten, see |
| 276 |
:doc:`customhandlers<customhandlers>`. |
| 277 |
|
| 278 |
If you used self protected CGI, you also need to rewrite them, see |
| 279 |
:ref:`documentation<selfmadeapplication-perl-auto-protected-cgi>`. |