Skip to main content

Enable mMTLS authentication to your Django projects

Project description

django-mtls-auth

Beta Dynamic TOML Badge

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:

Project details


Download files

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

Source Distribution

django_mtls_auth-0.2.1.tar.gz (6.1 kB view details)

Uploaded Source

Built Distribution

django_mtls_auth-0.2.1-py3-none-any.whl (7.6 kB view details)

Uploaded Python 3

File details

Details for the file django_mtls_auth-0.2.1.tar.gz.

File metadata

  • Download URL: django_mtls_auth-0.2.1.tar.gz
  • Upload date:
  • Size: 6.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.2 CPython/3.8.18 Darwin/23.5.0

File hashes

Hashes for django_mtls_auth-0.2.1.tar.gz
Algorithm Hash digest
SHA256 bf523bbc6373c282f9bdbba1099055b3688036e6720eaa12f6dfc5e656d984be
MD5 3cbc14c111267dc4b0f9f7f18c7dd8f3
BLAKE2b-256 8d837ed2fb41663e61eec58fd83bbfc61d570bf9aad6d63594714b1cda5d24be

See more details on using hashes here.

File details

Details for the file django_mtls_auth-0.2.1-py3-none-any.whl.

File metadata

File hashes

Hashes for django_mtls_auth-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 3944329866b6f72773db40ae05590d8b2bb15b99ebb751df755b1eedb6065319
MD5 f18a2afe67ddd028c76620107dcc91dc
BLAKE2b-256 92e3bb49a952947000f48da487d7c2eebc9626166dfc478cbdc8b241df2a1a2e

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page