Frankensteining simplesamlphp IDP with mod_shib SP Source
Markdown source
1---2title: 'Frankensteining simplesamlphp IDP with mod_shib SP'3date: '2015-11-23'4published_at: '2015-11-23T16:58:00.003+11:00'5tags: ['open source', 'saml2', 'shibboleth', 'simplesamlphp', 'SSO']6author: 'Gavin Jackson'7excerpt: 'At work we made the tough decision to get rid of Shibboleth 3 as our identity provider. We had encountered some pretty horrific performance issues with Shib3 (which we tried resolving - and sought ass...'8updated_at: '2015-11-23T16:58:56.475+11:00'9legacy_url: 'http://www.gavinj.net/2015/11/frankensteining-simplesamlphp-idp-with.html'10---1112[](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhEYyAKuvB7Hce_9DcTEFkwOsKB5YKhOY6fT0iVqK7wiwXxg4q7S_8SC8VT9NXvK8z-Jw5TgHPR7n4rX0yqV2QCLxV8OY4ISee8Y3SvHt2C61niOgbgCwJttTW259hDQvt5jAQdvFOzhag/s1600/ssplogo-fish-only.jpg)1314At work we made the tough decision to get rid of Shibboleth 3 as our identity provider. We had encountered some pretty horrific performance issues with Shib3 (which we tried resolving - and sought assistance from user mailing lists etc).1516In addition to this we were looking for a solution that aligns better with our system build and deployment procedures (Open Source definitely preferred!).1718My most recent task was to evaluate simplesamlphp as a possible SSO replacement. The first thing I noticed is that is is much simpler to set up than Shibboleth, the same software (which is just a set of php files living in your web root) can be configured to operate in SP or IDP mode.1920The graphical admin UI is terrific.2122One of the downsides is the use of auth_memcookie for sharing shibboleth authentication and attributes with non php web applications - in a nutshell it just did not seem to work as documented (the group authorization options simply didn't work - I raised a bug 11 days ago - https://github.com/mcarbonneaux/Apache-Authmemcookie-Module/issues/5 - which still has not been replied to).2324As the simplesamlphp IDP is excellent (and provided a very easy mechanism to customise), I decided to try pairing it with mod_shib (which is an apache module that implements a SAML2 SP).2526After some relatively minor tweaks, and using the simplesamlphp admin utility to convert the SP metadata into the required PHP config format - it all worked without a hitch - so now we don't have to rewrite our shib SP authorization rules - sweet!2728More benfits from running with a simplesamlphp IDP:2930- Speed - it is so much faster than Shibboleth!3132- Reduced dependencies (no java/tomcat8) means we can switch to an Ubuntu LTS release.3334- Simplesamlphp supports SLO (it actually works! The IDP logs out all SP's when IDP logout is initiated).3536- Simplified deployment - the Ansible playbook is about 30% the size of the shibboleth IDP!3738In a nutshell, I think simplsamlphp IDP and Shibboleth SP is the perfect match!394041