Apache authentication module for LibSDB


INTRO

This module provides Apache user authentication using LibSDB. SDB is a Simple database library, which provides multiple database support.

http://siag.nu/libsdb/


CREATE TABLES

The Default Tables are below.

 CREATE TABLE htpasswd (
	user CHAR(16) NOT NULL PRIMARY KEY,
	passwd CHAR(16) NOT NULL
 );

 CREATE TABLE htgroup (
	groupname CHAR(16) NOT NULL,
	user CHAR(16) NOT NULL
 );

 CREATE UNIQUE INDEX htgroup_uniq_idx ON htgroup(groupname, user);


CONFIG EXAMPLE

<Directory /path/to/secrete_area>
  AuthName "SDB Auth"
  AuthType basic
  AuthSDBURL mysql:host=localhost:db=auth:uid=www:pwd=xxx
  # ...

  require valid-user
</Directory>


Directives

(You also use these directives in your .htaccess)

AuthSDBURL <LibSDB URL string>
URL string of the LibSDB.
Examples are below.
mysql:host=XXX:db=XXX:uid=XXX:pwd=XXX
sqlite:db=/full/path/to/db
gdbm:db=foo.db
AuthSDBUserTable <table>
Name of the user table.
which contains user and passwd pair. Default htpasswd
AuthSDBUserField <fieldname>
Field name of the username at AuthSDBUserTable.
Default user.
AuthSDBPasswdField <fieldname>
Field name of the passwd at AuthSDBUserTable.
Default passwd.
AuthSDBGroupTable <table>
Name of the group table.
which contains groupname and joined user pair. Default htgroup
AuthSDBGroupField <fieldname>
Field name of the groupname at AuthSDBGroupTable.
Default groupname.
AuthSDBGroupUserField <fieldname>
Field name of the joined user at AuthSDBGroupTable.
Default user.
AuthSDBAuthoritative <On|Off>
mod_auth_sdb is taken to be authoritative or not.
Default On.
AuthSDBPlainText <On|Off>
Use plain text passwd or not(use crypt).
Default Off.
AuthSDBWhereClause <optional where clause>
optional WHERE Clause.
do not contain 'WHERE' and 'AND'
(e.g. AuthSDBWhereClause "active = 1" )

AUTHOR

IKEBE Tomohiro <ikechin@0xfa.com>