README 27 KB
Newer Older
haemmer's avatar
haemmer committed
1
Copyright 2011 SWITCH - Serving Swiss Universities. 
haemmer's avatar
haemmer committed
2
3
See LICENSE file for details.

haemmer's avatar
haemmer committed
4
-------------------------------------------------------------------------------
haemmer's avatar
haemmer committed
5
SWITCH WAYF
haemmer's avatar
haemmer committed
6
Contact: aai@switch.ch or go to http://www.switch.ch/aai/wayf
7
Version: See head of file 'WAYF' in the same directory
haemmer's avatar
haemmer committed
8
9
Project web site: https://forge.switch.ch/redmine/projects/wayf
Bug reports/feature requests: https://forge.switch.ch/redmine/projects/wayf/issues
haemmer's avatar
haemmer committed
10
11
12
-------------------------------------------------------------------------------

Description:
13
14
15
16
17
The SWITCHwayf is an implementation of the Shibboleth WAYF and SAML2 Discovery 
Service protocol for use withing a Shibboleth architecture.

-------------------------------------------------------------------------------

18
19
20
Security Notes

Release (25. October 2010):
21
The Discovery Service protocol as defined in 
22
23
http://docs.oasis-open.org/security/saml/Post2.0/sstc-saml-idp-discovery.pdf 
states that the protocol creates opportunities for phishing attacks as do all
24
SSO protocols that make use of redirection. The specification states that an 
haemmer's avatar
haemmer committed
25
implementation "SHOULD" examine the 'return' parameter used in a Discovery 
26
Service request and match it against the <idpdisc:DiscoveryResponse> 
27
extension in SAML metadata. The implementation of the Discovery Service protocol
28
in the SWITCHwayf prior to version 1.14 did NOT verify the return parameter 
haemmer's avatar
haemmer committed
29
30
even if SAML metadata was used to generate the list of Identity Provider.
Version 1.14 or newer fixes this problem.
31

32
Thanks to Tom Scavo for reporting this issue.
haemmer's avatar
haemmer committed
33
34
35

-------------------------------------------------------------------------------

36
Some of the Features:
haemmer's avatar
haemmer committed
37
38
39
40
41
42
43
44
- Preselecting entry in drop down list by
  - SAML common domain cookie that contains selected Identity Providers 
  - resource path info hint (e.g. 
    /WAYF/unige.ch?shire=https://... selects University  of Geneva, depends 
    of course on the ID scheme a federation uses)
  - Kerberos preselection
  - IP range preselection
  - IP reverse DNS lookup preselection
haemmer's avatar
haemmer committed
45
- Transparent redirection mode, e.g. /WAYF/unige.ch/redirect?shire=https://...
46
47
48
- Can read SAML2 metadata files
- Supports Discovery Service and the Shibboleth authentication request protocol 
- Various customizations options for header, footer, language strings etc.
haemmer's avatar
haemmer committed
49
- HTML code generation for embedding the WAYF directly into a web page
50
- Support for templates
haemmer's avatar
haemmer committed
51
- Support for remembering IdP selection permanently
haemmer's avatar
haemmer committed
52
53
54
55
56
- I18N support, currently language packs for en, de, it, fr and pt are included

-------------------------------------------------------------------------------

Requirements:
haemmer's avatar
haemmer committed
57
- The web server must support PHP5
haemmer's avatar
haemmer committed
58
59
60
- If the configuration and the backup configuration differ, you have to make 
  sure the user that runs the php script has write access for the configuration
  files.
61
- PHP XML Parser extension for parsing SAML2 metadata
haemmer's avatar
haemmer committed
62
63
64
-------------------------------------------------------------------------------

Installation:
65
66
1. Unpack the Zip archive into a directory on a host where Apache 
  (IIS also should work) is deployed. 
haemmer's avatar
haemmer committed
67

68
69
70
71
72
73
74
2. Make a copy of the *.dist.php files
   - Copy the file config.dist.php and name it config.php 
     This is the main configuration file of the SWITCHwayf
   - Copy the file IDProvider.conf.dist.php and name it IDProvider.conf.php
     This file contains the list of Identity Providers that you configure 
     by hand

