If the service is in an internal federation (eg CESNET-int) that only contains a single IdP, there is no point in using WAYF! In that case you need to set up authentication against that one specific IdP and avoid using WAYF.
The script that checks the return
parameter does not download the metadata of the internal federations, so the check ends with an error!
See also a page with general information about eduID.cz WAYF/DS.
Without any configuration, WAYF shows all the IdPs available in the federation the SP belongs to. It is possible to define a list of IdPs to be shown making use of one of the two parameters – either filter attribute or efilter attribute.
Using filter attribute leads to a direct filter. In this case the list of IdPs to show is defined as a value in filter parameter.
Example of a direct filter:
filter=eyAgImFsbG93SG9zdGVsIjogdHJ1ZSwgImFsbG93SG9zdGVsUmVnIjogZmFsc2V9
Using efilter attribute leads to an external filter. In this case the list of IdPs to show is defined in a file at a URL linked in efilter parameter.
Example of an external filter:
efilter=www.example.com/filter
Content of www.example.com/filter
:
eyAgImFsbG93SG9zdGVsIjogdHJ1ZSwgImFsbG93SG9zdGVsUmVnIjogZmFsc2V9
efilter approach is a solution for HTTP servers limiting HTTP GET parameters such as Suhosin extension for PHP language allowing only 255 characters at a maximum.
A filter generator is available at https://ds.eduid.cz/filter.php.
In order for WAYF to display all the IdPs in a particular federation, just select the appropriate checkbox next to the corresponding federation name. It is possible to choose more federations at once.
List of IdPs can be filtered by entity categories. Move entity category from gray box into green one or red one. Green box is positive filter. IdPs in list must have all entity categories from green box and mustn't have any entity category from red box.
You can create whitelist or blacklist of IdPs per federation. It is even possible to have this whitelist or blacklist for onlz some selected federations.
WAYF supports sites where login is required as well as sites where login is optional (= lazy sessions).
In the following configuration example, a user is redirected to WAYF prior displaying the accessed web page in order to select home organization and login.
Alter <SSO>
element in shibboleth2.xml
configuration file accordingly.
<SSO discoveryProtocol="SAMLDS" discoveryURL="https://ds.eduid.cz/wayf.php?filter=eyJhbGxvd0hvc3RlbCI6dHJ1ZSwiYWxsb3dIb3N0ZWxSZWciOnRydWV9Cg==&lang=en"> SAML2 SAML1 </SSO>
First, the <SSO>
element in shibboleth2.xml
configuration file has to be set as in previous section.
Second, the following <script>
element has to be inserted in to the page <head>
element where lazy sessions are desired.
<head> <!-- another HTML elements --> <script type="text/javascript" src="https://ds.eduid.cz/ds.js"></script> <!-- another HTML elements --> </head>
The session initiator URL is set to /Shibboleth.sso/Login
by default, so the login link in a web page might look like the following code:
<a href="/Shibboleth.sso/Login" onclick="startOverlay(event)">Log in</a>
For SimpleSAMLphp, WAYF configuration is set in authsources.php
configuration file.
Example of configuration file authsources.php
:
'default-sp' => array( 'saml:SP', 'entityID' => 'https://sp.example.com/simplesaml/', 'idp' => NULL, 'discoURL' => 'https://ds.eduid.cz/wayf.php', 'privatekey' => 'example.key' ),
And the login link in the web page might look like the following.
<a href="/simplesaml/module.php/core/authenticate.php" onclick="startOverlay(event)">Log in</a>
DO NOT USE WAYF FOR INTERNAL FEDERATIONS WITH ONE IDP!
For internal federations (e.g. CESNET-int), metadata for checking the return
parameter is not processed, so the check always ends with an error.
For security reasons, WAYF checks the value of the return parameter. It is the URL to which the user's browser is redirected after selecting IdP. The parameter value must match the metadata value for that SP. If different, the WAYF displays an error message and does not allow the user to continue logging on.
CESNET, z. s. p. o.
Generála Píky 26
16000 Praha 6
info@cesnet.cz
Tel: +420 234 680 222
GSM: +420 602 252 531
support@cesnet.cz