Date: 2008-07-13 10:29:00
openid login on moinmoin 1.7.0

The MoinMoin wiki software recently released version 1.7.0 which supports OpenID. I just upgraded to this version for OpenID support, and wanted to share my notes with anybody who might be trying the same thing.

The first job is to ugprade the MoinMoin software. The HelpOnUpdating page gives the information you need. The upgrade procedure is a bit detailed, so pay attention to the instructions. I also had to edit my Apache httpd.conf file to change some aliases that were pointing to 1.6.0 things. Make sure that the new 1.7.0 still works correctly before moving on.

Note that Johannes Berg's notes here don't tell the full story. I found that page first but it didn't give me enough context to enable OpenID.

The page you really want to read is HelpOnAuthentication. Scroll down to the OpenID section. Add the following lines to your wikiconfig.py:

    from MoinMoin.auth.openidrp import OpenIDAuth
    auth = [OpenIDAuth()]
    anonymous_session_lifetime = 60

Now go to your wiki login page. You may also have to install the following Python modules if you get "module not found" errors:

I installed the above modules using FreeBSD Ports, from security/py-openid and devel/py-elementtree.

Finally, when attempting to log in you may get an error saying "complete() got an unexpected keyword argument". This bug was recently reported by somebody else on the MoinMoinBugs page here. I haven't investigated why this happened, but the fix is easy. Edit the openidrp.py file (in a path something like /usr/local/lib/python2.4/site-packages/MoinMoin/auth) and change the offending line to read:

info = oidconsumer.complete(query, current_url=return_to)

OpenID login now works on my wiki.

[info]ext_18134 : Library bug still relevant in MoinMoin 1.9?
2011-07-03T07:30:39Z
Greg, thank you for this short and helpful article.

The edit you describe for ‘openidrp.py’ doesn't apply in MoinMoin 1.9. Is it still a bug, or has it been fixed in current MoinMoin versions (since when)?
[info]ghewgill : Re: Library bug still relevant in MoinMoin 1.9?
2011-07-03T07:53:37Z
Sorry, I don't know. As it turns out I don't use MoinMoin in an OpenID configuration anymore, so I haven't investigated.
Greg Hewgill <greg@hewgill.com>