https://github.com/joshbenner/httpauthproxy
Simple Python HTTP service that proxies authentication requests to backend services, such as LDAP.
https://github.com/joshbenner/httpauthproxy
authentication ldap nginx python python3
Last synced: about 1 month ago
JSON representation
Simple Python HTTP service that proxies authentication requests to backend services, such as LDAP.
- Host: GitHub
- URL: https://github.com/joshbenner/httpauthproxy
- Owner: joshbenner
- License: mit
- Created: 2018-02-01T03:00:51.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2018-03-01T15:06:25.000Z (over 8 years ago)
- Last Synced: 2025-10-23T16:49:15.017Z (8 months ago)
- Topics: authentication, ldap, nginx, python, python3
- Language: Python
- Size: 11.7 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.rst
- License: LICENSE
Awesome Lists containing this project
README
authproxy
=========
A simple Python 3 service that accepts HTTP requests with an
``Authorization`` header, and authenticates the credentials against an
identity backend service, such as LDAP.
This is particularly useful in combination with
`ngx_http_auth_request_module `_.
Usage
-----
::
usage: httpauthproxy.py [-h] [-b BIND] -u URL [-p] [--ca-certs-file]
[--ca-certs-dir] [--no-verify] [--ldap-user-pattern]
[--ldap-member-attr]
Simple HTTP server to proxy authentication requests.
optional arguments:
-h, --help show this help message and exit
-b BIND, --bind BIND IP:port to bind to (default: 127.0.0.1:8018)
-u URL, --url URL URL of auth server (multiple, required)
-p, --prompt Return 401 when unauthorized
--ca-certs-file Path to CA certs bundle file
--ca-certs-dir Path to directory containing CA certs
--no-verify Skip TLS verification
--ldap-user-pattern User DN string with {} for username
--ldap-member-attr User attribute containing group memberships
Example
-------
.. code-block:: bash
authproxy -u ldaps://ipa.localdomain.tld \
--ca-certs-file /etc/ipa/ca.crt \
--ldap-user-pattern uid={},cn=users,cn=accounts,dc=localdomain,dc=tld