UserMan : a user management service in Erlang


Modified on 03/02/2003 at 21:15
Creator: Thierry Mallard

Introduction

This is a draft document which describes a yet-to-be-done Erlang service. Please comment on it any suggestion you may have, or send me a mail at thierry@mallard.com. :)

Features :

The following features will be provided :

  • central configuration file, which will allow several data sources, including LDAP servers
  • remote service
  • user management API
  • authentification API

It also relies on modular design, to allow several sources, such as ETS or Mnesia table, or LDAP servers. It will be transparent for the client application.

The User Management API

  • userman:create_user( UserDescriptionTuple, UserManSources, UserManNode )
  • userman:delete_user( UserDescriptionTuple, UserManSources, UserManNode )
  • userman:modify_user( UserDescriptionTuple, UserManSources, UserManNode )
  • userman:get_attribute( UserPattern, UserManSources, UserManNode ) returns { UserLogin, Attribute }
  • userman:set_attribute( UserPattern, [UserAttributes], UserManSources, UserManNode )

Authentification API

  • userman:login( UserDescriptionTuple, UserManSources, UserManNode ) returns { logged_in, UserDescriptionTuple } or { error, UserDescriptionTuple, Error }
  • userman:logout( UserDescriptionTuple, UserManSources, UserManNode ), which is similar to login, except "logged_out"

Administrative API

  • userman:check_configuration( UserManNode ) will parse the configuration files and report any warnings or errors ;
  • userman:test_sources( all | [ Sources], UserManNode ) will do a check_configuration first, then test every sources and connections.

Configuration file

It is cut into 2 categories :

Connections :

A connection is a distinct server access, such as for a LDAP server. The first parameter is the connection name, The second parameter is the module hint ( ldap gives userman_ldap module ), The last parameter is a list of module parameter.

{ connection, "Rei", "ldap", ' [' { binddn, "cn=admin,dc=rei,dc=vawis,dc=net" }, { bindpw, "password" } ' ]' }

Sources :

A source is a group of possible connections. When something isn't found in the first connection, userman will move on the second one, if available, and continue to feed in the data.

This allow the client application to have, for example, a LDAP server for user authentification, and a Mnesia table for complementary informations. When using userman:login(...), the LDAP server will be enought. When asking for the gamedir attribute, for example, userman will first try to fetch it from the LDAP server, and then to the Mnesia table, if we use the following configuration :

{ connection, "ReiUsers", "ldap" } ( ... see above ... )

{ connection, "ReiData", "mnesia", ' [' { table, "rei" } ' ]' }

{ source, "Rei", [ "ReiUser", "ReiData" ] }

Please note that sources are optional. You may specify only one connection, and then use it directly instead of a source.

Comments

  • ToDo, by Thierry Mallard on 03/02/2003 at 21:23
  • Queries are missing, by Mickaël Rémond on 09/25/2003 at 22:14
  •  

    [ News | About us | Documentation | Links | Projects & Contribs | Success stories | Binary packages | Other languages ]
    This site is made and run by the Erlang Projects Association
    Copyright 2003 Mickaël Rémond, Thierry Mallard
    Powered by Zope, CPS and Nuxeo