This is a pre-production deployment of Warehouse, however changes made here WILL affect the production instance of PyPI.
Latest Version Dependencies status unknown Test status unknown Test coverage unknown
Project Description

Authentication daemon for nginx-proxied or nginx-served applications.

Installation and Configuration

  1. Create virtual environment for the daemon virtualenv env
  2. Activate it using . ./env/bin/activate
  3. Install nginxauthdaemon from pypi pip install nginxauthdaemon
  4. Create config file overriding default values, see [Daemon configuration]. NB! You need to override default SESSION_SALT, DES_IV and DES_KEY for security.
  5. Setup env variable DAEMON_SETTINGS pointing to your config file.
  6. Run daemon with your favorite WSGI server, for ex gunicorn nginxauthdaemon:app.
  7. Update nginx.conf. See [NGINX Configuration].
  8. Reload nginx (nginx -t reload).
  9. Test your setup.

Daemon configuration

Basic configuration properties are:

Option Description
REALM_NAME Realm name shown on login page
SESSION_COOKIE Session cookie name. Typically you do not need to change this.
TARGET_HEADER Header used to pass protected URL from NGINX
SESSION_SALT Long string used a salt for creation of session key.
DES_IV 8byte initial vector for DES algorithm
DES_KEY 8byte DES encryption key
AUTHENTICATOR Authenticator class name, by default ‘auth.DummyAuthenticator’

Authenticators available out-of-the-box:

Authenticator name Description
nginxauthdaemon.auth.DummyAuthenticator Simplest authenticator checking username equals password
nginxauthdaemon.crowdauth.CrowdAuthenticator Atlassian Crowd based authenticator

Crowd authenticator has additional options:

Option Description
CROWD_URL Crowd server URL, for ex http://localhost:8095/crowd/
CROWD_APP_NAME Crowd application name
CROWD_APP_PASSWORD Crowd application password

NGINX Configuration

Your NGINX should be compiled with ngx_http_auth_request_module. Please check it using nginx -V command.

Example configuration:

upstream auth-backend {
    server 127.0.0.1:5000;
}

location = /auth/validate {
    internal;
    proxy_pass http://auth-backend;

    proxy_pass_request_body off;
    proxy_set_header Content-Length "";
}

location = /auth/login {
    proxy_pass http://auth-backend;
    proxy_set_header X-Target $request_uri;
}

# Protected application
location / {
    auth_request /auth/validate;

    # redirect 401 and 403 to login form
    error_page 401 403 =200 /auth/login;
}

Limitations

Daemon can be extended to support LDAP or any other auth method, but it support only Atlassian Crowd for now. I’ll be happy to merge PRs with new auth methods.

License

The reference implementation is subject to MIT License.

Release History

Release History

1.0.0a3

This version

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

1.0.0a1

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

Download Files

Download Files

TODO: Brief introduction on what you do with files - including link to relevant help section.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
nginxauthdaemon-1.0.0a3-py2.py3-none-any.whl (10.6 kB) Copy SHA256 Checksum SHA256 py2.py3 Wheel Aug 30, 2016
nginxauthdaemon-1.0.0a3.tar.gz (7.9 kB) Copy SHA256 Checksum SHA256 Source Aug 30, 2016

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS HPE HPE Development Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting