=========================
[](https://travis-ci.org/apmorton/django-remote-auth-ldap)
Purpose
-------
This app combines [django-auth-ldap](http://pythonhosted.org/django-auth-ldap/) with django's [RemoteUserBackend](https://docs.djangoproject.com/en/dev/howto/auth-remote-user/)
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
--------
- [PEP 8](http://www.python.org/dev/peps/pep-0008/) compliance
- [semver](http://semver.org/) compliance
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
```python
MIDDLEWARE_CLASSES = (
...
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django_remote_auth_ldap.middleware.RemoteUserMiddleware',
...
)
```
Set the RemoteUserLDAPBackend as the authentication backend
```python
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
Metadata
Release files for django-remote-auth-ldap 1.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| django-remote-auth-ldap-1.0.0.tar.gz | 3.2 kB | Without provenance | Details for django-remote-auth-ldap-1.0.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| django_remote_auth_ldap-1.0.0-py2-none-any.whl | Python 2 | none | any | Details for django_remote_auth_ldap-1.0.0-py2-none-any.whl |
Total release size: 7.1 kB
Release files / django-remote-auth-ldap-1.0.0.tar.gz
| Download URL | django-remote-auth-ldap-1.0.0.tar.gz |
|---|---|
| Size | 3.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f6b0e0ff05f1b7a94415a060e5783b765b9211f67a14e4eea21f71347e672661
|
|
BLAKE2b-256 checksum How to use checksums |
a9e3e036d240dfc2a21bbadc4451337e89b1c72cfd061721eb8b3b96d7b28bc8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/39.2.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/2.7.15
|
Release files / django_remote_auth_ldap-1.0.0-py2-none-any.whl
| Download URL | django_remote_auth_ldap-1.0.0-py2-none-any.whl |
|---|---|
| Size | 3.9 kB |
| Tags | Python 2 |
|
SHA-256 checksum How to use checksums |
d61b55a20530a109a9d68864c2fa4761fbbfceea42b55416c369293ec39646ae
|
|
BLAKE2b-256 checksum How to use checksums |
f51373bc3348fdb01f04403183042107265eeb5412848bae56dd337fa435f670
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/39.2.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/2.7.15
|
Security for django-remote-auth-ldap 1.0.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.