Re: Using Google accounts for Trac access?
Anton Vodonosov <[email protected]>
| Newsgroups | gmane.lisp.common-lisp-net.devel |
|---|---|
| Message-ID | <[email protected]> |
16.08.2011, 23:19, "Erik Huelsmann" <[email protected]>: > Reading https://bitbucket.org/Dalius/authopenid-plugin/wiki/Home I conclude we > should be able to provide a mapping service to the OpenID module which maps > openIDs to internal user accounts. My idea would be to allow users to create > an .openid file in their home directories; these files could be concatenated by > the mapping service on every request when the cache is older than > 15 minutes - or something alike. > > All we need now is someone to develop the service. Another option is to tweak the trac openid plugin by few python lines so that the OpenID-to-local mapping may be stored in the trac.ini. Some new trac.ini option: [openid] # Key-value list of OpenID to local Trac account mapping. openid_to_local = <openid1>:<username1>;<openid2>:<username2> And in in the plugin sources - https://bitbucket.org/Dalius/authopenid-plugin/src/65c4d2c474d9/authopenid/authopenid.py: Around the line 149: openid_to_local = Option('openid', 'openid_to_local', None, """ Key-value list of OpenID to local Trac account mapping.""") Arount the line 532: if allowed and and self.openid_to_local: new_user = parse_somehow_to_map(self.openid_to_local)[remote_user] if new_user: remote_user = new_user The format of key-value list may be chosen depending what is easier to parse (maybe even a literal to execute with python's eval, or maybe json to parse with simple json, etc.). A question: what are the benefits of translating OpenID to a local account? As far as I understand, the trac account are only valid for trac and have nothing to do with the common-lisp.net user account. So if we use OpenID to login to trac, the only advantage is that I will see all the information (tickets) already assigned to my old trac name as assigned to me logged-in with OpenID. No other benefits? If so, it is only useful for existing projects, new projects can use OpenID from the beginning? I also curious how trac accounts are created. As far as I understand, trac instance for every cl-net project is a separate application, with it's own database (in the <project dir>/trac/db/), right? Do you have a script which scans <user home>/trac-info.txt and populates trac databases of all the trac instances on common-lisp.net? Best regards, - Anton _______________________________________________ clo-devel mailing list [email protected] http://lists.common-lisp.net/cgi-bin/mailman/listinfo/clo-devel