75
76
77
78
79
80
81
3. Make sure that permissions for the files:
     - SProvider.metadata.php
     - IDProvider.metadata.php 
     - metadata.lock
     - $WAYFLogFile (typically /var/log/apache2/wayf.log)
   are set such that the web server user (e.g. www-data, www or httpd) has write
   permissions for these two files.
82
83
84
85

4. Adapt the SWITCHwayf configuration in config.php. There are comments in that
   file that should help you make suitable choices for your use case.

86
5. If Apache 2 is used, add the following statement to the Apache configugration:
haemmer's avatar
haemmer committed
87
88
89
90
91
92
93

--
<Location /path/to/WAYF>
  SetHandler php5-script
</Location>
--

94
   In some clustered environments with FastCGI it may be necessary to use 
95
   something like:
96
97
98
99
100
101
102
103
104
105
106

--
Options +FollowSymLinks

<IfModule mod_rewrite.c>
  RewriteEngine On
  RewriteRule ^WAYF/(.*)$ WAYF.php/$1 [QSA,L]
  RewriteRule ^WAYF$ WAYF.php [QSA,L]
</IfModule>
--

107
   Alternatively, one also could rename the file 'WAYF' to 'WAYF.php'.
haemmer's avatar
haemmer committed
108

109
110
111
6. When using the embedded WAYF feature it might be necessary to add a line to 
   the Apache configuration like below in order to prevent certain web browsers 
   from not displaying the Embedded WAYF or parts of it:
haemmer's avatar
haemmer committed
112
113
114
115
116

--
Header set P3P "CP=\"NOI CUR DEVa OUR IND COM NAV PRE\""
--

117
118
   For that to work, the Apache header extension must also be enabled
   with a command like:
haemmer's avatar
haemmer committed
119
120
121
122
123
124

--
a2enmod headers
/etc/init.d/apache2 reload
--

125
126
127
128
129
130
131
   See http://www.w3.org/P3P/ for more details on P3P.

7. Test access by calling the WAYF with a URL like:
   https://your.host.com/path/to/WAYF
   Use this URL as Location for your Shibboleth configuration. The WAYF
   will automatically be able to detect whether it receives a Shibboleth 
   authentication request or a Discovery Service request.
haemmer's avatar
haemmer committed
132
133
134

-------------------------------------------------------------------------------

haemmer's avatar
haemmer committed
135
General Update Instructions:
136
137
138
139
140
141
142
143
144
145
1. Make a backup of the directory where the currently active version of the 
   SWITCHwayf is installed
2. Get the compressed archive of the new version and move it into the directory
   of the currently deployed version
3. Unpack the archive with zip or tar
   This step will overwrite some existing files. Files whose name starts 
   with 'custom-' will not be overwritten.
4. Have a look at config.dist.php and compare this file with your current
   config.php in order to identify new configuration options.

haemmer's avatar
haemmer committed
146
147
148
149
150
151
152
153
154
155

-------------------------------------------------------------------------------

Specific Update Instructions:

Updates from versions before 1.15
  The keys of the following languages strings were renamed and should be  
  adapted in your custom languages.php file:
  - 'about_aai' was renamed to 'about_federation'
  - 'about_switch' was renamed to 'about_organisation'
156
  - 'switch_description' was renamed to 'additional_info'
haemmer's avatar
haemmer committed
157

158
Update from versions before 1.14.3:
haemmer's avatar
haemmer committed
159
160
161
  The new setting '$metadataLockFile' was introduced in config.php. It allows
  configuring the location of the lock file. When the SWITCHwayf is used in a 
  Windows environment, the path to this file probably has to be adapted.
162

haemmer's avatar
haemmer committed
163
Update from versions before 1.8:
haemmer's avatar
haemmer committed
164
165
166
167
168
  This version has a slightly different structure than previous versions. 
  Therefore, it is recommended to start with a clean installation. 
  However, you should be able to take over most of your old config.php 
  functions and use them in the new template.php file again to keep your 
  customized look and feel.
haemmer's avatar
haemmer committed
169
170
171
172

-------------------------------------------------------------------------------

