Force HTTP authentication from within Trac


This plugin allows you to protect certain paths of your Trac project with HTTP authentication. The AccountManagerPlugin is used to check passwords.

Primarily this is meant to be used with the XmlRpcPlugin, so it will work while using AccountManager's form-based logins.

Bugs/Feature Requests

Existing bugs and feature requests for HttpAuthPlugin are here.

If you have any issues, create a new ticket.


9 / 14


0 / 3


1 / 1


Download the zipped source from here.

The plugin is also available on PyPi.


You can check out HttpAuthPlugin from here using Subversion, or browse the source with Trac. The 0.10 version also works with Trac release, at least with mod_python.


General instructions on installing Trac plugins can be found on the TracPlugins page.

To enable the plugin:

httpauth.* = enabled


The following are configuration examples for usage of this plugin, by making the indicated changes to your trac.ini file. To add additional paths:

paths = /xmlrpc, /login/xmlrpc

To add additional formats, such as RSS:

formats = rss


Authentication issues while using Trac with mod_wsgi


HTTP authentication just does not want to work. The Authorization header is passed with the HTTP request, but it seems to be lost on the way.

If you set the loglevel to INFO, then you will get this entry in your trac.log:

Trac[filter] INFO: HTTPAuthFilter: No/bad authentication data given, returing 403

See ticket #1169.


If you're using mod_wsgi, authorization information is stripped before passing to the WSGI application.


Turn WSGIPassAuthorization On in your Apache configuration for it to work.

See also ConfigurationDirectives.

Recent Changes

18631 by jun66j5 on 2024-04-11 01:31:33
TracHTTPAuth: allow to configure HTTP authentication realm
18630 by jun66j5 on 2024-04-09 21:45:16
TracHTTPAuth: fix exception raising if colons are used in password
18629 by jun66j5 on 2024-04-09 17:53:55
TracHTTPAuth: make compatible with Python 3 and Trac 1.6 (closes #14250)


Author: coderanger
Maintainer: txcraig
Contributors: pacopablo

Last modified 15 months ago Last modified on Feb 26, 2023, 7:31:13 AM