wiki:ModWsgiAcctmgrScript

Mod_WSGI Account manager

Description

This plugin uses the AccountManagerPlugin to provide authentication to Apache.

Bugs/Feature Requests

Existing bugs and feature requests for ModWsgiAcctmgrScript are here.

If you have any issues, create a new ticket.

defect

1 / 1

Download

Download the zipped source from here.

Source

You can check out ModWsgiAcctmgrScript from here using Subversion, or browse the source with Trac.

Example

Apache configuration for a single host

WSGIPythonPath /var/trac-0.11dev/lib/python2.4/site-packages
<VirtualHost *:80>
  ServerName hostname.domain
  <Location /svn>
    DAV svn
    SVNPath /srv/trac/svn/it
    AuthType Basic
    AuthName "Account Manager Auth"
    AuthBasicProvider wsgi
    WSGIAuthUserScript /path/to/script/acctmgr_auth.wsgi
    Require valid-user
  </Location>
</VirtualHost>

The TRAC_ENV and PYTHON_EGG_CACHE need to be modified and set inside the script.

Configuration for multiple hosts

First you need the patch from ticket #8525.

The patch adds a function, that analyzes the REQUEST_URI and takes the part between TRAC_REQUEST_LOCATION and the next "/" as a part of the folder to the Trac environment.

Apache:

WSGIPythonPath /var/trac-0.11dev/lib/python2.4/site-packages
<VirtualHost *:80>
  ServerName hostname.domain
  <Location /svn>
    DAV svn
    SVNParentPath /srv/trac/repos
    SVNListParentPath Off
    AuthType Basic
    AuthName "Account Manager Auth"
    AuthBasicProvider wsgi
    WSGIAuthUserScript /path/to/script/acctmgr_auth.wsgi
    Require valid-user
  </Location>
</VirtualHost>

Settings of the acctmgr_auth.wsgi:

TRAC_REQUEST_LOCATION="/svn"
TRAC_ENV_PARENT="/srv/trac/envs"
PYTHON_EGG_CACHE="/path/to/eggs"

Recent Changes

3045 by pacopablo on 2008-01-12 10:18:26
  • Initial import
3044 by pacopablo on 2008-01-12 10:10:36
New hack ModWsgiAcctmgrScript, created by pacopablo
(more)

Author/Contributors

Author: pacopablo
Maintainer: none (needsadoption)
Contributors:

Last modified 8 months ago Last modified on Nov 19, 2015, 2:01:05 PM