Skip to main content
Join the official 2019 Python Developers SurveyStart the survey!

REMOTE_USER authentication using LDAP

Project description

Django Remote Auth LDAP

[![Build Status](](


This app combines [django-auth-ldap]( with django's [RemoteUserBackend](
It allows django applications hosted in IIS to take advantage of Windows Authentication in IIS (401 Challenge) while also having the advanced features offered in `django-auth-ldap`


- [PEP 8]( compliance
- [semver]( compliance


Install with pip/easy_install from the pypi

`pip install django-remote-auth-ldap`

or clone the latest source

git clone
cd django-remote-auth-ldap
python install


In your django file configure django-auth-ldap normally, verify that the configuration is indeed working!

Add the `RemoteUserMiddleware` class after the `AuthenticationMiddleware` class

Set the RemoteUserLDAPBackend as the authentication backend

The application expects the remote user to be in the form `domain\user` (which is how IIS returns it)


There are a few settings you can use to control the behavior

- `DRAL_CHECK_DOMAIN` - Boolean - whether or not to check the domain against a known list - default True
- `DRAL_STRIP_DOMAIN` - Boolean - whether or not to strip the domain off the username before passing to django-auth-ldap - default True
- `DRAL_DOMAINS` - List - list of domains to check against, should be lowercase! - default []
- `DRAL_HEADER` - String - header to check for remote user in - default REMOTE_USER

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for django-remote-auth-ldap, version 1.0.0
Filename, size File type Python version Upload date Hashes
Filename, size django_remote_auth_ldap-1.0.0-py2-none-any.whl (3.9 kB) File type Wheel Python version py2 Upload date Hashes View hashes
Filename, size django-remote-auth-ldap-1.0.0.tar.gz (3.2 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page