OpenID and Trac
With OpenID installed, I wanted to get the OpenID trac module working.
I started by installing some prerequisites:
apt-get install python-setuptools python-crypto python-elementtree
I then downloaded some python software not in the Debian Repository:
-
python-yadis / http://www.openidenabled.com/resources/downloads/python-openid/python-yadis-1.1.0.tar.gz
-
python-openid / http://www.openidenabled.com/resources/downloads/python-openid/python-openid-1.1.0.tar.gz
-
python-urljr / http://www.openidenabled.com/resources/downloads/python-openid/python-urljr-1.0.0.tar.gz
For each of these, I untarred them and then ran:
python setup.py install
Sadly it installed them into the /usr/lib/python directories (rather than /usr/local/lib). Probably a way to get that to work, but I don’t know enough about Python to really know where to start.
Next I added the following to my apache installation:
<Location "/">
SetEnv PYTHON_EGG_CACHE "/srv/trac/support/egg_cache"
</Location>
I created the directory specified and made sure the web server had write access to it.
Then, I downloaded the Trac OpenID plugin here: http://trac-hacks.org/wiki/OpenidPlugin
After downloading, I untarred it, entered the directory and ran:
python setup.py bdist_egg
And then copied the resulting .egg file (which was put in the dist directory) into /srv/trac/support/modules
Finally I added the following to my trac.ini file:
[components]
trac.web.auth.* = disabled
openidauth.* = enabled
And I commented out the “Location /projectname/login” lines in my apache auth file.
And restarted Apache.
Well, it’s almost there. When I enter my OpenID login I get:
Traceback (most recent call last):
File "/var/lib/python-support/python2.4/trac/web/main.py", line 387, in dispatch_request
dispatcher.dispatch(req)
File "/var/lib/python-support/python2.4/trac/web/main.py", line 237, in dispatch
resp = chosen_handler.process_request(req)
File "build/bdist.linux-i686/egg/openidauth/auth.py", line 162, in process_request
File "build/bdist.linux-i686/egg/openidauth/auth.py", line 203, in _start_login
File "build/bdist.linux-i686/egg/openidauth/auth.py", line 199, in _getConsumer
AttributeError: 'module' object has no attribute 'Consumer'
To be continued…