Troubleshooting:
173
Generally, if there is an error or an exception, the WAYF will log it to syslog. 
haemmer's avatar
haemmer committed
174
175
176
177
178
In case there is a problem and you see only a white page without any output, 
open config.php in a text editor, go to the bottom of the file and set:

$developmentMode = true;

179
This should output PHP warning messages which are otherwise supressed.
haemmer's avatar
haemmer committed
180

haemmer's avatar
haemmer committed
181
182
-------------------------------------------------------------------------------

183
Customization Options:
haemmer's avatar
haemmer committed
184
Since version 1.12 any graphical aspects of this WAYF/DS implementation can be 
185
186
187
customized such that these changes survive a minor version upgrade. 
Files whose names start with 'default-' can be copied and renamed to start with 
'custom-' in order to  customize the file's behaviour.
188
189

In particular, the following customizations can be applied:
haemmer's avatar
haemmer committed
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211

HTML header:   custom-header.php
Customize page header

HTML Footer:   custom-footer.php
Customize page footer 

HTML Body:     custom-body.php
Customize WAYF/DS body

HTML Body:     custom-settings.php
Customize WAYF/DS permanent settings body

HTML Body:     custom-notice.php
Customize WAYF/DS permanent settings notice body

HTML Body:     custom-embedded-wayf.php
Customize WAYF/DS body

HTML Error:    custom-error.php
Customize error messages

212
CSS Styles:    css/custom-styles.css
213
214
215
Customize CSS styles that are printed inline in header. The custom styles are
loaded in addition to the default styles. Therefore, they can be used to 
overwrite the default CSS styles.
216

haemmer's avatar
haemmer committed
217
Languages:     custom-languages.php
218
219
220
Can be used to change default or add new language strings. The custom languages
strings in addition to the default styles. Therefore, they can be used to 
overwrite the default CSS styles.
haemmer's avatar
haemmer committed
221
222
223
224
225
226
227
228

If the above files don't exist, the default templates and settings 
will be used. To create a custom template, copy of the default files with 
cp default-{$template}.php custom-{$template}.php 
where {$template} stands for the file you want to customize.

-------------------------------------------------------------------------------

haemmer's avatar
haemmer committed
229
Logging:
230
231
Errors are generally written to syslog. Error messages might be cases where
files cannot be read or written due to permission problems.
haemmer's avatar
haemmer committed
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251

If the configuration option $useLogging is true, a log file will be written to 
the path specified in $WAYFLogFile. This log file is an audit log file where 
each line is an entry of the form:

#DATE# #TIME# #IP# #IDP_SELECTION# #REQUEST_TYPE# #IDP_ENTITYID# #FORWARDING_URL#

Log entries are only created if the user was forwarded to an Identity Provider.

#DATE#            Date of request, e.g. 2010-11-02
#TIME#            Time of request, e.g. 06:25:13
#IP#              IP of requester, e.g. 127.0.0.1
#IDP_SELECTION#   How the IdP was selected: Cookie or Request
#REQUEST_TYPE#    Type of request: DS, WAYF, Embedded-DS, Embedded-WAYF
#IDP_ENTITYID#    EntityID of the IdP the user was forwarded to.
#FORWARDING_URL#  URL the user was redirected to

-------------------------------------------------------------------------------

Optimizations:
252
253
254
If your instance of the SWITCHwayf has to deal with many requests and the load 
is becoming  higher and higher, you might want to think about using a PHP opcode 
cacher like XCache, apc,  eaccelerator,  phpa,  truck-mmcache or similar.  
haemmer's avatar
haemmer committed
255
256

Using such a tool can decrease the processing time of the PHP code almost by 
257
half. However, own tests have shown that the bottleneck in general is not 
haemmer's avatar
haemmer committed
258
the PHP processing but the TLS handshake, which has nothing to do with PHP 
259
260
261
262
263
or the SWITCHwayf itself. 

Benchmark tests conducted by SWITCH demonstrated that generating the 
Javascript WAYF/embedded-wayf.js can be speed up usign XCache by 100% if the 
script is accessed via HTTP (without TLS). However, if the script is 
haemmer's avatar
haemmer committed
264
265
accessed via HTTPS (default in SWITCHaai), the overall speed gain by using 
XCache is less than 1% because the TLS hand-shake is what consumes most CPU time.
haemmer's avatar
haemmer committed
266
267
268

