Mailman gives the options to subscribe to the 'n' of mailing lists hosted on a server. Systers is the largest community of technical women in computing. So ,they have got different Web-Applications like CMS, Wiki or any other authentication based softwares. Mailing list is one of the most used and preferred method of communication in technical groups ,for discussions among the people . Users have to subscribe to each of the list hosted on a server to get updated regarding a particular subject or field of interest. Sometimes it may not be possible to remember each username with password for each lists to which you are subscribed, so why not we can have common authentication system for the Mailing List , which can be used for authenticating with the CMS, Wiki.
OpenID is an open standard that describes how users can be authorized in a decentralized manner, obviating the need for services to provide their own ad hoc systems and allowing users to consolidate their identities.
Python OpenID provides the implementation of OpenID protocol which is scripted for python language.
The source page for this is in : http://pypi.python.org/pypi/python-openid/
Download Python OpenID library to use openid for python
More detailed documentation is available at:
- Python 2.3, 2.4, or 2.5.
- ElementTree. This is included in the Python 2.5 standard library, but users of earlier versions of Python may need to install it seperately.
- pycrypto, if on Python 2.3 and without /dev/urandom, or on Python 2.3 or 2.4 and you want SHA256.
Untar or Unzip the source code .
Go to the base directory and do the following:
python setup.py install
Alternatively, you can install using easy_install
easy_install openid
Let us have a demo for the Common Authentication System for Systers Mailman using Mailman Data. The following links is where the development server and the required wiki, installed to check the OpenID authentication by the Systers OpenID Provider. The links for the use are:
The new Common Gateway Interfaces which has been included for the Common Authentication System.
Till now user needs to provide her password once to login for the 'client' and create the cookie because , the work still need to be done ,for using the same cookies from the OpenID Provider after authentication
The Membership Table will be used for storing the listname,address , password with other options which will provide the data for OpenID Provider to respond to the data query each time. The 'openid' is a boolean data type to make check for the corresponding user have enabled Openid or not.The ownerships for this database is set for user 'mailman' and password 'mailman' on the database 'mailman_members' . You can use the following command to create the table.
cd /usr/local/mailman
sudo bin/createmem_table
The demo for this has been setup on the development server , on http://dev.systers.org/mailman/listinfo . Here is a sample of the demo , how I performed while testing.Initially the following listnames and users were created on the development server.
In case for the other use case functionality , the testing has been done in the given below link Functionality Testing
In Mailman , the normal authentication uses a key in SecurityManager a key = 'listname' + user , so each cookie is being generated with this format for each authentication but, with common authentication the key will be something like = 'string' + user so the content used is same for the user to login with the same password. For this there is a separate securitymanager for database called DBSecurityManager, which calls the getOIDmemberpassword from the DlistMemberships.
As the client memberships is similar to the Options membership but here the authentication is being by the common authentication . It allows the user to access all her subscribed list and change the options for her without giving password for each list as it allows the user to change options for any of the subscribed lists. The user can disable her Common Authentication system .
The change in the database are being reflected whenever a user disables and enables her OpenID/Common Authentication . The 'openid' field is the boolean type which gets to set '0' or '1' whenever the OpenID bit is disabled or enabled. The 'password' field uses chkpass module for postgresql , which stores the password in the encrypted form ,and whenever a user enters her password it is checked for that string , for example the user password for member1 is 'member11', then a query in the mailman_test Table for the mailman_members database will be like:
SELECT address,password='member11' from mailman_test where address='member1@dev.systers.org' ;
If the password matches the entry then,
address | ?column?
---------------------+----------
member1@dev.systers.org | t
Documentation for chkpass module for postgresql http://www.postgresql.org/docs/8.3/static/chkpass.html
The changes are reflected for both the 'Options' and 'Client' memberships page whenever an authorized user changes her settings
One needs to change the common authentication password ,so this feature needs to be completely functional , although it works but not in the same manner that we want. User can also view the other members as we have got the Roster Options and view the other subscribers.
This is the set of screen shots for the work being done so far. http://systers.org/systers-dev/doku.php/project:cgi-screen_shots:start
To download the source code for the Common Authentication , get the code from https://code.launchpad.net/~systers-dev/systers/membership . This is still a development branch and some features needs to be added as mentioned above.