Giter Club home page Giter Club logo

django-remote-auth-ldap's Introduction

Django Remote Auth LDAP

Build Status

Purpose

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

Features

Installing

Install with pip/easy_install from the pypi

pip install django-remote-auth-ldap

or clone the latest source

git clone https://github.com/apmorton/django-remote-auth-ldap.git
cd django-remote-auth-ldap
python setup.py install

Using

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

Add the RemoteUserMiddleware class after the AuthenticationMiddleware class

MIDDLEWARE_CLASSES = (
    ...
    'django.contrib.auth.middleware.AuthenticationMiddleware',
    'django_remote_auth_ldap.middleware.RemoteUserMiddleware',
    ...
)

Set the RemoteUserLDAPBackend as the authentication backend

AUTHENTICATION_BACKENDS = (
    'django_remote_auth_ldap.backend.RemoteUserLDAPBackend',
)

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

Settings

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

django-remote-auth-ldap's People

Contributors

apmorton avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.