Question: I'm investigating the options for using Shibboleth in a Django deployment. From what I've found, things look somewhat sparse. Can anyone comment on the following?

* Is anyone using the django\_shibboleth module (see <http://code.arcs.org.au/gitorious/django/django-shibboleth/trees/1.1>)? If so, what experiences have you had with this module?
* SAML 2 implementations for Django (e.g., django-saml2-sp) and Python in general (e.g., pysaml2) appear to be somewhat experimental and include little documentation. Does anyone know of stable SAML 2 solutions for Django/Python?

Thanks in advance for any help!

Answer: 
I would recommend using the Shibboleth Native SP (apache mod\_shib). It's well tested, has a large user base, and is very stable. 

I took a quick look at the [django\_shibboleth](https://github.com/sorrison/django-shibboleth) module, and it seems that it depends on mod\_shib, and doesn't do any SAML on it's own. In this respect, that module is very simple, and probably works well.

I haven't seen any complete (or mostly complete) python SAML2 implementations, and none that are an active project. The xml security and crypto requirements are a pain in python, and this likely contributes to the lack of libraries. 

[EDIT - I'll recant part of that] The pysaml2 library has some development activity, and looks fairly complete from a cursory glance. It uses the xmlsec1 binary directly for signatures and encryption, and therefore doesn't rely on any outdated bindings. This is likely your best bet for using SAML2 directly in python at the moment.
While I don't have experience with Django+Shibboleth, I have some with "plain" Shibboleth.

If your Apache has mod\_shibboleth configured properly, then integrating it with a web app is relatively trivial. Check out the django\_shibboleth module and you can see it does not contain that much code.

In particular, if you have mod\_shibboleth already running, don't use a third-party SAML 2 library. Those bring a lot of unnecessary complexity.