Get Shibboleth environment variables with Python

James Dore james.dore at new.ox.ac.uk
Tue May 13 10:41:37 EDT 2014


Hi list,

I’m trying to set up our Wireless authentication portal to use shibboleth, so that we may make use of our University’s Single-Sign On system within our unit. 

We have a simple web-based portal supplied by the wifi vendor (Ruckus) which will allow authenticated access (against a local RADIUS server) and unauthenticated access by just providing an email address to it. I have hidden this behind a Shibboleth SP (Windows, Apache2.2, Python 2.7) and will be using the unauthenticated part of the portal, figuring the user has *just* authenticated to Shibboleth and are therefore OK. It also simplifies the Wireless login process considerably, as the incoming attributes (email address) don’t have to exactly match any held in a RADIUS server. 

The portal is made up of a mix of Python scripts and a Javascript page. I’d like to grab the data coming from a shibboleth session with python and pass it to the controller so the user only has to enter data once, at the Shibboleth login page. 

How do I capture the Shibboleth environment variables with Python? I’ve written a small script that dumps out all the OS variables which Python can see, and it runs immediately after a Shibboleth login. I was expecting to see REMOTE_USER at least, but it does not appear. 

Am I considering the correct environment variables? Do I need to do something within the shibd config to enable it?

Many thanks for considering what are undoubtedly basic questions - however, I’ve been googling for a while and can’t tell if I’ve got hold of the wrong end of the stick, have misunderstood something obvious, or am just missing some vital piece of info!

Cheers,
James




More information about the users mailing list