diff --git a/docs/source/simplesamlphp-install.xml b/docs/source/simplesamlphp-install.xml index 69e644b30f221c112ee4136c8d0801ae695aee37..3ffd86fcb39bb32b25c6bacc981ff535798986d5 100644 --- a/docs/source/simplesamlphp-install.xml +++ b/docs/source/simplesamlphp-install.xml @@ -42,6 +42,50 @@ <para>Here is changes between simpleSAML versions. Look here if you are upgrading, to see if there are any changes to the config format.</para> + <section> + <title>Version 0.5</title> + + <para>Released . Revision X.</para> + + <itemizedlist> + <listitem> + <para>Metadata files have been more tidy. Removed unused entries. + Look at the new templates on how to change your existing + metadata.</para> + </listitem> + + <listitem> + <para>Support for sending metadata on mail to Feide. Automatically + detecting if you have configured Feide as the default IdP.</para> + </listitem> + + <listitem> + <para>Improved SAML 2.0 Metadata generation</para> + </listitem> + + <listitem> + <para>Added support for Shibboleth 1.3 IdP functionality.</para> + </listitem> + + <listitem> + <para>Added RADIUS authentication backend</para> + </listitem> + + <listitem> + <para>Added support for HTTP-Redirect debugging when enable + <literal>debug=true</literal></para> + </listitem> + + <listitem> + <para>SAML 2.0 SP example now contains a logout page.</para> + </listitem> + + <listitem> + <para>Fixed some minor bugs.</para> + </listitem> + </itemizedlist> + </section> + <section> <title>Version 0.4</title> @@ -230,7 +274,7 @@ cp -r metadata-templates/*.php metadata/ <para>There is one parameter debug that may be set to true or false. If you set it to true, then all Browser/POST SAML messages will be printed to - the web browser, and the user will have to manually submit it. </para> + the web browser, and the user will have to manually submit it.</para> <para>The session.duration parameter says how many seconds that a session should be valid. After this amont of time, the session is not valid @@ -334,8 +378,8 @@ cp -r metadata-templates/*.php metadata/ <title>Setting up a Shibboleth 1.3 SP</title> <para>If you want to configure a service with authentication towards an - external Shibboleth 1.3 IdP, this section describes you how to proceed. - </para> + external Shibboleth 1.3 IdP, this section describes you how to + proceed.</para> <section> <title>Configuring metadata for Shibboleth 1.3 SP</title> @@ -542,8 +586,8 @@ openssl x509 -req -days 60 -in server2.csr -signkey server2.key -out server2.crt <section> <title>Authentication API</title> - <para>The authentication plugin should be placed in the auth directory. - </para> + <para>The authentication plugin should be placed in the auth + directory.</para> <para>The following parameters must be accepted in the incomming URL:</para> diff --git a/lib/SimpleSAML/Bindings/SAML20/HTTPPost.php b/lib/SimpleSAML/Bindings/SAML20/HTTPPost.php index 1e71b49bc31dcc3e828356832c07df0aba710958..478c52e4bf413fd7368607bb053f336aa7215ded 100644 --- a/lib/SimpleSAML/Bindings/SAML20/HTTPPost.php +++ b/lib/SimpleSAML/Bindings/SAML20/HTTPPost.php @@ -14,7 +14,9 @@ require_once('SimpleSAML/Configuration.php'); require_once('SimpleSAML/XML/MetaDataStore.php'); require_once('SimpleSAML/XML/SAML20/AuthnResponse.php'); - +require_once('SimpleSAML/XHTML/Template.php'); + + /** * Configuration of SimpleSAMLphp */ diff --git a/lib/SimpleSAML/Bindings/SAML20/HTTPRedirect.php b/lib/SimpleSAML/Bindings/SAML20/HTTPRedirect.php index eba7383df0ae14f7637c9fec3e3bcb0124cc82b1..64856816fb18ea2af8ea18c4aed4491663daf438 100644 --- a/lib/SimpleSAML/Bindings/SAML20/HTTPRedirect.php +++ b/lib/SimpleSAML/Bindings/SAML20/HTTPRedirect.php @@ -13,7 +13,9 @@ require_once('SimpleSAML/Configuration.php'); require_once('SimpleSAML/XML/MetaDataStore.php'); - +require_once('SimpleSAML/XHTML/Template.php'); + + /** * Configuration of SimpleSAMLphp */ @@ -46,8 +48,25 @@ class SimpleSAML_Bindings_SAML20_HTTPRedirect { $redirectURL .= "&RelayState=" . urlencode($relayState); } + if ($this->configuration->getValue('debug')) { + + $p = new SimpleSAML_XHTML_Template($this->configuration, 'httpredirect-debug.php'); + + $p->data['header'] = 'HTTP-REDIRECT Debug'; + $p->data['url'] = $redirectURL; + $p->data['message'] = htmlentities($request); + + $p->show(); + + + } else { - header("Location: " . $redirectURL); + header("Location: " . $redirectURL); + + + } + + } diff --git a/templates/httpredirect-debug.php b/templates/httpredirect-debug.php new file mode 100644 index 0000000000000000000000000000000000000000..a4633cacc1e48657d09d5e6100f21d4ad2957985 --- /dev/null +++ b/templates/httpredirect-debug.php @@ -0,0 +1,89 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> +<title><?php echo $data['header']; ?></title> +<script> +<!-- +function sf(){document.f.username.focus();} +// --> +</script> +<style type="text/css"> + +/* these styles are in the head of this page because this is a unique page */ + +/* THE BIG GUYS */ +* {margin:0;padding:0} +body {text-align:center;padding: 20px 0;background: #222;color:#333;font:83%/1.5 arial,tahoma,verdana,sans-serif} +img {border:none;display:block} +hr {margin: 1em 0;background:#eee;height:1px;color:#eee;border:none;clear:both} + +/* LINKS */ +a,a:link,a:link,a:link,a:hover {font-weight:bold;background:transparent;text-decoration:underline;cursor:pointer} +a:link {color:#c00} +a:visited {color:#999} +a:hover,a:active {color:#069} + +/* LISTS */ +ul {margin: .3em 0 1.5em 2em} + ul.related {margin-top:-1em} +li {margin-left:2em} +dt {font-weight:bold} +#wrap {border: 1px solid #fff;position:relative;background:#fff;width:600px;margin: 0 auto;text-align:left} +#header {background: #666 url("/<?php echo $data['baseurlpath']; ?>resources/sprites.gif") repeat-x 0 100%;margin: 0 0 25px;padding: 0 0 8px} +#header h1 {color:#fff;font-size: 145%;padding:20px 20px 12px} +#poweredby {width:96px;height:63px;position:absolute;top:0;right:0} +#content {padding: 0 20px} + +/* TYPOGRAPHY */ +p, ul, ol {margin: 0 0 1.5em} +h1, h2, h3, h4, h5, h6 {letter-spacing: -1px;font-family: arial,verdana,sans-serif;margin: 1.2em 0 .3em;color:#000;border-bottom: 1px solid #eee;padding-bottom: .1em} +h1 {font-size: 196%;margin-top:0;border:none} +h2 {font-size: 136%} +h3 {font-size: 126%} +h4 {font-size: 116%} +h5 {font-size: 106%} +h6 {font-size: 96%} + +.old {text-decoration:line-through} +</style> +</head> +<body onload="sf();"> + +<div id="wrap"> + + <div id="header"> + <h1>simpleSAMLphp HTTP-REDIRECT debug</h1> + <div id="poweredby"><img src="/<?php echo $data['baseurlpath']; ?>resources/icons/debug.png" alt="Debug" /></div> + </div> + + <div id="content"> + + + + <h2>Sending a SAML message using HTTP-REDIRECT</h2> + + <p>You are about to send a SAML message using HTTP REDIRECT. Here is the message:</p> + + <pre style="overflow: scroll; border: 1px solid #eee"><?php echo $data['message']; ?></pre> + + <p>[ <a href="<?php echo htmlentities($data['url']); ?>">send SAML message</a> ]</p> + + <h2>Debug mode</h2> + + <p>As you are in debug mode you are lucky to see the content of the response you are sending. You can turn off debug mode in the global simpleSAMLphp configuration file <tt>config/config.php</tt>.</p> + + + + <hr /> + + Copyright © 2007 <a href="http://rnd.feide.no/">Feide RnD</a> + + <hr /> + + </div> + +</div> + +</body> +</html> diff --git a/www/example-simple/saml2-example.php b/www/example-simple/saml2-example.php index 7da667c980c341758109721c7706a80661c17125..80c3d4eabd10648f82fa1fcad66f37b8c02c20d7 100644 --- a/www/example-simple/saml2-example.php +++ b/www/example-simple/saml2-example.php @@ -44,8 +44,14 @@ $et->data['header'] = 'SAML 2.0 SP Demo Example'; $et->data['remaining'] = $session->remainingTime(); $et->data['attributes'] = $attributes; $et->data['valid'] = $session->isValid() ? 'Session is valid' : 'Session is invalid'; + +$et->data['logout'] = '<p>[ <a href="/' . $config->getValue('baseurlpath') . 'saml2/sp/initSLO.php?RelayState=/' . + $config->getValue('baseurlpath') . 'logout.html">Logout</a> ]'; + +/* $et->data['logout'] = '[ <a href="https://sam.feide.no/amserver/saml2/jsp/idpSingleLogoutInit.jsp?binding=urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect">IdP intiated logout from Feide (only if you are connected to the Feide IdP)</a> ]</p> <p>[ <a href="/' . $config->getValue('baseurlpath') . 'saml2/sp/initSLO.php?RelayState=' . urlencode(SimpleSAML_Utilities::selfURL()) . '">SP initated logout</a> ]'; +*/ $et->show(); diff --git a/www/logout.html b/www/logout.html new file mode 100644 index 0000000000000000000000000000000000000000..48f37666f97c6e9855d48bc8aa0964693a9c26fe --- /dev/null +++ b/www/logout.html @@ -0,0 +1,83 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> +<title>simpleSAMLphp Logout</title> + +<style type="text/css"> + +/* these styles are in the head of this page because this is a unique page */ + +/* THE BIG GUYS */ +* {margin:0;padding:0} +body {text-align:center;padding: 20px 0;background: #222;color:#333;font:83%/1.5 arial,tahoma,verdana,sans-serif} +img {border:none;display:block} +hr {margin: 1em 0;background:#eee;height:1px;color:#eee;border:none;clear:both} + +/* LINKS */ +a,a:link,a:link,a:link,a:hover {font-weight:bold;background:transparent;text-decoration:underline;cursor:pointer} +a:link {color:#c00} +a:visited {color:#999} +a:hover,a:active {color:#069} + +/* LISTS */ +ul {margin: .3em 0 1.5em 2em} + ul.related {margin-top:-1em} +li {margin-left:2em} +dt {font-weight:bold} +#wrap {border: 1px solid #fff;position:relative;background:#fff;width:600px;margin: 0 auto;text-align:left} +#header {background: #666 url("resources/sprites.gif") repeat-x 0 100%;margin: 0 0 25px;padding: 0 0 8px} +#header h1 {color:#fff;font-size: 145%;padding:20px 20px 12px} +#poweredby {width:96px;height:63px;position:absolute;top:0;right:0} +#content {padding: 0 20px} + +/* TYPOGRAPHY */ +p, ul, ol {margin: 0 0 1.5em} +h1, h2, h3, h4, h5, h6 {letter-spacing: -1px;font-family: arial,verdana,sans-serif;margin: 1.2em 0 .3em;color:#000;border-bottom: 1px solid #eee;padding-bottom: .1em} +h1 {font-size: 196%;margin-top:0;border:none} +h2 {font-size: 136%} +h3 {font-size: 126%} +h4 {font-size: 116%} +h5 {font-size: 106%} +h6 {font-size: 96%} + +.old {text-decoration:line-through} +</style> +</head> +<body> + +<div id="wrap"> + + <div id="header"> + <h1>You have logged out</h1> + <div id="poweredby"><img src="resources/icons/compass_l.png" alt="Bino" /></div> + </div> + + <div id="content"> + + <h2>Thanks, and welcome back.</h2> + + <p>Thanks for using this service. Now you are logged out using Single Logout.</p> + + <p>[ <a href="index.html">Go back to simpleSAMLphp installation page</a> ]</p></p> + + <h2>About simpleSAMLphp</h2> + <p>Hey! This simpleSAMLphp thing is pretty cool, where can I read more about it? + You can find more information about simpleSAMLphp at <a href="http://rnd.feide.no">the Feide RnD blog</a> over at <a href="http://uninett.no">UNINETT</a>.</p> + + + + + + <hr /> + + Copyright © 2007 <a href="http://rnd.feide.no/">Feide RnD</a> + + <hr /> + + </div> + +</div> + +</body> +</html>