django-mtls-auth


Namedjango-mtls-auth JSON
Version 0.2.1 PyPI version JSON
download
home_pagehttps://github.com/fretscha/django-mtls-auth
SummaryEnable mMTLS authentication to your Django projects
upload_time2024-08-14 09:01:52
maintainerNone
docs_urlNone
authorFrederic Tschannen
requires_python<4.0,>=3.10
licenseMIT
keywords django tls ssl client-certificate authentication nginx apache2 reverse-proxy
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            
# django-mtls-auth

![Beta](https://img.shields.io/badge/beta-red)
![Dynamic TOML Badge](https://img.shields.io/badge/dynamic/toml?url=https%3A%2F%2Fraw.githubusercontent.com%2Ffretscha%2Fdjango-mtls-auth%2Fmain%2Fpyproject.toml&query=%24.tool.poetry.version&label=latest%20release)



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
```shell script
pip install django-mtls-auth
```

Add it to your `MIDDLEWARE`

```python
MIDDLEWARE = [
    ...
    "mtls_auth.middleware.MTLSAuthenticationMiddleware",
]
```

# Features

- [x] Authentication 
- [ ] Documentation 
- [ ] Authorization 
- [ ] Audit 


# Running Tests

Does the code actually work?
```shell script
cd django-mtls-auth
poetry install

poetry run pytest
# or 
poetry run nox
````


# Credits

Tools used in rendering this package:

* [cookiecutter](https://github.com/audreyr/cookiecutter)
* [django-reusable-app](https://github.com/AndreGuerra123/django-reusable-app)

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/fretscha/django-mtls-auth",
    "name": "django-mtls-auth",
    "maintainer": null,
    "docs_url": null,
    "requires_python": "<4.0,>=3.10",
    "maintainer_email": null,
    "keywords": "django, tls, ssl, client-certificate, authentication, nginx, apache2, reverse-proxy",
    "author": "Frederic Tschannen",
    "author_email": "fretscha@umx.net",
    "download_url": "https://files.pythonhosted.org/packages/8d/83/7ed2fb41663e61eec58fd83bbfc61d570bf9aad6d63594714b1cda5d24be/django_mtls_auth-0.2.1.tar.gz",
    "platform": null,
    "description": "\n# django-mtls-auth\n\n![Beta](https://img.shields.io/badge/beta-red)\n![Dynamic TOML Badge](https://img.shields.io/badge/dynamic/toml?url=https%3A%2F%2Fraw.githubusercontent.com%2Ffretscha%2Fdjango-mtls-auth%2Fmain%2Fpyproject.toml&query=%24.tool.poetry.version&label=latest%20release)\n\n\n\nThis 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.\n\n\nDocumentation\n-------------\n\n~~The full documentation is at https://django-mtls-auth.readthedocs.io.~~\n\nQuickstart\n----------\n\nInstall django-mtls-auth\n```shell script\npip install django-mtls-auth\n```\n\nAdd it to your `MIDDLEWARE`\n\n```python\nMIDDLEWARE = [\n    ...\n    \"mtls_auth.middleware.MTLSAuthenticationMiddleware\",\n]\n```\n\n# Features\n\n- [x]\u00a0Authentication \n- [ ]\u00a0Documentation \n- [ ]\u00a0Authorization \n- [ ]\u00a0Audit \n\n\n# Running Tests\n\nDoes the code actually work?\n```shell script\ncd django-mtls-auth\npoetry install\n\npoetry run pytest\n# or \npoetry run nox\n````\n\n\n# Credits\n\nTools used in rendering this package:\n\n* [cookiecutter](https://github.com/audreyr/cookiecutter)\n* [django-reusable-app](https://github.com/AndreGuerra123/django-reusable-app)\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Enable mMTLS authentication to your Django projects",
    "version": "0.2.1",
    "project_urls": {
        "Documentation": "https://django-mtls-auth.readthedocs.io",
        "Homepage": "https://github.com/fretscha/django-mtls-auth",
        "Repository": "https://github.com/fretscha/django-mtls-auth"
    },
    "split_keywords": [
        "django",
        " tls",
        " ssl",
        " client-certificate",
        " authentication",
        " nginx",
        " apache2",
        " reverse-proxy"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "92e3bb49a952947000f48da487d7c2eebc9626166dfc478cbdc8b241df2a1a2e",
                "md5": "f18a2afe67ddd028c76620107dcc91dc",
                "sha256": "3944329866b6f72773db40ae05590d8b2bb15b99ebb751df755b1eedb6065319"
            },
            "downloads": -1,
            "filename": "django_mtls_auth-0.2.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "f18a2afe67ddd028c76620107dcc91dc",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "<4.0,>=3.10",
            "size": 7638,
            "upload_time": "2024-08-14T09:01:51",
            "upload_time_iso_8601": "2024-08-14T09:01:51.947383Z",
            "url": "https://files.pythonhosted.org/packages/92/e3/bb49a952947000f48da487d7c2eebc9626166dfc478cbdc8b241df2a1a2e/django_mtls_auth-0.2.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "8d837ed2fb41663e61eec58fd83bbfc61d570bf9aad6d63594714b1cda5d24be",
                "md5": "3cbc14c111267dc4b0f9f7f18c7dd8f3",
                "sha256": "bf523bbc6373c282f9bdbba1099055b3688036e6720eaa12f6dfc5e656d984be"
            },
            "downloads": -1,
            "filename": "django_mtls_auth-0.2.1.tar.gz",
            "has_sig": false,
            "md5_digest": "3cbc14c111267dc4b0f9f7f18c7dd8f3",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "<4.0,>=3.10",
            "size": 6137,
            "upload_time": "2024-08-14T09:01:52",
            "upload_time_iso_8601": "2024-08-14T09:01:52.969228Z",
            "url": "https://files.pythonhosted.org/packages/8d/83/7ed2fb41663e61eec58fd83bbfc61d570bf9aad6d63594714b1cda5d24be/django_mtls_auth-0.2.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-08-14 09:01:52",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "fretscha",
    "github_project": "django-mtls-auth",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "django-mtls-auth"
}
        
Elapsed time: 0.46917s