This backend can be used if you want to use Dokuwiki together with a corporate LDAP, but you do not have any control over the structure of the LDAP. It allows you to keep all the access data for your wiki in Dokuwiki´s plain text files and still use the corporate LDAP for authentication so your contributers will not need to memorize yet another user name and password.
As I am in the same situation as describe above I have used for more than two years a self-developed patch for Dokuwiki´s LDAP authentication backend. And I did file a wishlist bug for inclusion of that patch into Dokuwiki base. This wishlist bug was rejected and so the next logical step was creating a separate backend for this scenario, even though the authentication process is a mix between LDAP and plain.
That shows if you have a look at the code. The backend is inherited from the LDAP backend. It overwrites most of the functions with simple variants. Additionally it contains a lot of functions from the Plain backend, again with small variations in most of these. This duplication of code is o.k. for a first version but should be replaced with something more efficient concerning code later on.
This authentication backend is published under the GPL V2.
Unzip the file in the /inc/auth directory of your Dokuwiki installation. Put the following lines into your /conf/local.php:
$conf['useacl'] = 1; # Use access control $conf['authtype'] = 'ldap_local'; # Authentication type LDAP using local ACLs
The LDAP configuration is done the same way with the same configuration options as with the LDAP backend. See http://www.dokuwiki.org/auth:ldap
The backend will try to authenticate every login against the configured LDAP server. In addition it will look up every user in your local /conf/users.auth.php. When both conditions are met, the user is logged in.
Groups may be acquired from the LDAP but local groups will used in any case.
The user manager can be used to add, delete or edit users. User information is pulled from the LDAP when necessary or convenient. It is not possible to add users not in the LDAP via the user manager.
In this first version the collaboration between the backend and the user manager has some quirks. It is necessary to fill out all the fields when creating a new user or editing a user, even „Password“ has to contain at least one character.
The quirks in the usermanager have to be resolved.
The reuse of code from other authentication backends has to be improved.
Version 0.1 of this authentication backend was made for DokuWiki Release 2009-02-14b. It may work with earlier releases but that is untested. It also works with DokuWiki Release 2009-12-25.
ldap_local.class.php.gz (4761 Bytes)
0.1 (2009-10-12): initial release