HTTPDUserAdminContrib

A User and Password module supporting text or DBM format htpasswd files, and SQL using HTTPD::UserAdmin CPAN module

Usage

This Contrib adds auth DBM and auth SQL support to foswiki, though the HTTPD::UserAdmin CPAN module.

You receive maximal performance benefit by using the SQL mode, and ensuring {Register}{AllowLoginName} is off (so that the WikiUsers topic is not needed to convert login names to Wiki Names.

See the Extensions | HTTPDUserAdminContrib section of configure to set up the specific options.

Text file user store (.htpassword)

If you are using the Text mode a once off converstion from an existing Foswiki htpasswd file must be done, due to differences in the way that email addresses are stored.

run perl -pi~ -e "s/$([^:]*):([^:]*):(.*)^/$1:$2:emails=$3/g" foswiki/data/.htpasswd to convert from Foswiki's native htpassword format.

From there you can use that file in the Text DBType, use dbmmanage to import it to a DBM file, or run a similar tool to import it into your database.

DBM mode

SQL mode (DBI)

This Contrib will not create the database setup for you, you will need to have an existing database, with appropriate database connection permissions, and a database table for with the required fields that is accessible by this user.

Note that the DB Schema name is set in the top section of the settings (defaults to the .htpasswd filename).

Beware: Do not use table names, or column names that are SQL keywords (such as group)

for a minimal, non-optimised mysql setup, run mysql -p and enter:
  • where www-data is the user that the foswiki scripts run as.
GRANT ALL PRIVILEGES ON 'HTTPDUsers'.* TO 'www-data'@'localhost' IDENTIFIED BY 'foswiki' WITH GRANT OPTION;
create database HTTPDUsers;
CREATE TABLE `HTTPDUsers`.`usertable` (
  `name` TINYTEXT  NOT NULL,
  `wikiname` TINYTEXT  NOT NULL,
  `emails` TINYTEXT  NOT NULL,
  `password` TINYTEXT  NOT NULL
);
CREATE TABLE `HTTPDUsers`.`grouptable` (
  `name` TINYTEXT  NOT NULL,
  `username` TINYTEXT  NOT NULL
);

extra not yet documented functionality

This Contrib can also use group definitions in the same database. There is however no in-wiki user interface to create and maintain these groups for now.

you can for example use mysql to
INSERT INTO grouptable (name, username) VALUES ('SuperGroup', 'testuser8') ;

Installation Instructions

  1. Install HTTPDUserAdminContrib
  2. select Foswiki::Users::HTTPDUserAdminContrib in the Security|Passwords|{PasswordManager} selector in Configure
  3. then set the appropriate settings in the Exensions|HTTPDUserAdminContrib section of Configure.
You do not need to install anything in the browser to use this extension. The following instructions are for the administrator who installs the extension on the server.

Open configure, and open the "Extensions" section. Use "Find More Extensions" to get a list of available extensions. Select "Install".

If you have any problems, or if the extension isn't available in configure, then you can still install manually from the command-line. See http://foswiki.org/Support/ManuallyInstallingExtensions for more help.

Contrib Info

Contrib Author(s): Foswiki:Main.SvenDowideit
Copyright: 2008-2009 SvenDowideit@fosiki.com
License: GPL (Gnu General Public License)
Contrib Version: 4512 (2009-07-20)
Change History:
Jul 2009 port to Foswiki
March 2008 version 2 - updated for the t(m)wiki 4.2.0 release, changes to allow registration, DB (MySQL in particular) and added group table
July 2007 version 1 - initial release
Dependencies:
NameVersionDescription
HTTPD::UserAdmin>=1.66Required.
HTTPD::GroupAdmin>=1.66Required.
HTTPD::Authen>=1.66Required.
DBD::mysql>=2.0Optional. use if talking to MySQL
Contrib Home: http://foswiki.org/Extensions/HTTPDUserAdminContrib

Related Topics: Contribs, DeveloperDocumentationCategory, AdminDocumentationCategory, DefaultPreferences, SitePreferences

Topic attachments
I Attachment Action Size Date Who Comment
HTTPDUserAdminContrib.md5md5 HTTPDUserAdminContrib.md5 manage 0.2 K 20 Jul 2009 - 08:29 SvenDowideit  
HTTPDUserAdminContrib.sha1sha1 HTTPDUserAdminContrib.sha1 manage 0.2 K 20 Jul 2009 - 08:29 SvenDowideit  
HTTPDUserAdminContrib.tgztgz HTTPDUserAdminContrib.tgz manage 11.9 K 20 Jul 2009 - 08:28 SvenDowideit  
HTTPDUserAdminContrib.zipzip HTTPDUserAdminContrib.zip manage 16.6 K 20 Jul 2009 - 08:28 SvenDowideit  
HTTPDUserAdminContrib_installerEXT HTTPDUserAdminContrib_installer manage 4.4 K 20 Jul 2009 - 08:28 SvenDowideit  
Edit | Attach | Print version | History: r4 < r3 < r2 < r1 | Backlinks | View wiki text | Edit WikiText | More topic actions...
Topic revision: r1 - 20 Jul 2009, SvenDowideit
 
The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. see CopyrightStatement. Creative Commons License