-------------------------------------------------------------------------------

haemmer's avatar
haemmer committed
269
SAML2 Metadata support:
270
271
In case the WAYF/DS shall display the list of IdPs by parsing them from a
SAML2 Medatadata file that is used by Shibboleth:
haemmer's avatar
haemmer committed
272
273
274
275

- Set $useSAML2Metadata in config.php to true
- Specify the path to the metadata file that shall be read in $metadataFile
  and make sure this file is updated regularely by Shibboleth or a cron job
haemmer's avatar
haemmer committed
276
277
278
279
280
281
- Make sure the files specified in $metadataIDPFile and $metadataSPFile can be 
  written by the userthat executes the PHP script (the web server user, 
  e.g. www-data or _www)

The parsend IDP and SP entries will be stored in $metadataIDPFile and 
$metadataSPFile as executable PHP code. Storing parsed information in JSON or 
282
283
284
285
286
287
288
289
290
291
PHP serialized format would allow slightly faster reading and executing in 
general. However, for large numbers of entities an opcode cacher might speed up 
execution time considerably (see chapter "Optimization" above) thanks to 
this format. 

If an entry shall be changed, removed or extended in this automatically 
generated file, one can extend the IDP definitions by modifying them in 
the $IDPConfigFile. To overwrite IDP values with entries in the $IDPConfigFile, 
make sure the entry $SAML2MetaOverLocalConf is set to 'false';
For example one could change the displayed name of an IdP by adding an entry in
haemmer's avatar
haemmer committed
292
293
the file $IDPConfigFile like:

294
$IDProviders["https://sso.example.org/idp/shibboleth"]["Name"] = "Foobar";
haemmer's avatar
haemmer committed
295

296
It is also possible to manually force the IdP list being upgraded by running the 
haemmer's avatar
haemmer committed
297
readMetadata.php in command line mode, e.g. by executing a cron script like:
298

haemmer's avatar
haemmer committed
299
300
301
302
303
304
305
306
5 * * * * /usr/bin/php readMetadata.php > /dev/null

This feature has been initially developed in the framework of GRNET's project 
VNOC by Pavlos Drandakis.

-------------------------------------------------------------------------------

Embedded WAYF support:
307
308
309
310
With the embedded WAYF support administrators of a Shibboleth protected 
application can easily integrate a Discovery Service on the any page of their 
application just by copying and adapting the HTML code snippet generated by the
SWITCHwayf via the URL /WAYF/embedded-wayf.js/snippet.html
haemmer's avatar
haemmer committed
311
312

The embedded WAYF then will display on the remote site a drop-down list with the
313
Identity Provider to authenticate.
haemmer's avatar
haemmer committed
314

315
316
317
318
One can also configure the embedded WAYF to hide or add Identity Providers 
(even from remote federations) or adapt the look and feel of the embedded wayf. 
This can be done by simpling modifying the JavaScript variables in the HTML 
snippet.
haemmer's avatar
haemmer committed
319
320
321


