django-mtls-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-mtls-auth.readthedocs.io.
Quickstart
Install django-mtls-auth
pip install django-mtls-auth
Add it to your MIDDLEWARE
MIDDLEWARE = [
...
"mtls_auth.middleware.MTLSAuthenticationMiddleware",
]
Features
- [x] Authentication
- [ ] Documentation
- [ ] Authorization
- [ ] Audit
Running Tests
Does the code actually work?
cd django-mtls-auth
poetry install
poetry run pytest
# or
poetry run nox
Credits
Tools used in rendering this package:
Metadata
Release files for django-mtls-auth 0.2.1
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_mtls_auth-0.2.1.tar.gz | 6.1 kB | Without provenance | Details for django_mtls_auth-0.2.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| django_mtls_auth-0.2.1-py3-none-any.whl | Python 3 | none | any | Details for django_mtls_auth-0.2.1-py3-none-any.whl |
Total release size: 13.8 kB
Release files / django_mtls_auth-0.2.1.tar.gz
| Download URL | django_mtls_auth-0.2.1.tar.gz |
|---|---|
| Size | 6.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
bf523bbc6373c282f9bdbba1099055b3688036e6720eaa12f6dfc5e656d984be
|
|
BLAKE2b-256 checksum How to use checksums |
8d837ed2fb41663e61eec58fd83bbfc61d570bf9aad6d63594714b1cda5d24be
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.8.2 CPython/3.8.18 Darwin/23.5.0
|
Release files / django_mtls_auth-0.2.1-py3-none-any.whl
| Download URL | django_mtls_auth-0.2.1-py3-none-any.whl |
|---|---|
| Size | 7.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
3944329866b6f72773db40ae05590d8b2bb15b99ebb751df755b1eedb6065319
|
|
BLAKE2b-256 checksum How to use checksums |
92e3bb49a952947000f48da487d7c2eebc9626166dfc478cbdc8b241df2a1a2e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.8.2 CPython/3.8.18 Darwin/23.5.0
|
Security for django-mtls-auth 0.2.1
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.