| 1 |
CAS server |
| 2 |
========== |
| 3 |
|
| 4 |
Presentation |
| 5 |
------------ |
| 6 |
|
| 7 |
LL::NG can be used as a CAS server. It can allow one to federate LL::NG with: |
| 8 |
|
| 9 |
- Another :doc:`CAS authentication<authcas>` LL::NG provider |
| 10 |
- Any CAS consumer |
| 11 |
|
| 12 |
LL::NG is compatible with the `CAS protocol <https://apereo.github.io/cas/6.5.x/index.html>`__ |
| 13 |
versions 1.0, 2.0 and part of 3.0 (attributes exchange). |
| 14 |
|
| 15 |
Configuration |
| 16 |
------------- |
| 17 |
|
| 18 |
Enabling CAS |
| 19 |
~~~~~~~~~~~~ |
| 20 |
|
| 21 |
In the Manager, go in ``General Parameters`` » ``Issuer modules`` » ``CAS`` and configure: |
| 22 |
|
| 23 |
- **Activation**: set to ``On``. |
| 24 |
- **Path**: it is recommended to keep the default value (``^/cas/``) |
| 25 |
- **Use rule**: a rule to allow user to use this module, set to ``1`` |
| 26 |
to always allow. |
| 27 |
|
| 28 |
|
| 29 |
.. tip:: |
| 30 |
|
| 31 |
For example, to allow only users with a strong authentication level: |
| 32 |
|
| 33 |
:: |
| 34 |
|
| 35 |
$authenticationLevel > 2 |
| 36 |
|
| 37 |
|
| 38 |
.. _idpcas-configuring-cas-applications: |
| 39 |
|
| 40 |
Configuring the CAS Service |
| 41 |
~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 42 |
|
| 43 |
Then go in ``CAS Service`` to define: |
| 44 |
|
| 45 |
- **CAS login**: the session key transmitted to CAS client as the main |
| 46 |
identifier (CAS Principal). This setting can be overridden |
| 47 |
per-application. |
| 48 |
- **Access control policy**: define if access control should be done on |
| 49 |
CAS service. Three options: |
| 50 |
|
| 51 |
- **none**: no access control. The CAS service will accept |
| 52 |
non-declared CAS applications and ignore access control rules. |
| 53 |
This is the default. |
| 54 |
- **error**: if user has no access, an error is shown on the portal, |
| 55 |
the user is not redirected to CAS service |
| 56 |
- **faketicket**: if the user has no access, a fake ticket is built, |
| 57 |
and the user is redirected to CAS service. Then CAS service has to |
| 58 |
show a correct error when service ticket validation will fail. |
| 59 |
|
| 60 |
- **Use strict URL matching**: (since *2.0.12*) enforces a stricter URL |
| 61 |
matching. By default, LemonLDAP::NG will try to find a declared CAS |
| 62 |
Application matching the hostname of the requested application if it cannot |
| 63 |
find a match using the full path. See :ref:`idpcas-url-matching` for details |
| 64 |
- **Temporary ticket lifetime**: (since *2.0.14*): restricts how long Service |
| 65 |
and Proxy tickets are valid after being generated. For compatibility, the |
| 66 |
default value of ``0`` means they are valid for the entire session duration. |
| 67 |
But the CAS spefications recommends ``300`` (5 minutes). |
| 68 |
- **Back-channel logout**: (since *2.0.16*) enable CAS back-channel logout, |
| 69 |
which will send SLO requests to CAS applications. |
| 70 |
- **CAS attributes**: list of attributes that will be transmitted by |
| 71 |
default in the validate response. Keys are the name of attribute in |
| 72 |
the CAS response, values are the name of session key. |
| 73 |
|
| 74 |
|
| 75 |
|
| 76 |
.. tip:: |
| 77 |
|
| 78 |
If ``CAS login`` is not set, it uses ``General Parameters`` » |
| 79 |
``Logs`` » ``REMOTE_USER`` data, which is set to ``uid`` by |
| 80 |
default |
| 81 |
|
| 82 |
|
| 83 |
Sessions |
| 84 |
^^^^^^^^ |
| 85 |
Choose a specific module if you do not want to mix CAS sessions and normal |
| 86 |
sessions (see :ref:`why<samlservice-saml-sessions-module-name-and-options>`). |
| 87 |
|
| 88 |
|
| 89 |
.. _idpcas-configuring-the-cas-service: |
| 90 |
|
| 91 |
Configuring CAS Applications |
| 92 |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 93 |
|
| 94 |
If an access control policy other than ``none`` is specified, |
| 95 |
applications that want to authenticate users through the CAS protocol |
| 96 |
have to be declared before LemonLDAP::NG accepts to issue service |
| 97 |
tickets for them. |
| 98 |
|
| 99 |
Go to ``CAS Applications`` and then ``Add CAS Application``. Give a |
| 100 |
technical name (no spaces, no special characters), like "app-example". |
| 101 |
|
| 102 |
You can then access the configuration of this application. |
| 103 |
|
| 104 |
Exported Attributes |
| 105 |
^^^^^^^^^^^^^^^^^^^ |
| 106 |
|
| 107 |
You may add a list of attributes that will be transmitted in the |
| 108 |
validate response. Keys are the name of attribute in the CAS response, |
| 109 |
values are the name of session key. |
| 110 |
|
| 111 |
The attributes defined here will completely replace any attributes you |
| 112 |
may have declared in the global ``CAS Service`` configuration. In order |
| 113 |
to re-use the global configuration, simply set this section to an empty |
| 114 |
list. |
| 115 |
|
| 116 |
Options |
| 117 |
^^^^^^^ |
| 118 |
|
| 119 |
- **Activation** The user can activate and deactivate the CAS application. By |
| 120 |
default, CAS applications are active upon creation. |
| 121 |
- **Service URL**: the service (user-facing) URL(s) of the CAS-enabled |
| 122 |
application. Multiple URLs can be specified, separated by a space. |
| 123 |
See :ref:`idpcas-url-matching`. |
| 124 |
- **User attribute**: session field that will be used as main |
| 125 |
identifier. |
| 126 |
- **Allow proxy** (since *2.21.0*): allow CAS proxying features on this application |
| 127 |
- **Logout**: enable back-channel logout to this CAS application |
| 128 |
- **Required authentication Level**: required authentication level to access this |
| 129 |
application. Since *2.21.0* this can be a Perl expression. |
| 130 |
- **Access rule**: access rule to enforce on this application. If |
| 131 |
left blank, access will be allowed for everyone. |
| 132 |
- **Comment**: set a comment |
| 133 |
- **Name**: name to display during logout |
| 134 |
|
| 135 |
|
| 136 |
.. attention:: |
| 137 |
|
| 138 |
If the access control policy is set to ``none``, this |
| 139 |
rule will be ignored |
| 140 |
|
| 141 |
Macros |
| 142 |
^^^^^^ |
| 143 |
|
| 144 |
You can define here macros that will be only evaluated for this service, |
| 145 |
and not registered in the session of the user. |
| 146 |
|
| 147 |
.. _idpcas-url-matching: |
| 148 |
|
| 149 |
URL Matching |
| 150 |
^^^^^^^^^^^^ |
| 151 |
|
| 152 |
.. versionchanged:: 2.0.10 |
| 153 |
|
| 154 |
Before version 2.0.10, only the hostname was taken into account, which made it impossible to have two different CAS services behind the same hostname. |
| 155 |
|
| 156 |
Since version 2.0.10, the entire service URL is compared to the Service URL defined in LemonLDAP::NG. The longest prefix wins. |
| 157 |
|
| 158 |
For example, if you declared two applications in LemonLDAP::NG with the following service URLs: |
| 159 |
|
| 160 |
* https://cas.example.com/applications/zone1 |
| 161 |
* https://cas.example.com/applications/ |
| 162 |
|
| 163 |
An application located at https://cas.example.com/applications/zone1/myapp will match the first CAS service definition |
| 164 |
|
| 165 |
An application located at https://cas.example.com/undeclared/ will also be accepted in order to preserve the previous behavior of matching on hostnames only. |
| 166 |
|
| 167 |
.. versionchanged:: 2.0.12 |
| 168 |
|
| 169 |
The *Strict URL matching* option now lets you decide if LemonLDAP::NG should |
| 170 |
fall back to legacy host-based matching if it cannot find a declared service |
| 171 |
matching an incoming service URL. In the previous example, |
| 172 |
https://cas.example.com/undeclared/ will no longer match if strict URL |
| 173 |
matching is enabled |