This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (pypi.python.org).
Help us improve Python packaging - Donate today!

Debug Authentication Policy for Pyramid

Project Description
=================
Pyramid_debugauth
=================

Debug Authentication Policy for Pyramid. Provide a simple and standard way to
define the pyramid principals from the HTTP client.

.. warning::

(Obviously) This pyramid is totally unsafe for production and should be
restricted to debug usage / development phase.

* PyPI: https://pypi.python.org/pypi/pyramid_debugauth
* Bitbucket: https://bitbucket.org/Ludia/pyramid_debugauth
* Bugs: https://bitbucket.org/Ludia/pyramid_debugauth/issues


Installation
============

Install using setuptools, e.g. (within a virtualenv)::

$ pip install pyramid_debugauth


Setup
=====

Once ``pyramid_debugauth`` is installed, you can define a authentication policy
with ``config.set_authentication_policy``.

In your Pyramid project:

.. code-block:: python

from pyramid.authorization import ACLAuthorizationPolicy
from pyramid_debugauth import DebugAuthenticationPolicy

config = Configurator(.....)
config.set_authentication_policy(DebugAuthenticationPolicy())
config.set_authorization_policy(ACLAuthorizationPolicy())


Usage
=====

The DebugAuthenticationPolicy allows a client to impersonate any user and
specify any number of principals desired using the standard *Authorization*
http header and a non-standard auth-scheme *Debug* (:rfc:`7235`):

``Authorization: Debug user_id [principal_1] [principal_2] ...``

With common http clients:

$ curl http://localhost:6543 -H 'Authorization: Debug bob admin'

$ http http://localhost:6543 'Authorization: Debug bob admin'


Or using a non-standard *authorization* query parameter:

``http://localhost:6543/protected?authorization=debug%20user_id%20principal_1

With common http clients:

$ curl http://localhost:6543?authorization=debug%20bob%20admin

$ http http://localhost:6543?authorization=debug\ bob\ admin


Development
===========

Running tests::

$ virtualenv venv
$ . venv/bin/activate
(venv)$ pip install -r requirements-test.txt
(venv)$ nosetests
Release History

Release History

This version
History Node

0.1.2

History Node

0.1.1

History Node

0.1.0

History Node

0.0.2

History Node

0.0.1

History Node

0.0.1.dev0

Download Files

Download Files

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

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
pyramid_debugauth-0.1.2.tar.gz (3.9 kB) Copy SHA256 Checksum SHA256 Source Dec 3, 2014

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS 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