repoze.what
– Authorization for WSGI applications¶
Author: | Gustavo Narea. |
---|---|
Latest version: | 1.0.9 |
Overview
repoze.what
is an authorization framework for WSGI applications,
based on repoze.who
(which deals with authentication and
identification).
On the one hand, it enables an authorization system based on the groups to which the authenticated or anonymous user belongs and the permissions granted to such groups by loading these groups and permissions into the request on the way in to the downstream WSGI application.
And on the other hand, it enables you to manage your groups and permissions from the application itself or another program, under a backend-independent API. For example, it would be easy for you to switch from one back-end to another, and even use this framework to migrate the data.
This is just the authorization pattern it supports out-of-the-box, but you can may it support other authorization patterns with your own predicates. It’s highly extensible, so it’s very unlikely that it will get in your way – Among other things, you can extend it to check for many conditions (such as checking that the user comes from a given country, based on her IP address, for example).
Features¶
Unless mentioned otherwise, the following features are available in
repoze.what
and its official plugins:
Web framework independent
. You can use it on any WSGI application and any WSGI framework (or no framework at all). Web frameworks may provide integration with it (like TurboGears 2, which features a strong integration withrepoze.what
).Authorization only
. It doesn’t try to be an all-in-one auth monster – it will only do authorization and nothing else.Highly extensible
. It’s been created with extensibility in mind, so that it won’t get in your way and you can control authorization however you want or need, either with official components, third party plugins or your own plugins.Fully documented
. If it’s not described in the manual, it doesn’t exist. Everything is documented along with examples.Reliable
. We are committed to keep the code coverage at 100%.Control access to any resource
. Although it’s only recommended to control authorization on action controllers, you can also use it to restrict access to other things in your package (e.g., only allow access to a database table if the current user is the admin).- If you use the groups/permissions-based authorization pattern, your
application’s groups and permissions may be stored in an SQLAlchemy
or Elixir-managed database, in
.ini
files or in XML files (although you may also create your ownadapters
!). - The only requirement is that you use the powerful and extensible
repoze.who
authentication framework (which can be configured for you with thequickstart <repoze.what.plugins.quickstart
plugin). - It works with Python 2.4, 2.5 and 2.6.
- It’s not hard to get started!
And according to the to-do list, we will have official plugins to:
- Enable OAuth support.
- Enable authorization based on certain network conditions (e.g., grant access if the user’s IP address belongs to a given IP range, deny access if the user’s host name is “example.org”, grant access based on the user’s ISP).
- Enable authorization based on client-side SSL certificates (e.g., allow access if the Certificate Authority is XYZ, allow access if the user is called “John Smith” or “Foo Bar”).
- Enable authorization based on LDAP attributes of the authenticated user’s entry (e.g., allow access if the user can be reached at a cellular phone, allow access if the user belongs to the “ABC” organization), as well as the ability to re-use LDAP Organizational Units as groups.
- Enable a highly extensible CAPTCHA driven authorization mechanism to restrict access to a given resource (possibly the hardest to create plugin).
- Store groups in
Htgroups
.
How to install¶
The only requirement of repoze.what
is repoze.who
and you can
install both by running:
easy_install repoze.what
The development mainline is available at the following Subversion repository:
http://svn.repoze.org/repoze.what/branches/1.X/
Framework-specific documentation¶
The following documents will help you implement repoze.what
in your
framework (if any):
- TurboGears:
repoze.who
andrepoze.what
are the default authentication and authorization frameworks (respectively) in TurboGears 2 applications. Learn more about them inside TurboGears. - Authorization with repoze.what on Pylons.
If you have written documents to implement repoze.what
in a web
framework, please let us know
to get a link here.
How to get help?¶
The prefered place to ask questions is the Repoze mailing list or the #repoze IRC channel. Bugs reports and feature requests should be sent to the issue tracker of the Repoze project.
If you have problems, please don’t forget to include the output of your
application with the AUTH_LOG
environment variable set to 1
when you
get in touch with us. For example, if your application is based on TurboGears
or Pylons, you may run it with the following command:
AUTH_LOG=1 paster serve --reload development.ini
Contents¶
- The
repoze.what
Manual repoze.what
releasesrepoze.what
1.0.9 (2010-03-04)repoze.what
1.0.8 (2009-03-14)repoze.what
1.0.7 (2009-03-13)repoze.what
1.0.6 (2009-03-05)repoze.what
1.0.5 (2009-03-02)repoze.what
1.0.4 (2009-02-06)repoze.what
1.0.3 (2009-01-28)repoze.what
1.0.2 (2009-01-23)repoze.what
1.0.1 (2009-01-21)repoze.what
1.0 (2009-01-19)repoze.what
1.0rc2 (2008-12-20)repoze.what
1.0rc1 (2008-12-10)repoze.what.plugins.ini
– Ini adapters available (2008-12-09)repoze.what
1.0b2 (2008-12-04)repoze.what
1.0b1 (2008-11-26)
- Participate in the development of
repoze.what
!