Skip to main content

WSGI Basic Auth

Really simple wsgi middleware to provide basic http auth. It is intented to work with environment variables. This makes it simple to use in a docker context.

Status

https://readthedocs.org/projects/wsgi-basic-auth/badge/?version=latest https://travis-ci.org/mvantellingen/wsgi-basic-auth.svg?branch=master https://ci.appveyor.com/api/projects/status/im609ng9h29vt89r?svg=true http://codecov.io/github/mvantellingen/wsgi-basic-auth/coverage.svg?branch=master https://img.shields.io/pypi/v/wsgi-basic-auth.svg

Getting started

Using this module is really simple. In Django for example edit the wsgi.py file and add the following to the end of the file.

from wsgi_basic_auth import BasicAuth
application = BasicAuth(application)

Now run docker with the env variable WSGI_AUTH_CREDENTIALS=foo:bar and you have to authenticate with username foo and password bar. Multiple credentials are separated with a | (pipe) character.

To exclude specific paths for healthchecks (e.g. the Amazon ELB healthchecks) specify the environment variable WSGI_AUTH_EXCLUDE_PATHS=/api/healthchecks. Here multiple paths can be separated with the ; char.

To include only specific paths specify the environment variable WSGI_AUTH_EXCLUDE_PATHS. Here multiple paths can be separated with the ; char.

You can use both include and exclude paths together for example: WSGI_AUTH_INCLUDE_PATHS=/foo WSGI_AUTH_EXCLUDE_PATHS=/foo/bar This will force Basic Auth on all paths under /foo except /foo/bar

Installation

You can install the latest version using pip:

pip install wsgi-basic-auth

Metadata

Release files for wsgi-basic-auth-isl 1.0.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for wsgi-basic-auth-isl 1.0.4
File Size Uploaded Provenance Actions
wsgi-basic-auth-isl-1.0.4.tar.gz 3.8 kB Without provenance Details for wsgi-basic-auth-isl-1.0.4.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for wsgi-basic-auth-isl 1.0.4
File Interpreter ABI Platform Actions
wsgi_basic_auth_isl-1.0.4-py2.py3-none-any.whl Python 3, Python 2 none any Details for wsgi_basic_auth_isl-1.0.4-py2.py3-none-any.whl

Total release size: 9.2 kB

Release files / wsgi-basic-auth-isl-1.0.4.tar.gz

Download URL wsgi-basic-auth-isl-1.0.4.tar.gz
Size 3.8 kB
Tags Source
SHA-256 checksum
How to use checksums
40f6e21c5bfc3e4053f3c2be1b556a584e39b4f2d3d22b28601d3910929aea95
BLAKE2b-256 checksum
How to use checksums
cd5c9fa288046660ba099223f864c23f9c142c092e92c614c958868c5f0ae68c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / wsgi_basic_auth_isl-1.0.4-py2.py3-none-any.whl

Download URL wsgi_basic_auth_isl-1.0.4-py2.py3-none-any.whl
Size 5.4 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
6e525f521e2257df00e34316b5503397ce93dca0e453c12cbd7044e55a3a606b
BLAKE2b-256 checksum
How to use checksums
78d9da2ea2ae0bd973904c574188f2c42d894046e1aac9033d54da19bb1699ea
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for wsgi-basic-auth-isl 1.0.4

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.

Release history Release notifications | RSS feed

This release

1.0.4 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page