{"id":75,"date":"2013-05-21T17:17:53","date_gmt":"2013-05-21T17:17:53","guid":{"rendered":"http:\/\/blogs.kent.ac.uk\/unseenit\/?p=75"},"modified":"2013-05-21T17:17:53","modified_gmt":"2013-05-21T17:17:53","slug":"segmenting-our-saml2-infrastructure","status":"publish","type":"post","link":"https:\/\/blogs.kent.ac.uk\/unseenit\/segmenting-our-saml2-infrastructure\/","title":{"rendered":"Segmenting our SAML2 infrastructure"},"content":{"rendered":"<p>Following a few questions around how and why we&#8217;ve set up our SAML2 (Shibboleth and other) infrastructure I thought I&#8217;d write a proper post about how we do various forms of Identity Federation in the SAML2 world.<\/p>\n<h1>History<\/h1>\n<p>A brief note on history\u2026 we started down the Shibboleth path with no prior knowledge back on Shibboleth 1 IdP on a pair of Solaris hosts in a\u00a0<em>primary<\/em>&#8211;<em>failover<\/em> model (using <a href=\"http:\/\/www.linuxvirtualserver.org\/\">LVS<\/a>). This allowed us to have mock-high-availability without needing to understand or handle any state sharing between nodes \u2013 users caught in the middle of an authentication hop during a failover would see an error but running the process again should complete successfully. Our usage wasn&#8217;t high so this was deemed\u00a0<em>good enough<\/em>.<\/p>\n<p>Authentication was handled by our then central Single Sign On system in the form of Sun Access Manager and then Sun <a href=\"http:\/\/en.wikipedia.org\/wiki\/OpenSSO\">OpenSSO<\/a> (using the Apache level agent and pushing REMOTE_USER into Tomcat). We also started rolling out\u00a0<em>SSO<\/em> to other key systems.<\/p>\n<h1>Replacing OpenSSO with SimpleSAMLphp<\/h1>\n<p>A few years ago we decided to move from the very feature rich and complicated OpenSSO platform to the simpler <a href=\"http:\/\/simplesamlphp.org\/\">SimpleSAMLphp<\/a> platform to provide our core IdP functionality. This meant that we could no longer use the <del>Sun<\/del>Oracle provided agent to hand-off the authn and provide seamless single sign on across our existing estate and needed another solution.<\/p>\n<p>We opted, at the time, for <a href=\"http:\/\/authmemcookie.sourceforge.net\/\">mod_auth_memcookie<\/a> over <a href=\"http:\/\/code.google.com\/p\/modmellon\/\">mod_mellon<\/a> as it was, again, simpler and, given we were using it on Solaris, was a lot easier to get working (mod_mellon required a load of SAML libraries where mod_auth_memcookie just handed it off to PHP to deal with).<\/p>\n<p>Over time we have retired our Solaris IdPs and moved them to RHEL but have retained the primary-failover model using mod_auth_memcookie to keep the user\u00a0experience\u00a0seamless.<\/p>\n<p>SimpleSAMLphp+mod_auth_memcookie served us well.<\/p>\n<h1>Office365 rollout<\/h1>\n<p>When approaching our\u00a0<em>upgrade<\/em>\u00a0from Live@EDU to Office365, at which time we&#8217;d become responsible for the authentication of users rather than replicating passwords up to the Microsoft Cloud and letting them do it all, we opted for Shibboleth over ADFS to carry out this function as we understood it and trusted it more than a piece of software we knew nothing about.<\/p>\n<p>Not knowing entirely how much load our ~22,000 active users would put on our local infrastructure, we opted to build two new properly load balanced (and therefore easily scaled out) IdPs to handle the Office365 traffic but also wanted to maintain our seamless SSO so needed them tied into the central SimpleSAMLphp IdP, too.<\/p>\n<p>Initially we were going to retain the mod_auth_memcookie+SimpleSAMLphp+memcached model but, during testing, it quickly became apparent that Microsoft were using the SAML2 POST profile which isn&#8217;t supported by mod_auth_memcookie. Fortunately for us, mod_mellon does! \ud83d\ude42<\/p>\n<p>Moving to mod_mellon had the unexpected benefit of removing the need for PHP or memcached to be running on our IdPs and, thankfully, the Office365 SP talks pure SAML2 and so doesn&#8217;t need any state preservation for Artefact resolution (as it&#8217;s all done via the browser) \u2013 so we didn&#8217;t need to share state between our N (currently 2) IdPs.<\/p>\n<h1>\u00a0Summary<\/h1>\n<p>We keep a local clustered Identity Provider running SimpleSAMLphp (and memcached) as our <em>standard<\/em> way of federating locally.<\/p>\n<p>This central IdP functions as the\u00a0<em>upstream<\/em>\u00a0SAML2 service for our two load balanced, outward facing Shibboleth based Identity Providers \u2013 one for UK Access Management Federation and one for Office365 and using mod_auth_memcookie and mod_mellon respectively.<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Following a few questions around how and why we&#8217;ve set up our SAML2 (Shibboleth and other) infrastructure I thought I&#8217;d write a proper post about &hellip; <a href=\"https:\/\/blogs.kent.ac.uk\/unseenit\/segmenting-our-saml2-infrastructure\/\">Read&nbsp;more<\/a><\/p>\n","protected":false},"author":13,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[1],"tags":[],"_links":{"self":[{"href":"https:\/\/blogs.kent.ac.uk\/unseenit\/wp-json\/wp\/v2\/posts\/75"}],"collection":[{"href":"https:\/\/blogs.kent.ac.uk\/unseenit\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blogs.kent.ac.uk\/unseenit\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blogs.kent.ac.uk\/unseenit\/wp-json\/wp\/v2\/users\/13"}],"replies":[{"embeddable":true,"href":"https:\/\/blogs.kent.ac.uk\/unseenit\/wp-json\/wp\/v2\/comments?post=75"}],"version-history":[{"count":7,"href":"https:\/\/blogs.kent.ac.uk\/unseenit\/wp-json\/wp\/v2\/posts\/75\/revisions"}],"predecessor-version":[{"id":82,"href":"https:\/\/blogs.kent.ac.uk\/unseenit\/wp-json\/wp\/v2\/posts\/75\/revisions\/82"}],"wp:attachment":[{"href":"https:\/\/blogs.kent.ac.uk\/unseenit\/wp-json\/wp\/v2\/media?parent=75"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blogs.kent.ac.uk\/unseenit\/wp-json\/wp\/v2\/categories?post=75"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blogs.kent.ac.uk\/unseenit\/wp-json\/wp\/v2\/tags?post=75"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}