Enable mTLS authetication to your Django project
Project description
django-tls-auth
This Django middleware package enables authentication via request headers sent by an ingress reverse proxy. It provides a seamless way to integrate with existing reverse proxy setups, allowing developers to authenticate users based on headers such as X-SSL-User-DN
. This approach is particularly useful in microservices architectures, where the reverse proxy handles authentication upstream. This package is designed to be easily configurable, supporting various header names and formats, ensuring flexibility and adaptability to different environments. With this middleware, developers can enhance security and streamline user management across distributed systems, making it an ideal choice for projects leveraging reverse proxies for authentication.
Documentation
The full documentation is at https://django-tls-auth.readthedocs.io.
Quickstart
Install django-tls-auth
pip install django-tls-auth
Add it to your MIDDLEWARE
MIDDLEWARE = [
...
"tls_auth.middleware.TLSAuthenticationMiddleware",
]
Features
- [x] Authentication
- [ ] Documentation
- [ ] Authorization
- [ ] Audit
Running Tests
Does the code actually work?
cd django-tls-auth
poetry install
poetry run pytest
# or
poetry run nox
Credits
Tools used in rendering this package:
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file django_mtls_auth-0.2.0.tar.gz
.
File metadata
- Download URL: django_mtls_auth-0.2.0.tar.gz
- Upload date:
- Size: 6.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.2 CPython/3.8.18 Darwin/23.5.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 52e852ceb573ca18da436fbdf4d2ba72dbb32b0de1434f8b107a19c0d4422d48 |
|
MD5 | 588dc2f96015c2a4fc96d75085667d36 |
|
BLAKE2b-256 | fac9ac3e9329878e1eccb48c06b540cfb23138a01ed7780cafa3cf384954aa8d |
File details
Details for the file django_mtls_auth-0.2.0-py3-none-any.whl
.
File metadata
- Download URL: django_mtls_auth-0.2.0-py3-none-any.whl
- Upload date:
- Size: 7.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.2 CPython/3.8.18 Darwin/23.5.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e3dc009d9153dc7ea2f7a981f664faa28d045544a2dd83f1dc438c1f824372be |
|
MD5 | 27c0eb317662522dde56223670f39a69 |
|
BLAKE2b-256 | c8d12d8e8b62a1ff921489ab288b3fac53e39b71776e44cf3af810fe30af7f8e |