Note:
322
323
324
325
326
327
When activating the Embedded WAYF, carefully protect the host where the WAYF is 
operated on. If your WAYF host gets compromised, an attacker could modify the 
JavaScript that is embedded on the remote site in a malicous wayf (e.g. phish 
the user's password, redirect users to malicous pages, steal their sessions etc). 
You also have to make sure that your central WAYF has a very high availability 
because a lot of third-party services will depend on it.
haemmer's avatar
haemmer committed
328

329
330
331
332
Also, please be aware that using the Embedded WAYF allows anybody to guess a 
user's Home Organisation without much effort. This information then could be 
used for phising attacks for example!

haemmer's avatar
haemmer committed
333
334
-------------------------------------------------------------------------------

335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
Embedded WAYF code snippet:
To get a valid HTML snippet to embedd in a web page, please access the WAYF 
with a URL like:

https://#HOSTNAME#/#PATH_TO_WAYF#/WAYF/embedded-wayf.js/snippet.html

The script should return HTML code that can be embedded together with short 
descriptions of the available settings.

Embedded WAYF code limitations:
If the embedded WAYF is placed on the right side or at the bottom of a web page,
it may be that the web browser cannot expand and render the complete drop-down
list of Identity Providers.
If placed on a host where no Service Provider is installed, the Embedded WAYF
might not be able to detect wheter a user is logged in or not. Also, the 
wayf_use_disco_feed might not be used. 

-------------------------------------------------------------------------------

haemmer's avatar
haemmer committed
354
Kerberos support:
355
356
If this features shall be used the web server needs to support Negotiate/SPNEGO 
Kerberos protocol. For example by using mod_auth_kerb.
haemmer's avatar
haemmer committed
357
- Make a symlink of the file 'WAYF' and name it like configured in the variable 
haemmer's avatar
haemmer committed
358
359
360
361
362
363
364
365
366
367
  $kerberosRedirectURL
- Protect file $kerberosRedirectURL with Kerberos. The Kerberos realm must be
  specified in "IDProvider.conf.php" for each IdP. Each IdP's KDC must also
  establish a Kerberos cross-realm trust with the WAYF's KDC. This was tested 
  with a Windows 2000 KDC, with the WAYF running on RHEL4. 

Credits for this feature go to Josh Howlett from Bristol University.

-------------------------------------------------------------------------------

368
Configuration file format:
369
370
Have a look at the file 'IDProvider.conf.php' for an example of the file format 
that is used to configure the list of Identity Provider to display. It's 
haemmer's avatar
haemmer committed
371
372
373
374
375
376
377
378
supposed to be mostly self-explanatory. Basically the file format is PHP code 
that defines an array of arrays called $IDProviders.

The keys of the array $IDProviders must correspond to the entityIDs of the 
Identity Providers or a unique value in case of a cascaded WAYF/DS or 
a category. The entityID must be a valid URI (URL or URN) where in the
case of a URN the last component must be a valid hostname.

379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
If metadata is not parsed from SAML2 metadta (using the setting 
$useSAML2Metadata = false), the IdPs and category entries will be displayed 
in order as defined in the configuration file and no sorting is done.

If metadata is used ($useSAML2Metadata = true) to generate the list of Identity 
Providers, the Identity Providers will first be sorted according to their 
type/category, their Index value (see below) and then alphabetically after their 
(local) Name within the same type category. 
If an IdP does not have a type, its category is 'unknown'.
If there exists a type for an IdP that does not have a corresponding category 
it will be displayed in the category 'unknown' at the end of the drop down list 
but will keep its type value (this is important for the Embedded Discovery 
Service).

A general entry for an Identity Provider, a cascaded WAYF/DS or a category is 
of the following form:
$IDProviders[#key#] = #entry#

#key# is a unique value that must correspond to the entity's entityID in case 
the entry stands for an Identity Provider. For entries of Type category, the
#key# should be an identifier that corresponds to a 'Type' of an IdP.

401
#entry# is a hash array with the following keys: 
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
['Type']:   Optional        Type that is used for the embedded wayf to hide
                            or show certain categories. Default type will 
                            be 'unknown' if not specified.
                            An entry for another WAYF/DS that the user shall be 
                            redirected to should have ['Type'] ='wayf
                            The Type values 'category' and 'wayf' are reserved 
                            words that are not allowed to be assigned to 
                            entries for Identity Providers.
['Name']:   Mandatory       Default name to display in drop-down list
['en'|'it'|'fr'|'de'|'pt']['Name']:
            Optional        Display name in other languages
['SSO']:    Mandatory       Should be the SAML1 SSO endpoint of the IdP
['Realm']:  Optional        Kerberos Realm
['IP'][]:   Optional        IP ranges of that organizations that can be used to 
                            guess a user's Identity Provider
['Index']:  Optional        An alphanumerical value that is used for sorting 
                            categories and Identity Provider in ascending order 
                            if the Identity Providers are parsed from metadata.
                            This is only relevant if 
                            $includeLocalConfEntries = true

For category entries, only Type, (local) Name and Index are relevant.
haemmer's avatar
haemmer committed
424

425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
The format for the file $metadataSPFile looks very similar:

A general entry for an Identity Provider, a cascaded WAYF/DS or a category is 
of the following form:

$metadataSProviders[#key#] = #entry#

#key# is a unique value that must correspond to the Service Provider's entityID.

#entry# is a hash array with the following keys: 
['Name']:       Mandatory   Default name to display in drop-down list. By 
                            default the MDUI:DisplayName, the ServiceName or
                            the entityID is used. If there is a display name
                            available in the WAYF's default language that one
                            will be used. Otherwise English or the only 
                            available DisplayName is used.
['en'|'it'|'fr'|'de'|'pt']['Name']:
                Optional    Display name in other languages
['DSURL']:      Optional    List of DiscoveryService endpoints of the SP.
['ACURL']:      Mandatory   List of Assertion Consumer endpoints of the SP.
['Protocols']:  Mandatory   Protocols supported by the SP, e.g. :
                            urn:oasis:names:tc:SAML:2.0:protocol 
                            urn:oasis:names:tc:SAML:1.1:protocol

haemmer's avatar
haemmer committed
449
450
-------------------------------------------------------------------------------

haemmer's avatar
haemmer committed
451
Version History:
452

453
454
455
456
1.15    Release date: 21. October 2011
          #################################################################
          Please review the 'Specific Update Instructions' in this document
          #################################################################
haemmer's avatar
haemmer committed
457
        - A default and custom CSS file can now be used
458
        - Graphical design now is based new SWITCH harmos elements
459
460
461
462
        - Adapted JSON output to use format used by Shibboleth SP
        - Renamed some string keys to make them independent from SWITCH
        - Added support for the Shibboleth SP 2.4 Discovery Feed JSON output
          in Embedded WAYF
463
        - Focus on submit button works better with different browsers
haemmer's avatar
haemmer committed
464
465
        - Invalid values for width and height are now defaulted to auto for
          Embedded WAYF
466
467
468
469
470
471
472
        - Fixed a URL composing bug that resulted in a wrong return URL to 
          the Service Provider if the return parameter did not contain any GET
          arguments. Reported by Tom Scavo
        - Made implementation behave according to the Discovery Service protocol
          specification when it comes to the return parameter. This parameter
          is optional in case the DS knows the SP Discovery URL.
          Reported by Tom Scavo.
473
          
474
475
476
477
478
479
1.14.3  Release date: 4. March 2011
        - Fixed a race condition. Thanks go to Robert Basch from MIT for 
          reporting the issue and providing a patch.

1.14.2  Release date: 15. December 2010
        - IDProvider.conf.php and config.php are not overwritten anymore by upgrades
480
481
        - Logging to Syslog now works properly and is more consistent
        - Access log now properly locks file
482
483
484
485
486
        - Unknown category is not shown anymore when there is no other category
        - Namespaces are now taken properly into account when parsing SAML2 
          metadata. Thanks go to Olivier Salaün for reporting this issue and
          submitting a patch.
        - Improved installation instructions
487
488
489
490

1.14.1  Release date: 12. November 2010
        - Fixed an encoding bug that affected non-ASCII characters in 
          JavaScripts. Thanks to Prof. Kazutsuna Yamaji for reporting this issue.
haemmer's avatar
haemmer committed
491
        - Corrected behaviour of $enableDSReturnParamCheck and 
492
493
494
495
496
497
498
499
500
501
502
          $useACURLsForReturnParamCheck. There won't be an error anymore if an SP 
          has no <idpdisc:DiscoveryResponse> extension defined. In such a case
          there will only be a check if $useACURLsForReturnParamCheck is enabled.
        - Fixed a bug in readMetadata.php that prevented CLI execution
        - Changed the default configuration option to generate the Embedded WAYF
          to false due to some concerns regarding phishing attacks
        - Added proper copyright statements to all source code files

To see the revision history of older versions, please have a look at:
https://forge.switch.ch/redmine/projects/wayf/wiki/Changes

503
504
505
Releases with a version number X.Y.Z usually contain bug fix releases, typo 
corrections and graphical changes whereas releases with a version number X.Y 
usually introduce new functionality.
haemmer's avatar
haemmer committed
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520

-------------------------------------------------------------------------------

Path Info parameters and files:
Modifying the WAYF's URL it is possible to influence its behaviour. This can be
done by appending certain Path Info extension to the URL. The Path Info 
components can also be combined. The allowed syntax is:

[/#i18n string#][/redirect][/#entityID hostname#]
[/#i18n string#][/embedded-wayf.js]
[/embedded-wayf.js/snippet.html]
[/IDProviders.json]
[/IDProviders.php]
[/IDProviders.txt]

521
Note: The web server must support the use of Path Info.
haemmer's avatar
haemmer committed
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579

Hinted Identity Provider and transparent redirects
--------------------------------------------------
Path Info Extensions: [/redirect][/#entityID hostname#]

#entityID hostname# must be the host name of an entityId or the last component 
of a URN. Examples:
https://aai-login.switch.ch/idp/shibboleth         -> aai-login.switch.ch
urn:mace:switch.ch:aaitest:aai-demo-idp.switch.ch  -> aai-demo-idp.switch.ch

If the '/redirect' is included in the Path Info as well, the web browser is 
redirected transparently to the specified entityID hostname.

Note: One must make sure that the entityID hostname is not the same as one of
      the reserved keywords like 'redirect', the below mentioned file types
      or a i18n langauge abbreviation.

Language preselection:
----------------------
Path Info Extensions: [/#i18n string#]

Examples of i18n strings are 'en', 'de_CH' or 'fr_CH.ISO8859-1' etc. However, in
the default distribution only 'en', 'de', 'fr', 'it' and 'pt' are available and 
supported. But it would be easy to create sub types of existing languages  for
country/region support by adding something like this to languages.php:

--
// Create a country specific copy of the German language strings
$langStrings['de_CH'] = $langStrings['de'];

// Overwrite a specific string
$langStrings['de_CH']['title'] = 'Auswahl der Heimorganisation';
--


Special handlers:
-----------------
In order for the Embedded WAYF feature to work there are some special files that
need to be generated. The following Path Info Extensions must be the last 
components of the Path Info URL.

Path Info Extensions:
[/deleteSettings]                  As the name suggests, this handler deletes
                                   all settings cookies that were stored by the 
                                   WAYF service in cookies.
                                   Unless there is a 'return' GET argument 
                                   provided the user is sent to the settings 
                                   page.
[/embedded-wayf.js]                Generates the JavaScript for the Embedded WAYF
[/embedded-wayf.js/snippet.html]   Generates HTML snippet for the Embedded WAYF
[/idps-and-state.json]             Returns JSON data structure that contains
                                   the content of the IDProviders array. The last
                                   element of that array will be a key called 
                                   'preselectedIDP', which contains the 
                                   Identity Provider that would be preselected
                                   in the drop-down list for that user.
[/IDProviders.txt]                 Same as above but in human readable form.
[/IDProviders.php]                 Same as above but as PHP code
haemmer's avatar
haemmer committed
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599

-------------------------------------------------------------------------------

Credits:
Find below the list of people who have contributed to code, either because they 
found bugs, suggested improvements or contributed code. Have a look at the 
version history in order to see the individual contributions. The list is sorted 
alphabetically.

- Robert Basch from MIT (US)
- Pavlos Drandakis from University of Athens (GR)
- Nicolas Dunand from Université Lausanne (CH)
- Michael R. Gettes from Internet2 (US)
- Nuno Gonçalves from FCCN (PT)
- Florent Guilleux from CRU (FR)
- Josh Howlett from University of Bristol (UK)
- Franz Kuster from ETHZ (CH)
- Wolgang Lierz from ETH Zurich (CH)
- Lourival Pereira Vieira Neto from RNP (BR)
- Martins Purins from Latvijas Universitates (LV)
600
- Olivier Salaün from RENATER (FR)
haemmer's avatar
haemmer committed
601
602
603
604
605
- Tom Scavo from Internet2 (US)
- Mika Suvanto from CSC (FI)
- Huân Thebault from Centre de Calcul de l'IN2P3 (FR)
- Prof. Kazutsuna Yamaji from NII (JP)
- And of course all SWITCH staff members who have contributed suggestions,
haemmer's avatar
haemmer committed
606
  bug fixes and translation to this code.