Commit 518ddc1f authored by haemmer's avatar haemmer

Lots of changes for #2789

parent 9dfae529
......@@ -129,12 +129,20 @@ General Update Instructions:
Specific Update Instructions:
Updates from versions before 1.17.2
A new configuration option $supportContactEmail was introduced to provide
the user a support contact address in case of errors. Please add a line
like the following to the SWITCHwayf configuration file config.php:
$supportContactEmail = 'your-support-contact@your.organisation.org';
If not set, the default address support-contact@example.org will be used.
Updates from versions before 1.18
The following new configuration options were introduced:
- $supportContactEmail
- $organizationLogoURL
- $organizationURL
- $faqURL
- $helpURL
- $privacyURL
Have a look at config.dist.php in section 4. Appearance settings for a
description on these settings. The make sure to configure them to config.php
which should contain your own configuration. Otherwise, default values
will be set.
Updates from versions before 1.15
......
......@@ -3,7 +3,7 @@
/*
******************************************************************************
SWITCHwayf
Version: 1.17.2
Version: 1.18
Contact: aai@switch.ch
Web site: http://www.switch.ch/aai/wayf
******************************************************************************
......@@ -13,10 +13,10 @@ Web site: http://www.switch.ch/aai/wayf
// Load general configuration and template file
/*------------------------------------------------*/
require_once('config.php');
require_once('templates.php');
require_once('functions.php');
require_once('languages.php');
require_once('config.php');
// Set P3P headers just in case they were not set in Apache already
header('P3P: CP="NOI CUR DEVa OUR IND COM NAV PRE"');
......
This diff is collapsed.
......@@ -26,5 +26,7 @@
</div>
</form>
<?php if (getLocalString('additional_info') != '') { ?>
<p><?php echo getLocalString('additional_info') ?></p>
<?php } ?>
<!-- Identity Provider Selection: End -->
......@@ -11,7 +11,7 @@
//////////////////// ESSENTIAL SETTINGS ////////////////////
// URL of the WAYF to use
// Examples: "https://wayf.switch.ch/SWITCHaai/WAYF", "https://wayf-test.switch.ch/aaitest/WAYF";
// Examples: "https://wayf.example.org/SWITCHwayf/WAYF"
// [Mandatory]
var wayf_URL = "https://<?php echo $host ?><?php echo $path ?>";
......@@ -127,7 +127,7 @@ var wayf_show_categories = true;
// EntityIDs of Identity Provider that should not be shown at all
// Example of how to hide certain Identity Provider
// var wayf_hide_idps = new Array("https://idp.unige.ch/idp/shibboleth", "https://lewotolo.switch.ch/idp/shibboleth");
// var wayf_hide_idps = new Array("https://idp.unige.ch/idp/shibboleth", "https://aai-logon.switch.ch/idp/shibboleth");
// [Optional, commented out by default]
// var wayf_hide_idps = new Array();
......@@ -143,7 +143,7 @@ var wayf_show_categories = true;
// var wayf_use_discovery_service = false;
// Session Initiator URL of the Service Provider
// Examples: "https://econf.switch.ch/Shibboleth.sso/Login", "https://dokeos.unige.ch/Shibboleth.sso/DS"
// Examples: "https://interact.switch.ch/Shibboleth.sso/Login", "https://dokeos.unige.ch/Shibboleth.sso/DS"
// This will implicitely be set to wayf_sp_samlDSURL = wayf_sp_handlerURL + "/Login";
// or will be set automatically if the page where the Embedded WAYF is placed is called
// with a 'return' and an 'entityID' GET Arguments
......@@ -154,16 +154,15 @@ var wayf_show_categories = true;
// Default IdP to preselect when central WAYF couldn't guess IdP either
// This is usually the case the first time ever a user accesses a resource
// [Optional, default: commented out]
// var wayf_default_idp = "https://aai.switch.ch/idp/shibboleth";
// var wayf_default_idp = "https://aai-logon.switch.ch/idp/shibboleth";
// Set a custom Assertion Consumer URL instead of
// the default wayf_sp_handlerURL + '/SAML/POST'
// Only relevant if wayf_use_discovery_service is false
// Examples: "https://olat.uzh.ch/shib/samlaa",
// Examples: "https://my-app.switch.ch/custom/saml-implementation/samlaa"
// This will implicitely be set to wayf_sp_samlACURL = wayf_sp_handlerURL + "/SAML/POST";
// "https://foodle.feide.no/simplesaml/shib13/sp/AssertionConsumerService.php"
// [Optional, commented out by default]
// var wayf_sp_samlACURL = "https://maclh.switch.ch/foo/bar";
// var wayf_sp_samlACURL = "https://my-app.switch.ch/custom/saml-implementation/samlaa";
// Overwites the text of the checkbox if
// wayf_show_remember_checkbox is set to true
......@@ -215,7 +214,7 @@ var wayf_show_categories = true;
// var wayf_additional_idps = [
//
// {name:"International University X",
// entityID:"urn:mace:switch.ch:SWITCHaai:example.university.org",
// entityID:"urn:mace:example.org:example.university.org",
// SAML1SSOurl:"https://int.univ.org/shibboleth-idp/SSO"},
//
// {name:"Some Other University",
......
......@@ -109,14 +109,14 @@
<div id="container">
<div class="box">
<div id="header">
<a href="http://www.switch.ch/aai"><img src="<?php echo $logoURL ?>" alt="SWITCHaai" id="federationLogo"></a>
<a href="http://www.switch.ch/"><img src="<?php echo $imageURL ?>/switch-logo.png" alt="SWITCH" id="organisationLogo"></a>
<a href="<?php echo sprintf($federationURL, $language) ?>"><img src="<?php echo $logoURL ?>" alt="Federation Logo" id="federationLogo"></a>
<a href="<?php echo sprintf($organizationURL, $language) ?>"><img src="<?php echo $organizationLogoURL ?>" alt="Organization Logo" id="organisationLogo"></a>
</div>
<div id="content">
<ul class="menu">
<li><a href="http://www.switch.ch/<?php echo $language ?>/aai/about/"><?php echo getLocalString('about_federation'); ?></a></li>
<li class="last"><a href="http://www.switch.ch/<?php echo $language ?>/aai/faq/"><?php echo getLocalString('faq') ?></a></li>
<li class="last"><a href="http://www.switch.ch/<?php echo $language ?>/aai/help/"><?php echo getLocalString('help') ?></a></li>
<li class="last"><a href="http://www.switch.ch/<?php echo $language ?>/aai/privacy/"><?php echo getLocalString('privacy') ?></a></li>
<li><a href="<?php echo sprintf($federationURL, $language) ?>"><?php echo getLocalString('about_federation'); ?></a></li>
<li class="last"><a href="<?php echo sprintf($faqURL, $language) ?>"><?php echo getLocalString('faq') ?></a></li>
<li class="last"><a href="<?php echo sprintf($helpURL, $language) ?>"><?php echo getLocalString('help') ?></a></li>
<li class="last"><a href="<?php echo sprintf($privacyURL, $language) ?>"><?php echo getLocalString('privacy') ?></a></li>
</ul>
<!-- Body: Start -->
......@@ -32,11 +32,16 @@ function initConfigOptions(){
global $federationName;
global $supportContactEmail;
global $federationURL;
global $organizationURL;
global $faqURL;
global $helpURL;
global $privacyURL;
global $imageURL;
global $javascriptURL;
global $cssURL;
global $logoURL;
global $smallLogoURL;
global $organizationLogoURL;
global $IDPConfigFile;
global $backupIDPConfigFile;
global $metadataFile;
......@@ -50,13 +55,13 @@ function initConfigOptions(){
// Set independet default configuration options
$defaults = array();
$defaults['defaultLanguage'] = 'en';
$defaults['commonDomain'] = '.switch.ch';
$defaults['commonDomain'] = getTopLevelDomain($_SERVER['SERVER_NAME']);
$defaults['cookieNamePrefix'] = '';
$defaults['cookieSecurity'] = false;
$defaults['cookieValidity'] = 100;
$defaults['showPermanentSetting'] = false;
$defaults['useImprovedDropDownList'] = true;
$defaults['useSAML2Metadata'] = true;
$defaults['useSAML2Metadata'] = false;
$defaults['SAML2MetaOverLocalConf'] = false;
$defaults['includeLocalConfEntries'] = true;
$defaults['enableDSReturnParamCheck'] = true;
......@@ -68,9 +73,13 @@ function initConfigOptions(){
$defaults['useEmbeddedWAYFRefererForPrivacyProtection'] = false;
$defaults['useLogging'] = true;
$defaults['exportPreselectedIdP'] = false;
$defaults['federationName'] = 'SWITCHaai Federation';
$defaults['federationURL'] = 'http://www.switch.ch/aai/';
$defaults['supportContactEmail'] = 'support-contact@example.org';
$defaults['federationName'] = 'Identity Federation';
$defaults['organizationURL'] = 'http://www.'.$defaults['commonDomain'];
$defaults['federationURL'] = $defaults['organizationURL'].'/aai';
$defaults['faqURL'] = $defaults['federationURL'].'/faq';
$defaults['helpURL'] = $defaults['federationURL'].'/help';
$defaults['privacyURL'] = $defaults['federationURL'].'/privacy';
$defaults['supportContactEmail'] = 'support-contact@'.$defaults['commonDomain'];
$defaults['imageURL'] = 'https://'.$_SERVER['SERVER_NAME'].dirname($_SERVER['SCRIPT_NAME']).'/images';
$defaults['javascriptURL'] = 'https://'.$_SERVER['SERVER_NAME'].dirname($_SERVER['SCRIPT_NAME']).'/js';
$defaults['cssURL'] = 'https://'.$_SERVER['SERVER_NAME'].dirname($_SERVER['SCRIPT_NAME']).'/css';
......@@ -97,8 +106,9 @@ function initConfigOptions(){
$defaults['redirectStateCookieName'] = $cookieNamePrefix.'_redirection_state';
$defaults['SAMLDomainCookieName'] = $cookieNamePrefix.'_saml_idp';
$defaults['SPCookieName'] = $cookieNamePrefix.'_saml_sp';
$defaults['logoURL'] = $imageURL.'/switch-aai-transparent.png';
$defaults['smallLogoURL'] = $imageURL.'/switch-aai-transparent-small.png';
$defaults['logoURL'] = $imageURL.'/federation-logo.png';
$defaults['smallLogoURL'] = $imageURL.'/small-federation-logo.png';
$defaults['organizationLogoURL'] = $imageURL.'/organization-logo.png';
// Initialize dependent defaults
foreach($defaults as $key => $value){
......
This diff is collapsed.
......@@ -16,7 +16,8 @@ if(!isset($_SERVER['REMOTE_ADDR']) || basename($_SERVER['SCRIPT_NAME']) == 'temp
function printHeader(){
global $langStrings, $language, $imageURL, $javascriptURL, $cssURL, $logoURL, $useImprovedDropDownList;
global $langStrings, $language, $imageURL, $javascriptURL, $cssURL, $logoURL, $useImprovedDropDownList, $organizationLogoURL;
global $federationURL, $organizationURL, $faqURL, $helpURL, $privacyURL;
// Check if custom header template exists
if(file_exists('custom-header.php')){
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment