Django RemoteUserBackend for REMOTE_USER authentication and LDAP authorisation.
This class was written to integrate a django app with our LDAP/Kerberos setup. Apache handles Kerberos and passes the name of an authorised user via the REMOTE_USER variable. This script does a simple LDAP lookup to determine if the user…
Django Middleware Order
I got stung by this today. I was presented with the following error: The Django remote user auth middleware requires the authentication middleware to be installed. Edit your MIDDLEWARE_CLASSES setting to insert ‘django.contrib.auth.middleware.AuthenticationMiddleware’ before the RemoteUserMiddleware class. Even though my…