Make Trac use a Drupal user database for authentication
Posted
by
denisw
on Stack Overflow
See other posts from Stack Overflow
or by denisw
Published on 2010-12-18T19:14:18Z
Indexed on
2011/01/04
16:54 UTC
Read the original article
Hit count: 230
I am trying to set up a Trac instance as a complement to a Drupal site and would like to give users the possibility to use their Drupal account in Trac, too, ideally in a single sign-on fashion (if the user is already logged into Drupal, he is automatically logged into Trac).
The question now is how to accomplish this. I have found a plugin named DrupalIntegration which seems to implement that functionality; however, it is poorly documented - in fact, not documented at all. I managed to install it, but don't know how to configure it. Here is what I came up with from looking at the source code and the documentation of the AccountManager plugin (on which DrupalIntegration depends):
[components]
trac.web.auth.loginmodule = disabled
acct_mgr.api = enabled
acct_mgr.web_ui.LoginModule = enabled
acct_mgr.web_ui.RegistrationModule = disabled
TracDrupalIntegration.DrupalIntegration = enabled
[account-manager]
drupal_database = mysql://<usernam>:<password>@localhost/<db>
password_store = DrupalIntegration
(<username>
, <password>
and <db>
are naturally substituted with the correct data). While the Trac log says:
2010-12-18 10:54:09,570 Trac[loader] DEBUG: Loading TracDrupalIntegration from /usr/lib/python2.5/site-packages/TracDrupalIntegration-0.1-py2.5.egg
this doesn't seem to work: trying to log in with a Drupal username / password results in an "Invalid username or password" error.
Has someone used the DrupalIntegration and can point out to me what I did wrong? Or is there any other approach you know (or even have used in the past) to integrate Drupal and Trac that way?
© Stack Overflow or respective owner