Version 1 (modified by Jeff Hammel, 9 years ago) (diff)

New hack SharedCookieAuthPlugin, created by k0s

share Trac cookies between projects in the same environment


SharedCookieAuthPlugin allows cookies to be shared between Trac instances in the same environment (i.e. directory). The plugin monkey-patches trac.web.auth.LoginModule so that cookies get set at / instead of req.base_path (though see trac:#8486 for the request to make this configurable). The incoming request is then passed by the authenticate method of the IAuthenticator interface to projects that peer the project of interest to see if the user is authenticated there. This enables single-sign on for Trac projects in the same directory.

Currently, this is pretty slow, as all of the peer environments are opened per authentication attempt. Any help making it faster is welcome, or I'll probably eventually get around to it.

Bugs/Feature Requests

Existing bugs and feature requests for SharedCookieAuthPlugin are here.

If you have any issues, create a new ticket.


Download the zipped source from [download:sharedcookieauthplugin here].


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


Install the plugin on multiple Trac instances in the same directory that use cookie-based auth. Then login to one should mirror login to all of them

Recent Changes

15486 by rjollos on 2016-04-18 08:56:13
0.1.6dev: Refactor code and update documentation
15122 by rjollos on 2015-12-14 06:13:30
0.1.5: Tag sharedcookieauth-0.1.5

Bump trunk version to 0.1.6dev.

15091 by rjollos on 2015-12-01 18:21:00
0.1.5dev: Rename method added in [15075]

  • Document internal methods.

Refs #12592



Author: k0s