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/

INSTALL
-------

1) Install LibSDB.
   See http://siag.nu/libsdb/ for details.
   you can choose which RDBMS you use. with its configure option.

2) Make mod_auth_sdb as a DSO module.
   modify your Makefile. 
   INC, LIB and apxs path. 

 % make
 # make install

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>

You also use these directives. in your .htaccess

Directives
----------

AuthSDBURL <LibSDB URL string>
    URL string of the LibSDB.
    Examples are below.

        mysql:host=XXX:db=XXX:uid=XXX:pwd=XXX
        postgres:host=XXX:db=XXX:port=XXX
        oracle:uid=XXX:pwd=XXX OR oracle:uid=username/password@instance
        sqlite:db=/full/path/to/db
        lago:host=XXX:port=XXX:db=XXX:uid=XXX:pwd=XXX
        mimer:
        odbc:dsn=postgresql
	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>

================================================================